• 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
#11
I still see output that should be in code tags in post #3.
 
Reply
#12
Must come from the incompatibiliies with Tapatalk. I just went online for you to delete this entry. Hope you feel better now.
 
Reply
#13
Why in god is it so difficult to fix the post using proper code tags on a forum that has some clear rules and where you are posting volunteeringly?!? You're asking me to spent free time in fixing bugs you are posting using free software that i spent many many hours to write and you're not willing to put some effort in helping me as well?!? Like responding to the questions i'm asking you.

I just recovered your deleted post, because it contains crucial information for us to debug.
 
Reply
#14
@Trashware

My code is working on pilight version 8.1.2.
Still no Problems.

My code for date and time:

Code:
"currentdatetime": {
            "protocol": [ "datetime" ],
            "id": [{
                "longitude": 12.2369759,
                "latitude": 49.7531168
            }],
            "year": 2018,
            "month": 7,
            "day": 25,
            "hour": 20,
            "minute": 23,
            "second": 27,
            "weekday": 4,
            "dst": 1
        },
 
Reply
#15
Same here. It's standard from the manual. I rolled back to 8.1.1. Now everything works again.
I'm running it on Jessie. Sorry for not posting the code, I only have access via Smartphone and Tapatalk.
 
Reply
#16
I've tested your config snippet but don't experience any issues.

Can you post your full config (in code tags)?
 
Reply
#17
I see similiar issue here. pilight version 8.1.2. Hardware is Raspberry Pi 3 with a 433nano device. The config file below results in:

Code:
[Oct 14 07:38:21:198446] pilight-daemon: ERROR: skipped rule #2 because of an infinite loop triggered by device date

but if the dummy rule is disabled with "active": 0 then there are no complaints in the log file. Am I doing something illegal in the config?


Code:
{
    "devices": {
        "Lamp0": {
            "protocol": [ "nexa_switch" ],
            "id": [{
                "id": 22700370,
                "unit": 2
            }],
            "state": "off"
        },
        "Lamp0-enable_sunset_rule": {
            "protocol": [ "generic_switch" ],
            "id": [{
                "id": 200
            }],
            "state": "on"
        },
        "Lamp0-enable_wkday_rule": {
            "protocol": [ "generic_switch" ],
            "id": [{
                "id": 202
            }],
            "state": "off"
        },
        "date": {
            "protocol": [ "datetime" ],
            "id": [{
                "longitude": 18.068580,
                "latitude": 59.329323
            }],
            "year": 2018,
            "month": 10,
            "day": 14,
            "hour": 9,
            "minute": 44,
            "second": 28,
            "dst": 1,
            "weekday": 1
        },
        "sun": {
            "protocol": [ "sunriseset" ],
            "id": [{
                "longitude": 18.068580,
                "latitude": 59.329323
            }],
            "sunrise": 7.22,
            "sunset": 17.46,
            "sun": "rise"
        }
    },
    "rules": {
        "Lamp0-sunset": {
            "rule": "IF (sun.sunset == DATE_FORMAT(DATE_ADD(date, '+15 MINUTE'), '%Y-%m-%d %H:%M:%S', %H.%M)) AND date.second == 0 AND Lamp0-enable_sunset_rule.state == on THEN switch DEVICE Lamp0 TO on",
            "active": 1
        },
        "dummy": {
            "rule": "IF '6.40' == DATE_FORMAT(date, %H.%M) AND date.second == 0 AND date.weekday == 1 AND date.weekday == 7 AND Lamp0-enable_wkday_rule.state == on THEN switch DEVICE Lamp0 TO on",
            "active": 1
        },
        "Lamp0-wkday": {
            "rule": "IF '6.40' == DATE_FORMAT(date, %H.%M) AND date.second == 0 AND date.weekday > 1 AND date.weekday < 7 AND Lamp0-enable_wkday_rule.state == on THEN switch DEVICE Lamp0 TO on",
            "active": 1
        }
    },
    "gui": {
        "Lamp0": {
            "name": "Lamp0",
            "group": [ "Home" ]
        },
        "sun": {
            "name": "Sunset / Sunrise",
            "group": [ "Automation" ]
        },
        "Lamp0-enable_sunset_rule": {
            "name": "Turn on Lamp0 at sunset",
            "group": [ "Automation" ]
        },
        "Lamp0-enable_wkday_rule": {
            "name": "Turn on Lamp0 06:40 on weekdays",
            "group": [ "Automation" ]
        }
    },
    "settings": {
        "log-level": 6,
        "pid-file": "/var/run/pilight.pid",
        "log-file": "/var/log/pilight.log",
        "actions-root": "/usr/local/lib/pilight/actions/",
        "functions-root": "/usr/local/lib/pilight/functions/",
        "operators-root": "/usr/local/lib/pilight/operators/",
        "webserver-enable": 1,
        "webserver-root": "/usr/local/share/pilight/webgui",
        "webserver-http-port": 80,
        "webserver-https-port": 5002,
        "webserver-cache": 1,
        "whitelist": "192.168.1.*",
        "gpio-platform": "none"
    },
    "hardware": {
        "433nano": {
            "comport": "/dev/pilight/433nano"
        }
    },
    "registry": {
        "pilight": {
            "firmware": {
                "version": 1,
                "lpf": 8,
                "hpf": 1600
            },
            "version": {
                "current": "8.1.2"
            }
        },
        "webserver": {
            "ssl": {
                "certificate": {
                    "secure": 0,
                    "location": "/etc/pilight/pilight.pem"
                }
            }
        }
    }
}
 
Reply
#18
Can you try the pilight nightly?
 
Reply
#19
Just tried 8.1.2-46-gde45eb28 and got no complaints of infinite loops.
 
Reply
  


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

Forum Jump:


Browsing: 1 Guest(s)