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
dzvents Lua : commandArray['Switch'] does not work'
Moderator: leecollings
-
- Posts: 55
- Joined: Sunday 23 October 2016 19:49
- Target OS: Linux
- Domoticz version: 4.10778
- Contact:
dzvents Lua : commandArray['Switch'] does not work'
Domoticz Beta V4.11763 in Debian 10 VM
Domoticz Beta V4.11763 in RPI3
MDAH 0.2.42 + Imperihome Pro V4.3.17
App Android Domoticz Lite V0.2.201
Domoticz Beta V4.11763 in RPI3
MDAH 0.2.42 + Imperihome Pro V4.3.17
App Android Domoticz Lite V0.2.201
-
- Posts: 191
- Joined: Wednesday 26 November 2014 18:43
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: dzvents Lua : commandArray['Switch'] does not work'
commandArray is not used anymore.
Read this wiki and use the examples for this:
http://www.domoticz.com/wiki/DzVents:_n ... _scripting
Read this wiki and use the examples for this:
http://www.domoticz.com/wiki/DzVents:_n ... _scripting
-
- Posts: 722
- Joined: Friday 02 October 2015 12:12
- Target OS: Raspberry Pi / ODroid
- Domoticz version: beta
- Location: Finland
- Contact:
Re: dzvents Lua : commandArray['Switch'] does not work'
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...
Who is online
Users browsing this forum: No registered users and 1 guest