Help with simple Luup code please

Hi

I have a small 4 button remote and a Fibaro dimmer. All is want is to push button one to turn the light on, if its off, or off, if its on.

This is what I have so far…

[code]local value = luup.variable_get(“urn:schemas-upnp-org:device:DimmableLight:1”, “Status”, 7)
if (value = “1”) then
luup.call_action(“urn:schemas-upnp-org:device:DimmableLight:1”, “SetStatus”, {NewStatus = “0”}, 7)
else luup.call_action(“urn:schemas-upnp-org:device:DimmableLight:1”, “SetStatus”, {NewStatus = “1”}, 7)

end[/code]

Any suggestions please

Many thanks
Martin

I thought I already answered this: [url=http://forum.micasaverde.com/index.php/topic,15747.msg122963.html#msg122963]http://forum.micasaverde.com/index.php/topic,15747.msg122963.html#msg122963[/url]

You have problems on 4 of the 5 lines …

The end is OK
3 of the lines do not have a ServiceID
Also you do not set the status … you set the target … You can check the status.
1 line should be ==

Why not use the Toggle option under the Advanced options tab? No need for any code.