Changing variable values with URL's

Hi all,

I found out that with URL’s I can modify a variable called “MyData” by performing:’


I see that it works, but how can I use this variable “MyData” in my Lua code?

If I use

…the log tells me that MyData is null.

Thanks for your help in advance,

Youo’ll probably benefit form @RexbBeckett’s Conditional Scene Execution: Some Examples and the wiki, Getting started with LUUP.

Thanks for providing the links.

If been googling/reading quite a lot to find out how to manipulate variables.
With URL’s I am able to start scenes and to modify properties/settings of devices.

But it also seems to be possible to omit the DeviceNum and serviceID. Vera documentation states the following about it:
(see [url=][/url])

If you leave off the DeviceNum and serviceID, then this sets a top-level json tag called “Variable” with the value.

But how can I access that “top-level json tag called “Variable”” in my LUA script?


LUA Variables ARE NOT the same as JSON variables ARE NOT the same as device variables!

You can access state variabled in LUA with luup.variable_get … You can access SOME JSON variables with luup.attr_get

Ok thanks, that clears it up for me.