hello i have wirtten the following luup code on vera 3 using fibaro switches
local switchonoff = luup.variable_get(“urn:upnp-org:serviceId:RedLamp”,“Status”,9)
if (tonumber(switchonoff)==0) then
luup.call_action(“urn:upnp-org:serviceId:RedLamp”, “SetTarget”, {newTargetValue = “1”}, 9)
end
it check correctly and says it is executing but nothing is showing and the lamp is not turning on i didnt find any mistake in the code
can i get some help why it is not working?
How do you know the above is right?[/quote]
If go into the Advanced tab of the device and place your mouse over the variable it will display the serviceId that is recorded against it.
urn:schemas-upnp-org:device:DimmableLight:1 is a device type. You need the service ID in this field.
Use: urn:upnp-org:serviceId:SwitchPower1
Status is the current state. The action needs to set the Target. Try: luup.call_action(“urn:upnp-org:serviceId:SwitchPower1”, “SetTarget”, {newTargetValue = “0”}, 7)
do you just want to set ON, or OFF trought a scene??
how can i do a scene doing the ON if the lamp its of
and OFF if the lamp its on!
just like a regular ON/OFF button
reason: want to use a macro + scene, to control 2 lights
the second light its IR controled!
Best Home Automation shopping experience. Shop at Ezlo!