I tried looking through posts but there are a lot. I have some scripts written in lua, just recently found out about dzvents, well, I'm not a programmer and my system is very limited because the old lua was too hard for me to figure out. I started looking at dzvents, I've read through the documentation, watched the quick start video, and I've got a script together. This simply sets off a siren, notifies the mobile app and triggers various cameras in blue iris, I am not at home to test this yet but I wanted to see if anyone could look it over and see if I have made any obvious mistakes, much appreciated. I only have one camera in there because if this works I can easily add the rest.
Code: Select all
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
}