• 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
#3
(07-24-2018, 12:21 PM)curlymo Wrote: Can you be more verbose, like posting the config, debug output of the issue...

Relevant config.json portion:

{
        "devices": {
                "voodoo-cam": {
                        "protocol": [ "rsl366" ],
                        "id": [{
                                "systemcode": 3,
                                "programcode": 1
                        }],
                        "state": "off"
                },
                "currentdatetime": {
                        "protocol": [ "datetime" ],
                        "id": [{
                                "longitude": 11.14387,
                                "latitude": 49.52943
                        }],
                        "year": 2018,
                        "month": 7,
                        "day": 21,
                        "hour": 21,
                        "minute": 55,
                        "second": 54,
                        "dst": 1,
                        "weekday": 7
                },
                "localsunriseset": {
                        "protocol": [ "sunriseset" ],
                        "id": [{
                                "longitude": 11.14387,
                                "latitude": 49.52943
                        }],
                        "sunrise": 5.32,
                        "sunset": 21.13,
                        "sun": "set"
                }
        },
        "rules": {
                "localsunrise": {
                        "rule": "IF ((localsunriseset.sunrise == DATE_FORMAT(currentdatetime, %H.%M)) AND (currentdatetime.second == 5)) THEN switch DEVICE voodoo-cam TO on",
                        "active": 1
                },
                "localsunset": {
                        "rule": "IF ((localsunriseset.sunset == DATE_FORMAT(currentdatetime, %H.%M)) AND (currentdatetime.second == 5)) THEN switch DEVICE voodoo-cam TO off",
                        "active": 1
                }
        },



Log file (level 6):


[Jul 24 17:15:09:893191] pilight-daemon: INFO: datetime currentdatetime 11.143870:49.529430 seems to be in timezone: Europe/Berlin
[Jul 24 17:15:09:918861] pilight-daemon: INFO: sunriseset localsunriseset 11.143870:49.529430 seems to be in timezone: Europe/Berlin
[Jul 24 17:15:10:364167] pilight-daemon: INFO: rule #1 localsunrise was parsed in 0.009058 seconds
[Jul 24 17:15:10:372334] pilight-daemon: INFO: rule #2 localsunset was parsed in 0.008127 seconds
[Jul 24 17:15:10:381656] pilight-daemon: INFO: rule #3 homeeup was parsed in 0.009278 seconds
[Jul 24 17:15:10:390839] pilight-daemon: INFO: rule #4 homedown was parsed in 0.009130 seconds
[Jul 24 17:15:10:523757] pilight-daemon: ERROR: cannot bind to the ssdp multicast network
[Jul 24 17:15:10:634577] pilight-daemon: ERROR: skipped rule #1 because of an infinite loop triggered by device currentdatetime
[Jul 24 17:15:11:635757] pilight-daemon: ERROR: skipped rule #1 because of an infinite loop triggered by device currentdatetime
[Jul 24 17:15:12:636695] pilight-daemon: ERROR: skipped rule #1 because of an infinite loop triggered by device currentdatetime
[Jul 24 17:15:13:638390] pilight-daemon: ERROR: skipped rule #1 because of an infinite loop triggered by device currentdatetime
[Jul 24 17:15:14:649317] pilight-daemon: ERROR: skipped rule #1 because of an infinite loop triggered by device currentdatetime
[Jul 24 17:15:15:650219] pilight-daemon: ERROR: skipped rule #1 because of an infinite loop triggered by device currentdatetime
[Jul 24 17:15:16:649502] pilight-daemon: ERROR: skipped rule #1 because of an infinite loop triggered by device currentdatetime
[Jul 24 17:15:17:650463] pilight-daemon: ERROR: skipped rule #1 because of an infinite loop triggered by device currentdatetime
 
Reply
  


Messages In This Thread
RE: Infinite loop on sunrise rule caused by currentdatetime - by Trashware - 07-24-2018, 07:45 PM

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

Forum Jump:


Browsing: 1 Guest(s)