This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

Store addresses in database
#3
(01.06.2016, 09:20)admin Wrote: You can store your table via storage.set and read it via storage.get. The question is why do you need to store connected clients? When your script ends - all clients are automatically disconnected anyway.

LogicMachine is in my case also Client, which after updating some groupaddress sends to all devices it's state. 

So I need to store IP addresses in storage. I can discover if new connected device is in table this way: 
Code:
if (storage.get(ipcut) == nil) {
        storage.set(someIndex, ipcut);
    }


Problem is that index for now Smile In your documentation is not written how can I discover how much indexes does database have. 

One solution is to iterate from 0 to xyz and discover where does it end.
Reply


Messages In This Thread
Store addresses in database - by hrebik - 01.06.2016, 09:15
RE: Store addresses in database - by admin - 01.06.2016, 09:20
RE: Store addresses in database - by hrebik - 01.06.2016, 09:31
RE: Store addresses in database - by admin - 01.06.2016, 09:55
RE: Store addresses in database - by hrebik - 01.06.2016, 10:05
RE: Store addresses in database - by admin - 01.06.2016, 11:22
RE: Store addresses in database - by admin - 03.08.2016, 06:24

Forum Jump: