07-24-2018, 07:45 PM
(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