I use dzVents on my Synology 916+ (DSM6.1) with Domoticz version 3.6312 for a number of scripts. It's working great and simplifies the coding efforts a lot.
Looking at Domoticz logfile, I noticed that all my time based dzVents scripts are executed on the hour every hour, including the scripts with a timer setting in minutes that should not run on the hour (or I at least I did not expect it to do so)
Is this as designed or do I overlook something ?
Dishwasher.lua: ['timer'] = 'every 16 minutes'
Washer.lua: ['timer'] = 'every 17 minutes'
Blinds.lua: ['timer'] = 'every 29 minutes'
2017-01-10 12:00:00.546 LUA: >>> Handler: Dishwasher
2017-01-10 12:00:00.546 LUA: >>> Handler: Washer
2017-01-10 12:00:00.547 LUA: >>> Handler: Blinds
2017-01-10 13:00:00.153 LUA: >>> Handler: Dishwasher
2017-01-10 13:00:00.154 LUA: >>> Handler: Washer
2017-01-10 13:00:00.155 LUA: >>> Handler: Blinds
and
2017-01-10 13:00:00.153 LUA: >>> Handler: Dishwasher
2017-01-10 13:16:00.205 LUA: >>> Handler: Dishwasher
2017-01-10 13:32:00.149 LUA: >>> Handler: Dishwasher
2017-01-10 13:48:00.401 LUA: >>> Handler: Dishwasher
2017-01-10 14:00:00.089 LUA: >>> Handler: Dishwasher
2017-01-10 14:16:00.443 LUA: >>> Handler: Dishwasher
Timer events start on the hour, every hour [Solved]
Moderator: leecollings
- waaren
- Posts: 6028
- Joined: Tuesday 03 January 2017 14:18
- Target OS: Linux
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Timer events start on the hour, every hour
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
- waaren
- Posts: 6028
- Joined: Tuesday 03 January 2017 14:18
- Target OS: Linux
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: Timer events start on the hour, every hour
That is a very good summary indeed.
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
-
dannybloe
- Posts: 1355
- Joined: Friday 29 August 2014 11:26
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: Ermelo
- Contact:
Re: Timer events start on the hour, every hour
Indeed it was
Looking at the code:
It sees if time.min can be devided by the interval (m). Of course that is bs 
Ehm... now finding a solution that doesn't require state is kinda hard. So... if you have any ideas..
Code: Select all
function self.isTriggerByMinute(m, testTime)
local time = self.getNow(testTime)
return (time.min / m == math.floor(time.min / m))
end
Ehm... now finding a solution that doesn't require state is kinda hard. So... if you have any ideas..
Creator dzVents - RPi3, loads of zwave devices, esp8266, evohome.
-
dannybloe
- Posts: 1355
- Joined: Friday 29 August 2014 11:26
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: Ermelo
- Contact:
Re: Timer events start on the hour, every hour
I could use the script storage solution that is being used by the persisted variables. Anyhow... in the coming days/weeks I don't think I have time to fix this (some house reconstruction work that needs to be finished first). But I will make a github ticket for this.
In the meantime I'd stick to intervals that do work given the current algorithm.
In the meantime I'd stick to intervals that do work given the current algorithm.
Creator dzVents - RPi3, loads of zwave devices, esp8266, evohome.
- waaren
- Posts: 6028
- Joined: Tuesday 03 January 2017 14:18
- Target OS: Linux
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: Timer events start on the hour, every hour
Thx gordonb3 and dannybloe for looking into this. Much apreciated
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
-
dannybloe
- Posts: 1355
- Joined: Friday 29 August 2014 11:26
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: Ermelo
- Contact:
Re: Timer events start on the hour, every hour [Solved]
Or you create a s.tload of ['timer'] = 'at xx:xx' entries around the clock of course. Then it will only skip a beat at 00:00 probably.dannybloe wrote:I could use the script storage solution that is being used by the persisted variables. Anyhow... in the coming days/weeks I don't think I have time to fix this (some house reconstruction work that needs to be finished first). But I will make a github ticket for this.
In the meantime I'd stick to intervals that do work given the current algorithm.
Creator dzVents - RPi3, loads of zwave devices, esp8266, evohome.
- waaren
- Posts: 6028
- Joined: Tuesday 03 January 2017 14:18
- Target OS: Linux
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: Timer events start on the hour, every hour
@dannybloe Thanks. As a workaround I created some ['timer'] = 'at xx:xx' entries which, as a side effect, effectively lowered the number of calls to the scripts as I could narrow them to the hours I actually need.
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
Who is online
Users browsing this forum: No registered users and 1 guest