odd/even week timer triggered every week  [SOLVED]

Moderator: leecollings

Post Reply
hollysaiqs
Posts: 3
Joined: Friday 28 December 2018 18:52
Target OS: Linux
Domoticz version:
Contact:

odd/even week timer triggered every week

Post by hollysaiqs »

Hello,

I created a script with the following timer event:

Code: Select all

between 1:00 and 1:30 on sat every odd week
Yet my script is triggered every week (odd and even). Any clue ?
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: odd/even week timer triggered every week

Post by waaren »

hollysaiqs wrote: Saturday 29 December 2018 21:04 Hello,

I created a script with the following timer event:

Code: Select all

between 1:00 and 1:30 on sat every odd week
Yet my script is triggered every week (odd and even). Any clue ?
I am afraid the current dzVents version does not handle this correctly. I will create a PR to correct this after testing the fix and will let you know when it will be part of a next Beta.

Until then a workaround would be to trigger the script with

Code: Select all

on = { 
        timer = { 'on sat at 1:00-1:30' }
        },
and start the body of the script with

Code: Select all

   execute = function(dz)
      if dz.time.matchesRule("every even week") then
          return
      end
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: odd/even week timer triggered every week  [SOLVED]

Post by waaren »

hollysaiqs wrote: Saturday 29 December 2018 21:04 Hello,

I created a script with the following timer event:

Code: Select all

between 1:00 and 1:30 on sat every odd week
Yet my script is triggered every week (odd and even). Any clue ?
Fixed in V4.10304
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
hollysaiqs
Posts: 3
Joined: Friday 28 December 2018 18:52
Target OS: Linux
Domoticz version:
Contact:

Re: odd/even week timer triggered every week

Post by hollysaiqs »

Thank you ! I tried your workaround with success. I will wait for next stable to test your fix.
I have also a problem with

Code: Select all

at civiltwilightstart
and

Code: Select all

at civiltwilightend
Do you know if these triggers shall work in stable version ?
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest