First off, I apologize in advance if I’m doing something stupid, or at least going the roundabout sort of way. I fully suspect there is an easier way to achieve what I’m after. I’ve been using Vera for a while now, but I’m only just now getting into Lua / luup. So here goes:
I have a scene that uses luup to call out to the local web service at http://127.0.0.1:3480/data_request?id=user_data (I could find no other way to get the full payload that returns from luup). It then parses the JSON, loops through all of the scenes and if they meet certain criteria either enables or disables any timers / schedules they might have. It then feeds this modified table back to ModifyUserData (at least the Scenes portion of it anyway). This works like a champ. The problem, however, is that ModifyUserData needs to reload the engine to make the changes active. So even though I may return true from this luup code, this reload operation seems to interfere with sending zwave commands to several devices while the reload is happening. What seems to happen is some get the updates, some don’t. So ideally what I’m looking for is to go, in order:
- change states of several devices in a scene
And after that has completed successfully…
- toggle schedules using my luup code
Any thoughts?
Thanks in advance!