Hi, I have searched around for a method to pass a variable to a Lua scene via URL: “Vera.IP:port/data_request/id=lu_action&serviceId=urn:micasaverde-com:serviceId:HomeAutomationGateway1&action=&RunScene&SceneNum=1”
I can get a scene to run just fine, but what if I want to set a variable in the script the scene runs? I don’t mean a device variable (I saw how to do that). Even if I were able to just set a global variable via URL, that would satisfy my requirements. Is there a way to call a scene while specifying a variable all in one URL?
…or if you want a bit more flexibility, it’s really easy to write an HTTP request handler which can have any parameters you like (and, in turn, run a scene if necessary.)
You’d use luup.register_handler() to set it up in Startup Lua.
[hr]
Edit: Actually, I previously posted a complete example here:
Thanks guys! I actually just found that I could make a virtual device and set a custom variable on that device which would act like my global. I appreciate the responses, though
Best Home Automation shopping experience. Shop at Ezlo!