A couple of things to keep in mind: scripts can't add/change/delete these properties (for security purposes) - they are read-only. You must use the Plugins->Global Property Manager->Manage Device Properties... menu item to add/edit/delete the properties. Next, to access the properties from your script, you'll need to access them this way:
Code: Select all
# First, get the device
myDevice = indigo.devices[DEVICEIDHERE]
# Next, get the props - we use the ID for the server for this particular set of properties
theProps = myDevice.globalProps["com.indigodomo.indigoserver"]
# Finally, access the value of the property. Use the get method here so that you can later test for None in case the property doesn't exist on the device
myPropertyValue = theProps.get("someKeyHere", None)
Because there is no way to segregate keys in this global space, I recommend that you prefix your keys with some combination of letters that is somewhat unique to your particular usage. I'm working on a script called Low Battery Notification (which I'll publish later separately), so I'm naming my keys with the "lbn" prefix, which will help distinguish them from other properties. It's just a suggestion of course, but it'll help eliminate naming conflicts.