I downloaded a zip off the github page to get dzVents.
I am checking the log through the web interface. README.md suggests "Assuming of course that you have configured the notify options in Domoticz. Otherwise you can change the lines with domoticz.notify to domoticz.email(<your address>)" but presumably that's not the syntax for email procedure: OK I found correct syntax from QUICKREF.md but no evidence that the event even fired. (And I have set up e-mail for Domoticz and tested it.)
My only doubt is about the location for script_time_main.lua, script_device_main.lua, dzVents_settings.lua which I have in domoticz/scripts/lua. Have I misunderstood the layout tree in README.md?
My test.lua is below.
Thanks.
Dave
Code: Select all
GNU nano 2.2.6 File: /mnt/files/debian/opt/domoticz/scripts/lua/dzVents/scripts/test.lua Modified
return {
active = true,
on = {
'Switch family room'
},
execute = function(domoticz, switch)
if (switch.state == 'On') then
domoticz.email('Hey!', 'I am on!', '[email protected]')
else
domoticz.email('Hey!', 'I am off!', '[email protected]')
end
end
}