Any idea why this script is not called every minute ?
return {
active = true,
on = {
devices =
{
'Bojler','Bojler-godzina'
}
,
timer ='every minute'
},
execute = function(domoticz)
if domoticz.variables('BojlerON').value == 1 then
domoticz.notify('Bojler', 'BojlerON=1', domoticz.PRIORITY_HIGH,domoticz.SOUND_ALIEN,0,domoticz.NSS_PUSHBULLET)
if (domoticz.devices('Bojler').state == 'On' and domoticz.devices('Bojler').lastUpdate.minutesAgo > 3) then
domoticz.devices('Bojler').switchOff()
domoticz.log('Bojler >> timer OFF');
end
end
end
}
every minute script not working
Moderator: leecollings
-
- Posts: 4
- Joined: Tuesday 17 January 2017 11:10
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: every minute script not working
Domoticz v 3.8153
dzVents is called properly on device or variable change but not timer based
dzVents is called properly on device or variable change but not timer based
Re: every minute script not working
When inserting code on the forum, can you please put it between code markers
Code: Select all
your code
-
- Posts: 485
- Joined: Thursday 17 September 2015 10:13
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
Re: every minute script not working
Well, timer should be a table.boguslaw wrote: ↑Sunday 10 September 2017 10:23 Any idea why this script is not called every minute ?
return {
active = true,
on = {
devices =
{
'Bojler','Bojler-godzina'
}
,
timer ='every minute'
},
execute = function(domoticz)
if domoticz.variables('BojlerON').value == 1 then
domoticz.notify('Bojler', 'BojlerON=1', domoticz.PRIORITY_HIGH,domoticz.SOUND_ALIEN,0,domoticz.NSS_PUSHBULLET)
if (domoticz.devices('Bojler').state == 'On' and domoticz.devices('Bojler').lastUpdate.minutesAgo > 3) then
domoticz.devices('Bojler').switchOff()
domoticz.log('Bojler >> timer OFF');
end
end
end
}
Try this code:
Code: Select all
return {
active = true,
on = {
devices = {
'Bojler',
'Bojler-godzina'
},
timer = {
'every minute'
}
},
execute = function(domoticz)
domoticz.log('HEUREKA!', domoticz.LOG_FORCE)
if domoticz.variables('BojlerON').value == 1 then
domoticz.notify('Bojler', 'BojlerON=1', domoticz.PRIORITY_HIGH,domoticz.SOUND_ALIEN,0,domoticz.NSS_PUSHBULLET)
if (domoticz.devices('Bojler').state == 'On' and domoticz.devices('Bojler').lastUpdate.minutesAgo > 3) then
domoticz.devices('Bojler').switchOff()
domoticz.log('Bojler >> timer OFF', domoticz.LOG_FORCE)
end
end
end
}
-
- Posts: 4
- Joined: Tuesday 17 January 2017 11:10
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: every minute script not working
Thanks.It works now.
Who is online
Users browsing this forum: No registered users and 1 guest