Page 1 of 1

dzvents Lua : commandArray['Switch'] does not work'

Posted: Friday 18 August 2017 23:55
by gerardosamara
Hi ,

RPI3 + Domoticz version stable 3.8153

I created a simple Lua script , using the integrated editor of dzvents , to send a command On/Off to a zwave switch (DSC24 Aetec) from a selector switch called "House Mode" with status Disarm , Home , Away, Night as per the "Disarm" part below

commandArray = {}
if (devicechanged['House Mode'] == 'Disarm') then
print('House Mode : Setting Disarm')
commandArray['DSC24 Switch']='Off'
commandArray['SendNotification']='House Mode = #Disarm#0'
commandArray['SendEmail']='House Mode = #Disarm#[email protected]'
print('Disarm set')
end


When pressing on the "Disarm" button , the script is executed as I can see the print in the log , I received the email and the notification but the DSC24 smart switch does not go to off.

The switch name in the script matches the device name in device tab.
No debug messages in the Zwave log

I am unable to find the issue .

Please advice
Thank you

Re: dzvents Lua : commandArray['Switch'] does not work'

Posted: Saturday 19 August 2017 8:48
by tlpeter
commandArray is not used anymore.
Read this wiki and use the examples for this:

http://www.domoticz.com/wiki/DzVents:_n ... _scripting

Re: dzvents Lua : commandArray['Switch'] does not work'

Posted: Sunday 20 August 2017 12:22
by Nautilus
You can of course still use the normal Lua scripts (not dZvents) with the kind of syntax as in your example. For dZvents there is a different kind of syntax altogether, more info on the previous post's link...