je n'arrive pas à comprendre dans le wiki la différence entre les deux syntaxes suivantes :
Code : Tout sélectionner
return {
on = {
timer = {'at *:30'}
},
execute = function(domoticz)
local command = '/volume1/@appstore/domoticz/var/scripts/xxx.sh &'
os.execute(command)
end
}Code : Tout sélectionner
return {
on = {
timer = {'at *:30'}
},
execute = function(domoticz, timer)
local command = '/volume1/@appstore/domoticz/var/scripts/xxx.sh &'
os.execute(command)
end
}Code : Tout sélectionner
return {
on = {
timer = {'at 06:00-23:00 every hour'}
},
execute = function(domoticz)
domoticz.log('C est l heure !')
if domoticz.devices('ALIM TABLETTE').state == "On" then
domoticz.devices('ALIM TABLETTE').switchOff().forSec (5)
else
domoticz.devices('ALIM TABLETTE').switchOn().forSec (5)
end
end
}