Anyone know dzvents at all? Trying to re-write my first script from the old horrible lua to the new dzvents lua, whatever you wanna call it. Can someone tell me if this looks good? See any issues? Thanks.
Code:
return {
active = true,
on = {
devices = {
'Front Door',
'Back Door'
},
},
execute = function(domoticz, door)
if (door.state == 'Open') and domoticz.security('Armed Home') or domoticz.security('Armed Away') then
domoticz.devices('Siren').switchOn()
domoticz.log('The '..door..' was opened!')
domoticz.notify('The '..door..' was opened!', domoticz.PRIORITY_EMERGENCY, domoticz.SOUND_SIREN)
local BiLogin = 'user=USERNAME&pw=PASSWORD'
domoticz.openURL('http://10.0.0.124/admin?camera=Kitchen&trigger&'..BiLogin..'')
end
end
}