• 10 dec 2017: forum version update. In case of issues use this topic.
  • 30 nov 2017: pilight moved servers. In case of issues use this topic.
Hello There, Guest! Login Register


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Infinite loop on sunrise rule caused by currentdatetime
#7
Hi,

perhaps you try the following code in the rule for datetime:

Code:
(sunrisesetdevice.sunset == DATE_FORMAT(DATE_ADD(currentdatetime, '+5 SECONDS'), '%Y-%m-%d %H:%M:%S', %H.%M))

With your device:

Code:
"rule": "IF (sunrisesetdevice.sunset == DATE_FORMAT(DATE_ADD(currentdatetime, '+5 SECOND'), '%Y-%m-%d %H:%M:%S', %H.%M)) AND voodoo-cam.state == off AND currentdatetime.second == 0 THEN switch DEVICE voodoo-cam TO on",
 
Reply
  


Messages In This Thread
RE: Infinite loop on sunrise rule caused by currentdatetime - by Pikeman - 07-25-2018, 07:26 PM

Possibly Related Threads...
Thread Author Replies Views Last Post
  Connection lost, trying to reconnect — loop apartmedia 5 1,195 03-16-2019, 09:41 AM
Last Post: curlymo
  [split] pilight Error : pilight hangs in a loop Tommybear1979 5 2,575 07-01-2016, 08:27 AM
Last Post: Tommybear1979
Bug Bug report: segmentation fault using rule with AFTER woutput 3 3,005 11-22-2015, 12:27 PM
Last Post: woutput

Forum Jump:


Browsing: 1 Guest(s)