For this purpose I wrote a very simple LUA security event which is supposed to do the following:
1) When I go on the security panel and press Disarm, I want "Relay 0" to go Off
2) When I go on the security panel and press Arm Away, I want the shutter "Kitchen shutter" to become "Closed"
Function 1 works perfectly, function 2 doesn't work at all.
"Relay 0" is a relay on a Piface Digital 2 directly connected to Raspberry and is defined as Lighting, Impuls, On/Off
"Kitchen shutter" is a Blyss blind controller, interfaced via RFLink and defined as Light/Switch, Blyss, Blinds inverted
An important information is that "Kitchen shutter is perfectly opening, closing and stopping the movement of the shutters if I change its status from the Device or Dashboard panels
Here is the LUA code I'm using for test:
Code: Select all
commandArray = {}
if globalvariables['Security'] == 'Disarmed'
then
commandArray['Relay 0'] = 'Off'
end
if globalvariables['Security'] == 'Armed Away'
then
print (otherdevices['Kitchen shutter'])
commandArray['Kitchen shutter'] = 'Close'
print ('here')
print (otherdevices['Kitchen shutter'])
end
return commandArray