• 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
Update to v8.0.10-nightly-a1279212
#1
Hi

Because my SD-Card died, I had to reinstall pilight. My config.json was running ok in v7-nightly.

I solved most Problems, mainly by inserting quotes for FOR '20 MINUTE' and setting labels to multiple words.
The returned error when starting and the detailled messages in the .err-file are very helpful

Now only one problem is unsolved. I have some rules which compare the current time to a fixed time, just as shown in the "time-based" examples. But they lead to a syntax-error

Code:
root@raspberrypi:~# pilight-daemon -D
[ May 18 17:02:06:15924] pilight-daemon: INFO: datetime Currentdatetime 8.675000:49.991000 seems to be in timezone: Europe/Berlin
[ May 18 17:02:06:40702] pilight-daemon: INFO: sunriseset Sunriseset 8.675000:49.991000 seems to be in timezone: Europe/Berlin
[ May 18 17:02:06:43184] pilight-daemon: DEBUG: loaded event function /usr/local/lib/pilight/functions/date_add.lua v2.0
[ May 18 17:02:06:43577] pilight-daemon: DEBUG: loaded event function /usr/local/lib/pilight/functions/date_format.lua v1.0
[ May 18 17:02:06:43924] pilight-daemon: DEBUG: loaded event function /usr/local/lib/pilight/functions/random.lua v2.1
[ May 18 17:02:06:44466] pilight-daemon: DEBUG: loaded event operator /usr/local/lib/pilight/operators/modulus.lua v1.0
[ May 18 17:02:06:44749] pilight-daemon: DEBUG: loaded event operator /usr/local/lib/pilight/operators/plus.lua v1.0
[ May 18 17:02:06:45059] pilight-daemon: DEBUG: loaded event operator /usr/local/lib/pilight/operators/concat.lua v1.0
[ May 18 17:02:06:45380] pilight-daemon: DEBUG: loaded event operator /usr/local/lib/pilight/operators/intdivide.lua v1.0
[ May 18 17:02:06:45997] pilight-daemon: DEBUG: loaded event operator /usr/local/lib/pilight/operators/gt.lua v1.0
[ May 18 17:02:06:46740] pilight-daemon: DEBUG: loaded event operator /usr/local/lib/pilight/operators/lt.lua v1.0
[ May 18 17:02:06:47561] pilight-daemon: DEBUG: loaded event operator /usr/local/lib/pilight/operators/multiply.lua v1.0
[ May 18 17:02:06:47961] pilight-daemon: DEBUG: loaded event operator /usr/local/lib/pilight/operators/le.lua v1.0
[ May 18 17:02:06:48215] pilight-daemon: DEBUG: loaded event operator /usr/local/lib/pilight/operators/ge.lua v1.0
[ May 18 17:02:06:48432] pilight-daemon: DEBUG: loaded event operator /usr/local/lib/pilight/operators/divide.lua v1.0
[ May 18 17:02:06:48644] pilight-daemon: DEBUG: loaded event operator /usr/local/lib/pilight/operators/ne.lua v1.0
[ May 18 17:02:06:48849] pilight-daemon: DEBUG: loaded event operator /usr/local/lib/pilight/operators/minus.lua v1.0
[ May 18 17:02:06:49043] pilight-daemon: DEBUG: loaded event operator /usr/local/lib/pilight/operators/and.lua v1.0
[ May 18 17:02:06:49261] pilight-daemon: DEBUG: loaded event operator /usr/local/lib/pilight/operators/eq.lua v1.0
[ May 18 17:02:06:49546] pilight-daemon: DEBUG: loaded event operator /usr/local/lib/pilight/operators/or.lua v1.0
[ May 18 17:02:06:56040] pilight-daemon: INFO: rule #1 SetLabelTest1 was parsed in 0.006398 seconds
[ May 18 17:02:06:59561] pilight-daemon: ERROR:
... %H.%M%S) == 18.5600 THEN label DEVICE ZeitTest2 TO 'angeschaltet'
                       ^ unexpected symbol, expected a condition
[ May 18 17:02:06:59613] pilight-daemon: INFO: rule #2 SetLabelTest2 was parsed in 0.003494 seconds
 
The syntax is accepted if I enclose the number in quotes, but then the condition does nor work
This is my config
Code:
{
    "devices": {
        "Version": {
            "protocol": [ "generic_label" ],
            "id": [{
                "id": 198
            }],
            "label": "18.05.2018",
            "color": "Blue"
        },
        "ZeitEGArbeit": {
            "protocol": [ "generic_label" ],
            "id": [{
                "id": 199
            }],
            "label": "ab Sunset - 0:45",
            "color": "black"
        },
        "Arbeitstag": {
            "protocol": [ "generic_switch" ],
            "id": [{
                "id": 200
            }],
            "state": "on"
        },
        "RolloEsszimmer": {
            "protocol": [ "kaku_screen_old" ],
            "id": [{
                "id": 13,
                "unit": 0
            }],
            "state": "up"
        },
        "RolloKlavier": {
            "protocol": [ "kaku_screen_old" ],
            "id": [{
                "id": 13,
                "unit": 1
            }],
            "state": "up"
        },
        "RolloCouch": {
            "protocol": [ "kaku_screen_old" ],
            "id": [{
                "id": 13,
                "unit": 4
            }],
            "state": "up"
        },
        "RolloHof": {
            "protocol": [ "kaku_screen_old" ],
            "id": [{
                "id": 13,
                "unit": 8
            }],
            "state": "up"
        },
        "RolloAlles": {
            "protocol": [ "generic_screen" ],
            "id": [{
                "id": 119
            }],
            "state": "up"
        },
        "Wohnzimmer": {
            "protocol": [ "elro_800_switch" ],
            "id": [{
                "systemcode": 208,
                "unitcode": 1
            }],
            "state": "off"
        },
        "Esszimmer": {
            "protocol": [ "elro_800_switch" ],
            "id": [{
                "systemcode": 208,
                "unitcode": 2
            }],
            "state": "off"
        },
        "Kueche": {
            "protocol": [ "elro_800_switch" ],
            "id": [{
                "systemcode": 208,
                "unitcode": 3
            }],
            "state": "off"
        },
        "DieleNeu1": {
            "protocol": [ "elro_800_switch" ],
            "id": [{
                "systemcode": 208,
                "unitcode": 4
            }],
            "state": "off"
        },
        "DieleNeu2": {
            "protocol": [ "elro_800_switch" ],
            "id": [{
                "systemcode": 208,
                "unitcode": 4
            }],
            "state": "off"
        },
        "SteckdoseRund1": {
            "protocol": [ "clarus_switch" ],
            "id": [{
                "id": "A3",
                "unit": 18
            }],
            "state": "off"
        },
        "SteckdoseRund2": {
            "protocol": [ "clarus_switch" ],
            "id": [{
                "id": "B3",
                "unit": 18
            }],
            "state": "off"
        },
        "SteckdoseRund3": {
            "protocol": [ "clarus_switch" ],
            "id": [{
                "id": "C7",
                "unit": 18
            }],
            "state": "off"
        },
        "SteckdoseEckig1": {
            "protocol": [ "elro_800_switch" ],
            "id": [{
                "systemcode": 21,
                "unitcode": 1
            }],
            "state": "off"
        },
        "SteckdoseEckig2": {
            "protocol": [ "elro_800_switch" ],
            "id": [{
                "systemcode": 21,
                "unitcode": 2
            }],
            "state": "off"
        },
        "SteckdoseEckig3": {
            "protocol": [ "elro_800_switch" ],
            "id": [{
                "systemcode": 21,
                "unitcode": 4
            }],
            "state": "off"
        },
        "Alles": {
            "protocol": [ "generic_switch" ],
            "id": [{
                "id": 98
            }],
            "state": "off"
        },
        "Diele": {
            "protocol": [ "generic_switch" ],
            "id": [{
                "id": 99
            }],
            "state": "off"
        },
        "TimerEG": {
            "protocol": [ "generic_switch" ],
            "id": [{
                "id": 100
            }],
            "state": "on"
        },
        "TimerOG": {
            "protocol": [ "generic_switch" ],
            "id": [{
                "id": 101
            }],
            "state": "on"
        },
        "TimerRollos": {
            "protocol": [ "generic_switch" ],
            "id": [{
                "id": 102
            }],
            "state": "on"
        },
        "TimerUrlaub": {
            "protocol": [ "generic_switch" ],
            "id": [{
                "id": 103
            }],
            "state": "off"
        },
        "ZeitEGDiDoFr": {
            "protocol": [ "generic_label" ],
            "id": [{
                "id": 110
            }],
            "label": "ab Sunset - 0:45",
            "color": "Green"
        },
        "ZeitEGMoMiWo": {
            "protocol": [ "generic_label" ],
            "id": [{
                "id": 111
            }],
            "label": "ab Sunset - 0:45",
            "color": "Gray"
        },
        "ZeitOG": {
            "protocol": [ "generic_label" ],
            "id": [{
                "id": 112
            }],
            "label": "Sunset bis 23:00",
            "color": "Green"
        },
        "ZeitRollos": {
            "protocol": [ "generic_label" ],
            "id": [{
                "id": 113
            }],
            "label": "22:00 bis 7:00",
            "color": "Green"
        },
        "ZeitUrlaubEG": {
            "protocol": [ "generic_label" ],
            "id": [{
                "id": 114
            }],
            "label": "nicht aktiv",
            "color": "Gray"
        },
        "ZeitUrlaubOG": {
            "protocol": [ "generic_label" ],
            "id": [{
                "id": 115
            }],
            "label": "nicht aktiv",
            "color": "Gray"
        },
        "ZeitTest1": {
            "protocol": [ "generic_label" ],
            "id": [{
                "id": 116
            }],
            "label": "18.5412",
            "color": "black"
        },
        "ZeitTest2": {
            "protocol": [ "generic_label" ],
            "id": [{
                "id": 117
            }],
            "label": "---",
            "color": "black"
        },
        "ZeitRolloZu": {
            "protocol": [ "generic_label" ],
            "id": [{
                "id": 118
            }],
            "label": "11.4800",
            "color": "black"
        },
        "ZeitRolloAuf": {
            "protocol": [ "generic_label" ],
            "id": [{
                "id": 119
            }],
            "label": "7.0000",
            "color": "black"
        },
        "Currentdatetime": {
            "protocol": [ "datetime" ],
            "id": [{
                "longitude": 8.675,
                "latitude": 49.991
            }],
            "year": 2018,
            "month": 5,
            "day": 18,
            "hour": 18,
            "minute": 54,
            "second": 12,
            "weekday": 6,
            "dst": 1
        },
        "Sunriseset": {
            "protocol": [ "sunriseset" ],
            "id": [{
                "longitude": 8.675,
                "latitude": 49.991
            }],
            "sunrise": 5.36,
            "sunset": 21.10,
            "sun": "rise"
        },
        "webcam": {
            "protocol": [ "generic_webcam" ],
            "id": [{
                "id": 120
            }],
            "poll-interval": 1,
            "url": "http://192.168.2.77/webcapture.jpg?command=snap&channel=1[112233]"
        }
    },
    "rules": {
        "SetLabelTest1": {
            "rule": "IF Currentdatetime.second != -1 THEN label DEVICE ZeitTest1 TO DATE_FORMAT(Currentdatetime, %H.%M%S)",
            "active": 1
        },
        "SetLabelTest2": {
            "rule": "IF DATE_FORMAT(Currentdatetime, %H.%M%S) == '19.0600' THEN label DEVICE ZeitTest2 TO 'angeschaltet'",
            "active": 1
        },
        "SetArbeitstagAn": {
            "rule": "IF Currentdatetime.weekday == 3 OR Currentdatetime.weekday == 5 OR Currentdatetime.weekday == 6 THEN switch DEVICE Arbeitstag TO on",
            "active": 1
        },
        "SetArbeitstagAus": {
            "rule": "IF Currentdatetime.weekday == 2 OR Currentdatetime.weekday == 4 OR Currentdatetime.weekday == 7 OR Currentdatetime.weekday == 1 THEN switch DEVICE Arbeitstag TO off",
            "active": 1
        },
        "SetLabelEGArbeit1": {
            "rule": "IF Currentdatetime.second != -1 AND Sunriseset.sunset < '17.30' THEN label DEVICE ZeitEGArbeit TO 'ab 18:15'",
            "active": 1
        },
        "SetLabelEGArbeit2": {
            "rule": "IF Currentdatetime.second != -1 AND Sunriseset.sunset >= '17.30' THEN label DEVICE ZeitEGArbeit TO 'ab Sunset - 0:45'",
            "active": 1
        },
        "SetLabelEG1": {
            "rule": "IF Currentdatetime.second != -1 AND TimerEG.state == on AND TimerUrlaub.state == off AND Arbeitstag.state == on THEN label DEVICE ZeitEGDiDoFr TO ZeitEGArbeit.label COLOR Green",
            "active": 1
        },
        "SetLabelEG2": {
            "rule": "IF Currentdatetime.second != -1 AND TimerEG.state == on AND TimerUrlaub.state == off AND Arbeitstag.state == off THEN label DEVICE ZeitEGDiDoFr TO ZeitEGArbeit.label COLOR Gray",
            "active": 1
        },
        "SetLabelEG3": {
            "rule": "IF Currentdatetime.second != -1 AND TimerEG.state == on AND TimerUrlaub.state == off AND Arbeitstag.state == on THEN label DEVICE ZeitEGMoMiWo TO 'ab Sunset - 0:45' COLOR Gray",
            "active": 1
        },
        "SetLabelEG4": {
            "rule": "IF Currentdatetime.second != -1 AND TimerEG.state == on AND TimerUrlaub.state == off AND Arbeitstag.state == off THEN label DEVICE ZeitEGMoMiWo TO 'ab Sunset - 0:45' COLOR Green",
            "active": 1
        },
        "SetLabelEG5": {
            "rule": "IF Currentdatetime.second != -1 AND TimerEG.state == off AND TimerUrlaub.state == off THEN label DEVICE ZeitEGDiDoFr TO 'nicht aktiv' COLOR Gray",
            "active": 1
        },
        "SetLabelEG6": {
            "rule": "IF Currentdatetime.second != -1 AND TimerEG.state == off AND TimerUrlaub.state == off THEN label DEVICE ZeitEGMoMiWo TO 'nicht aktiv' COLOR Gray",
            "active": 1
        },
        "SetLabelOG1": {
            "rule": "IF Currentdatetime.second != -1 AND TimerOG.state == on AND TimerUrlaub.state == off THEN label DEVICE ZeitOG TO 'Sunset bis 23:00' COLOR Green",
            "active": 1
        },
        "SetLabelOG2": {
            "rule": "IF Currentdatetime.second != -1 AND TimerOG.state == off AND TimerUrlaub.state == off THEN label DEVICE ZeitOG TO 'nicht aktiv' COLOR Gray",
            "active": 1
        },
        "SetLabelRollos1": {
            "rule": "IF Currentdatetime.second != -1 AND TimerRollos.state == on THEN label DEVICE ZeitRollos TO '22:00 bis 7:00' COLOR Green",
            "active": 1
        },
        "SetLabelRollos2": {
            "rule": "IF Currentdatetime.second != -1 AND TimerRollos.state == off THEN label DEVICE ZeitRollos TO 'nicht aktiv' COLOR Gray",
            "active": 1
        },
        "SetLabelUrlaubEG1": {
            "rule": "IF TimerUrlaub.state == off THEN label DEVICE ZeitUrlaubEG TO 'nicht aktiv' COLOR Gray",
            "active": 1
        },
        "SetLabelUrlaubEG2": {
            "rule": "IF TimerUrlaub.state == on THEN label DEVICE ZeitUrlaubEG TO 'Sunset-0:45 bis 22:00~0:20' COLOR Green",
            "active": 1
        },
        "SetLabelUrlaubEG3": {
            "rule": "IF TimerUrlaub.state == on THEN label DEVICE ZeitEGDiDoFr TO 'Urlaub' COLOR Red",
            "active": 1
        },
        "SetLabelUrlaubEG4": {
            "rule": "IF TimerUrlaub.state == on THEN label DEVICE ZeitEGMoMiWo TO 'Urlaub' COLOR Red",
            "active": 1
        },
        "SetLabelUrlaubOG1": {
            "rule": "IF TimerUrlaub.state == off THEN label DEVICE ZeitUrlaubOG TO 'nicht aktiv' COLOR Gray",
            "active": 1
        },
        "SetLabelUrlaubOG2": {
            "rule": "IF TimerUrlaub.state == on THEN label DEVICE ZeitUrlaubOG TO '21:45 bis 23:00~0:20' COLOR Green",
            "active": 1
        },
        "SetLabelUrlaubOG3": {
            "rule": "IF TimerUrlaub.state == on THEN label DEVICE ZeitOG TO 'Urlaub' COLOR Red",
            "active": 1
        },
        "TimerEGDiDoFrAn1": {
            "rule": "IF TimerUrlaub.state == off AND TimerEG.state == on AND Arbeitstag.state == on AND Sunriseset.sunset < '17.30' AND DATE_FORMAT(Currentdatetime, %H.%M%S) == '18.1500' THEN switch DEVICE Alles TO on",
            "active": 1
        },
        "TimerEGDiDoFrAn2": {
            "rule": "IF TimerUrlaub.state == off AND TimerEG.state == on AND Arbeitstag.state == on AND Sunriseset.sunset >= '17.30' AND DATE_FORMAT( DATE_ADD(Currentdatetime, '+45 MINUTE'), '%Y-%m-%d %H:%M:%S', %H.%M) == Sunriseset.sunset THEN switch DEVICE Alles TO on",
            "active": 1
        },
        "TimerEGDiDoFrAn3": {
            "rule": "IF TimerUrlaub.state == off AND TimerEG.state == on AND Arbeitstag.state == on AND Sunriseset.sunset < '17.30' AND DATE_FORMAT(Currentdatetime, %H.%M%S) == '18.1500' THEN switch DEVICE Diele TO on AFTER '1200 MILLISECOND'",
            "active": 1
        },
        "TimerEGDiDoFrAn4": {
            "rule": "IF TimerUrlaub.state == off AND TimerEG.state == on AND Arbeitstag.state == on AND Sunriseset.sunset >= '17.30' AND DATE_FORMAT( DATE_ADD(Currentdatetime, '+45 MINUTE'), '%Y-%m-%d %H:%M:%S', %H.%M) == Sunriseset.sunset THEN switch DEVICE Diele TO on AFTER '1200 MILLISECOND'",
            "active": 1
        },
        "TimerEGMoMiWoAn1": {
            "rule": "IF TimerUrlaub.state == off AND TimerEG.state == on AND Arbeitstag.state == off AND DATE_FORMAT( DATE_ADD(Currentdatetime, '+45 MINUTE'), '%Y-%m-%d %H:%M:%S', %H.%M) == Sunriseset.sunset THEN switch DEVICE Alles TO on",
            "active": 1
        },
        "TimerEGMoMiWoAn2": {
            "rule": "IF TimerUrlaub.state == off AND TimerEG.state == on AND Arbeitstag.state == off AND DATE_FORMAT( DATE_ADD(Currentdatetime, '+44 MINUTE'), '%Y-%m-%d %H:%M:%S', %H.%M) == Sunriseset.sunset THEN switch DEVICE Diele TO on",
            "active": 1
        },
        "TimerUrlaubEGAn1": {
            "rule": "IF TimerUrlaub.state == on AND DATE_FORMAT( DATE_ADD(Currentdatetime, '+55 MINUTE'), '%Y-%m-%d %H:%M:%S', %H.%M) == Sunriseset.sunset THEN switch DEVICE Kueche TO on AFTER RANDOM(0,20) . 'MINUTE'",
            "active": 1
        },
        "TimerUrlaubEGAn2": {
            "rule": "IF TimerUrlaub.state == on AND DATE_FORMAT( DATE_ADD(Currentdatetime, '+55 MINUTE'), '%Y-%m-%d %H:%M:%S', %H.%M) == Sunriseset.sunset THEN switch DEVICE Esszimmer TO on AFTER RANDOM(0,20) . 'MINUTE'",
            "active": 1
        },
        "TimerUrlaubEGAn3": {
            "rule": "IF TimerUrlaub.state == on AND DATE_FORMAT( DATE_ADD(Currentdatetime, '+55 MINUTE'), '%Y-%m-%d %H:%M:%S', %H.%M) == Sunriseset.sunset THEN switch DEVICE Wohnzimmer TO on AFTER RANDOM(0,20) . 'MINUTE'",
            "active": 1
        },
        "TimerUrlaubEGAn4": {
            "rule": "IF TimerUrlaub.state == on AND DATE_FORMAT( DATE_ADD(Currentdatetime, '+55 MINUTE'), '%Y-%m-%d %H:%M:%S', %H.%M) == Sunriseset.sunset THEN switch DEVICE Diele TO on AFTER RANDOM(0,20) . 'MINUTE'",
            "active": 1
        },
        "TimerUrlaubEGAus1": {
            "rule": "IF TimerUrlaub.state == on AND DATE_FORMAT(Currentdatetime, %H.%M%S) == '21.5000' THEN switch DEVICE Kueche TO off AFTER RANDOM(0,20) . 'MINUTE'",
            "active": 1
        },
        "TimerUrlaubEGAus2": {
            "rule": "IF TimerUrlaub.state == on AND DATE_FORMAT(Currentdatetime, %H.%M%S) == '21.5000' THEN switch DEVICE Esszimmer TO off AFTER RANDOM(0,20) . 'MINUTE'",
            "active": 1
        },
        "TimerUrlaubEGAus3": {
            "rule": "IF TimerUrlaub.state == on AND DATE_FORMAT(Currentdatetime, %H.%M%S) == '21.5000' THEN switch DEVICE Wohnzimmer TO off AFTER RANDOM(0,20) . 'MINUTE'",
            "active": 1
        },
        "TimerUrlaubEGAus4": {
            "rule": "IF TimerUrlaub.state == on AND DATE_FORMAT(Currentdatetime, %H.%M%S) == '21.5000' THEN switch DEVICE Diele TO off AFTER RANDOM(0,20) . 'MINUTE'",
            "active": 1
        },
        "TimerOGAn": {
            "rule": "IF TimerUrlaub.state == off AND TimerOG.state == on AND Currentdatetime.second == 0 AND DATE_FORMAT(Currentdatetime, %H.%M) == Sunriseset.sunset THEN switch DEVICE SteckdoseEckig2 TO on",
            "active": 1
        },
        "TimerOGAus": {
            "rule": "IF TimerUrlaub.state == off AND TimerOG.state == on AND Currentdatetime.hour == 23 AND Currentdatetime.minute == 0 AND Currentdatetime.second == 0 THEN switch DEVICE SteckdoseEckig2 TO off",
            "active": 1
        },
        "TimerUrlaubOGAnAus": {
            "rule": "IF TimerUrlaub.state == on AND DATE_FORMAT(Currentdatetime, %H.%M%S) == '21.3500' THEN switch DEVICE SteckdoseEckig2 TO on AFTER RANDOM(0,20) . 'MINUTE' FOR RANDOM(65,85) . 'MINUTE'",
            "active": 1
        },
        "TimerRolloZu1": {
            "rule": "IF TimerRollos.state == on AND Currentdatetime.hour == 22 AND Currentdatetime.minute == 0 AND Currentdatetime.second == 0 THEN switch DEVICE RolloEsszimmer TO down",
            "active": 1
        },
        "TimerRolloZu2": {
            "rule": "IF TimerRollos.state == on AND Currentdatetime.hour == 22 AND Currentdatetime.minute == 0 AND Currentdatetime.second == 0 THEN switch DEVICE RolloKlavier TO down AFTER '400 MILLISECOND'",
            "active": 1
        },
        "TimerRolloZu3": {
            "rule": "IF TimerRollos.state == on AND Currentdatetime.hour == 22 AND Currentdatetime.minute == 0 AND Currentdatetime.second == 0 THEN switch DEVICE RolloCouch TO down AFTER '800 MILLISECOND'",
            "active": 1
        },
        "TimerRolloZu4": {
            "rule": "IF TimerRollos.state == on AND Currentdatetime.hour == 22 AND Currentdatetime.minute == 0 AND Currentdatetime.second == 0 THEN switch DEVICE RolloHof TO down AFTER '1200 MILLISECOND'",
            "active": 1
        },
        "TimerRolloAuf1": {
            "rule": "IF TimerRollos.state == on AND Currentdatetime.hour == 7 AND Currentdatetime.minute == 0 AND Currentdatetime.second == 0 THEN switch DEVICE RolloEsszimmer TO up",
            "active": 1
        },
        "TimerRolloAuf2": {
            "rule": "IF TimerRollos.state == on AND Currentdatetime.hour == 7 AND Currentdatetime.minute == 0 AND Currentdatetime.second == 0 THEN switch DEVICE RolloKlavier TO up AFTER '400 MILLISECOND'",
            "active": 1
        },
        "TimerRolloAuf3": {
            "rule": "IF TimerRollos.state == on AND Currentdatetime.hour == 7 AND Currentdatetime.minute == 0 AND Currentdatetime.second == 0 THEN switch DEVICE RolloCouch TO up AFTER '800 MILLISECOND'",
            "active": 1
        },
        "TimerRolloAuf4": {
            "rule": "IF TimerRollos.state == on AND Currentdatetime.hour == 7 AND Currentdatetime.minute == 0 AND Currentdatetime.second == 0 THEN switch DEVICE RolloHof TO up AFTER '1200 MILLISECOND'",
            "active": 1
        },
        "DieleAn1": {
            "rule": "IF Diele.state == on THEN switch DEVICE SteckdoseRund1 TO on",
            "active": 1
        },
        "DieleAn2": {
            "rule": "IF Diele.state == on THEN switch DEVICE SteckdoseRund2 TO on AFTER '400 MILLISECOND'",
            "active": 1
        },
        "DieleAus1": {
            "rule": "IF Diele.state == off THEN switch DEVICE SteckdoseRund1 TO off",
            "active": 1
        },
        "DieleAus2": {
            "rule": "IF Diele.state == off THEN switch DEVICE SteckdoseRund2 TO off AFTER '400 MILLISECOND'",
            "active": 1
        },
        "AllesAn1": {
            "rule": "IF Alles.state == on THEN switch DEVICE Kueche TO on",
            "active": 1
        },
        "AllesAn2": {
            "rule": "IF Alles.state == on THEN switch DEVICE Esszimmer TO on AFTER '400 MILLISECOND'",
            "active": 1
        },
        "AllesAn3": {
            "rule": "IF Alles.state == on THEN switch DEVICE Wohnzimmer TO on AFTER '800 MILLISECOND'",
            "active": 1
        },
        "AllesAus1": {
            "rule": "IF Alles.state == off THEN switch DEVICE Kueche TO off",
            "active": 1
        },
        "AllesAus2": {
            "rule": "IF Alles.state == off THEN switch DEVICE Esszimmer TO off AFTER '400 MILLISECOND'",
            "active": 1
        },
        "AllesAus3": {
            "rule": "IF Alles.state == off THEN switch DEVICE Wohnzimmer TO off AFTER '800 MILLISECOND'",
            "active": 1
        },
        "RolloAllesZu1": {
            "rule": "IF RolloAlles.state == down THEN switch DEVICE RolloEsszimmer TO down",
            "active": 1
        },
        "RolloAllesZu2": {
            "rule": "IF RolloAlles.state == down THEN switch DEVICE RolloKlavier TO down AFTER '400 MILLISECOND'",
            "active": 1
        },
        "RolloAllesZu3": {
            "rule": "IF RolloAlles.state == down THEN switch DEVICE RolloCouch TO down AFTER '800 MILLISECOND'",
            "active": 1
        },
        "RolloAllesZu4": {
            "rule": "IF RolloAlles.state == down THEN switch DEVICE RolloHof TO down AFTER '1200 MILLISECOND'",
            "active": 1
        },
        "RolloAllesAuf1": {
            "rule": "IF RolloAlles.state == up THEN switch DEVICE RolloEsszimmer TO up",
            "active": 1
        },
        "RolloAllesAuf2": {
            "rule": "IF RolloAlles.state == up THEN switch DEVICE RolloKlavier TO up AFTER '400 MILLISECOND'",
            "active": 1
        },
        "RolloAllesAuf3": {
            "rule": "IF RolloAlles.state == up THEN switch DEVICE RolloCouch TO up AFTER '800 MILLISECOND'",
            "active": 1
        },
        "RolloAllesAuf4": {
            "rule": "IF RolloAlles.state == up THEN switch DEVICE RolloHof TO up AFTER '1200 MILLISECOND'",
            "active": 1
        }
    },
    "gui": {
        "Alles": {
            "name": "Alles",
            "group": [ "Licht" ],
            "media": [ "all" ],
            "readonly": 0
        },
        "Wohnzimmer": {
            "name": "Wohnzimmer",
            "group": [ "Licht" ],
            "media": [ "all" ],
            "readonly": 0
        },
        "Esszimmer": {
            "name": "Esszimmer",
            "group": [ "Licht" ],
            "media": [ "all" ],
            "readonly": 0
        },
        "Kueche": {
            "name": "Küche",
            "group": [ "Licht" ],
            "media": [ "all" ],
            "readonly": 0
        },
        "Diele": {
            "name": "Diele",
            "group": [ "Licht" ],
            "media": [ "all" ],
            "readonly": 0
        },
        "SteckdoseEckig1": {
            "name": "Astrid",
            "group": [ "Licht" ],
            "media": [ "all" ],
            "readonly": 0
        },
        "SteckdoseEckig2": {
            "name": "Schlafzimmer",
            "group": [ "Licht" ],
            "media": [ "all" ],
            "readonly": 0
        },
        "RolloAlles": {
            "name": "Alles",
            "group": [ "Rollos" ],
            "media": [ "all" ],
            "readonly": 0
        },
        "RolloEsszimmer": {
            "name": "Esszimmer",
            "group": [ "Rollos" ],
            "media": [ "all" ],
            "readonly": 0
        },
        "RolloKlavier": {
            "name": "Klavier",
            "group": [ "Rollos" ],
            "media": [ "all" ]
        },
        "RolloCouch": {
            "name": "Couch",
            "group": [ "Rollos" ],
            "media": [ "all" ]
        },
        "RolloHof": {
            "name": "Hof",
            "group": [ "Rollos" ],
            "media": [ "all" ]
        },
        "DieleNeu1": {
            "name": "DieleNeu1",
            "group": [ "Steckdose" ],
            "media": [ "all" ],
            "readonly": 0
        },
        "DieleNeu2": {
            "name": "DieleNeu2",
            "group": [ "Steckdose" ],
            "media": [ "all" ],
            "readonly": 0
        },
        "SteckdoseRund3": {
            "name": "Rund 3",
            "group": [ "Steckdose" ],
            "media": [ "all" ],
            "readonly": 0
        },
        "SteckdoseEckig3": {
            "name": "Eckig 3",
            "group": [ "Steckdose" ],
            "media": [ "all" ],
            "readonly": 0
        },
        "Sunriseset": {
            "name": "Sonnenauf/untergang",
            "group": [ "Modus" ],
            "media": [ "all" ]
        },
        "TimerEG": {
            "name": "Timer EG",
            "group": [ "Modus" ],
            "media": [ "all" ],
            "readonly": 0
        },
        "ZeitEGDiDoFr": {
            "name": "Zeit EG Di,Do,Fr",
            "group": [ "Modus" ],
            "media": [ "all" ]
        },
        "ZeitEGMoMiWo": {
            "name": "Zeit EG Mo,Mi,Wo",
            "group": [ "Modus" ],
            "media": [ "all" ]
        },
        "TimerOG": {
            "name": "Timer OG",
            "group": [ "Modus" ],
            "media": [ "all" ],
            "readonly": 0
        },
        "ZeitOG": {
            "name": "Zeit OG",
            "group": [ "Modus" ],
            "media": [ "all" ]
        },
        "TimerRollos": {
            "name": "Timer Rollos",
            "group": [ "Modus" ],
            "media": [ "all" ],
            "readonly": 0
        },
        "ZeitRollos": {
            "name": "Zeit Rollos",
            "group": [ "Modus" ],
            "media": [ "all" ]
        },
        "TimerUrlaub": {
            "name": "Timer Urlaub",
            "group": [ "Modus" ],
            "media": [ "all" ],
            "readonly": 0
        },
        "ZeitUrlaubEG": {
            "name": "Zeit EG",
            "group": [ "Modus" ],
            "media": [ "all" ]
        },
        "ZeitUrlaubOG": {
            "name": "Zeit OG",
            "group": [ "Modus" ],
            "media": [ "all" ]
        },
        "ZeitTest1": {
            "name": "Test1",
            "group": [ "Modus" ],
            "media": [ "all" ]
        },
        "ZeitTest2": {
            "name": "Test2",
            "group": [ "Modus" ],
            "media": [ "all" ]
        },
        "ZeitEGArbeit": {
            "name": "ZeitEGArbeit",
            "group": [ "Modus" ],
            "media": [ "all" ]
        },
        "Arbeitstag": {
            "name": "Arbeitstag",
            "group": [ "Modus" ],
            "media": [ "all" ]
        },
        "Version": {
            "name": "Version",
            "group": [ "Modus" ],
            "media": [ "all" ]
        },
        "webcam": {
            "name": "Tor",
            "group": [ "Webcam" ],
            "media": [ "all" ]
        }
    },
    "settings": {
        "log-level": 6,
        "pid-file": "/var/run/pilight.pid",
        "log-file": "/var/log/pilight.log",
        "webserver-enable": 1,
        "webserver-root": "/usr/local/share/pilight/webgui",
        "webserver-http-port": 5001,
        "webserver-https-port": 5002,
        "webserver-cache": 1,
        "gpio-platform": "raspberrypi3"
    },
    "hardware": {
        "433gpio": {
            "sender": 0,
            "receiver": 1
        }
    },
    "registry": {
        "webserver": {
            "ssl": {
                "certificate": {
                    "secure": 0,
                    "location": "/etc/pilight/pilight.pem"
                }
            }
        },
        "webgui": {
            "tabs": 1
        },
        "pilight": {
            "version": {
                "current": "8.0.10"
            }
        }
    }
}

Maybe the dot is misinterpreted as concatenation or its a problem with the german language setting, which has a comma as separator

Any help is highly appreciated

Uli
 
Reply
#2
Just change it to this:
Code:
[code]%H%M%S) == 185600

[/code]
 
Reply
#3
Thanks curlymo for the fast response. I've just changed my config according to your suggestion and everything seems to work fine.
One more remark. If I habe an error like missing quotes in a multiword labeltext, I get a message in pilight.err and in debugoutput. But the error with the decimal is only shown in debug, but missing from pilight.err
Code:
pilight.err
[May 19 09:43:14:852534] pilight-daemon: INFO: rule #1 Test1 was parsed in 0.011958 seconds
[May 19 09:43:14:852618] pilight-daemon: INFO: rule #2 Test2 was parsed in 0.008407 seconds
[May 19 09:43:14:852700] pilight-daemon: ERROR:
... ZeitTest2 TO abc def
                    ^ unexpected symbol, expected an action argument
[May 19 09:43:14:852781] pilight-daemon: INFO: rule #3 Test3 was parsed in 0.008352 seconds


pilight.err
[May 19 09:44:23:898712] pilight-daemon: INFO: rule #1 Test1 was parsed in 0.012100 seconds
[May 19 09:44:23:898796] pilight-daemon: INFO: rule #2 Test2 was parsed in 0.008324 seconds
[May 19 09:44:23:898876] pilight-daemon: INFO: rule #3 Test3 was parsed in 0.008354 seconds


Debugoutput
[May 19 07:45:46:311580] pilight-daemon: INFO: rule #1 Test1 was parsed in 0.006702 seconds
[May 19 07:45:46:315902] pilight-daemon: INFO: rule #2 Test2 was parsed in 0.004248 seconds
[May 19 07:45:46:320299] pilight-daemon: INFO: rule #3 Test3 was parsed in 0.004360 seconds
[May 19 07:45:46:330709] pilight-daemon: ERROR:
... DATE_FORMAT(Currentdatetime, %H.%M%S) == 9.4000 THEN SWITCH DEVICE Wohnzimmer TO on
                                                   ^ unexpected symbol, expected a condition

Is the rejection of decimal numbers a bug to be solved or by design? If by design it should be mentioned in the manual under eventing and the time-based examples should reflect the new bevavior.

Thanks again Uli
 
Reply
#4
I will push a new commit this week fixing this issue. Done.
 
Reply
  


Possibly Related Threads...
Thread Author Replies Views Last Post
  hardware module issues in nightly apartmedia 17 1,064 04-05-2019, 06:59 PM
Last Post: curlymo
  [SOLVED] pilight wont start since update from 8.0.8 to 8.1.2 pukington 5 1,549 08-08-2018, 05:34 PM
Last Post: curlymo
  Cannot start service after update to 8.0.8 mezen 5 850 05-24-2018, 07:46 PM
Last Post: curlymo
  Updates for nightly Ulrich.Arnold 1 531 01-26-2018, 07:31 PM
Last Post: curlymo
  System update from pilight v7 to pilight v8 chrisch30 6 1,981 01-09-2018, 07:20 PM
Last Post: curlymo
  teknihall - no update in gui (7/8) terrar 9 1,215 12-31-2017, 12:33 PM
Last Post: terrar
  Problem with sending after plight (or raspberry?) update _Jens_ 5 2,003 09-08-2017, 03:14 PM
Last Post: pilino1234
  how to complete remove nightly terrar 8 5,381 04-03-2016, 07:04 PM
Last Post: mvasi90
  new install fails - dev/nightly gneandr 11 9,179 01-29-2016, 11:30 AM
Last Post: WEBcast
  pilight7 from Stable --> Nightly gneandr 10 3,084 01-19-2016, 04:15 PM
Last Post: gneandr

Forum Jump:


Browsing: 1 Guest(s)