What's wrong with this blocky ? No alarm on gateway also nothing in phone via Pushover too.
Pushover is working because I have garage door set via Pushover and it's ok.

Moderator: leecollings
You used the wrong control block (the one you have is to be used for nested if else constructs)
This is a setting in the gateway itself. Only way to deal with this from domoticz is to give repeated On commands.
Code: Select all
return
{
on = {
devices = { 'Kuisti_liike', 'Porch movement' },
security = { domoticz.SECURITY_DISARMED },
},
execute = function(dz, item)
local alarm = dz.devices('Xiaomi Gateway Alarm Ringtone')
local gateway = dz.devices('Xiaomi RGB Gateway')
if item.active and dz.security == dz.SECURITY_ARMEDAWAY then
gateway.switchOn()
dz.devices('Xiaomi Gateway Volume').dimTo(20)
alarm.cancelQueuedCommands()
alarm.switchSelector(30)
for seconds = 0, 5 do
alarm.switchOn().afterSec(seconds * 10)
end
alarm.switchOff().afterSec(60)
elseif item.isSecurity then
alarm.cancelQueuedCommands()
alarm.switchOff()
gateway.switchOff()
end
end
}
Users browsing this forum: No registered users and 1 guest