Trane advance luup commands

Hi Guys, great forum, i have had a verlite for some time now, and im ready to start to play arround with advance commands.
I want to create a virtual switch (i think global variable) so i can in any case turn off the AC without changing the scenes that i had

I changed the scenes of the thermostat to the luup only code
but i cannot get it to work i receive “error in lua for scenes and events”

im using this for the scenes

if (turnoffac = 0) then
luup.call_action(‘urn:micasaverde-com:serviceId:ZWaveNetwork1’,‘SendData’,{Node=‘10’,Data=‘64 1 2’},1)
luup.call_action(‘urn:micasaverde-com:serviceId:ZWaveNetwork1’,‘SendData’,{Node=‘10’,Data=‘68 1 0’},1)
luup.call_action(“urn:upnp-org:serviceId:TemperatureSetpoint1_Cool”, “SetCurrentSetpoint”, { NewCurrentSetpoint=78},10)
end

and in the startup lua i created the variable

turnoffac=0

can you guys help me , i want to know what im doing wrong

Your if expression is not valid. Try this:

if (turnoffac == 0) then luup.call_action('urn:micasaverde-com:serviceId:ZWaveNetwork1','SendData',{Node='10',Data='64 1 2'},1) luup.call_action('urn:micasaverde-com:serviceId:ZWaveNetwork1','SendData',{Node='10',Data='68 1 0'},1) luup.call_action("urn:upnp-org:serviceId:TemperatureSetpoint1_Cool", "SetCurrentSetpoint", { NewCurrentSetpoint=78},10) end

Thanks, seems that i have a lot to learn from lua/luup