im writing a simple scripts that sends a sounds through xiaomi gateway after
Code: Select all
return {
-- 'active' controls if this entire script is considered or not
active = true, -- set to false to disable this script
-- trigger
-- can be a combination:
on = {
devices = {
'test'
}
},
-- actual event code
-- in case of a timer event or security event, device == nil
execute = function(domoticz, device)
if(domoticz.devices('test').state == 'On') then
domoticz.log('triggered')
domoticz.devices('test').switchOff()
domoticz.devices('GatewayMP3').switchOn().afterSec(20).forMin(1)
domoticz.notify('DZ test','test è on',PRIORITY_NORMAL,0,'iPhone6S',domoticz.NSS_PUSHOVER)
domoticz.log('mp3 '..domoticz.devices('GatewayMP3').state)
end
end
}
how can I resolve that?
thanx in advance
Fabrizio