• 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


Triggering generic_switch leads to segfault
#1
(10-06-2019, 12:19 PM)curlymo Wrote: You're right. It seems that the armhf builds fail someone. The other builds are compiled.



I've updated the repositories again.

Hi curlymo!

Yesterday the 8.1.5-37 update was available. I upgraded from 8.1.4-85 to this version. I first tested without any MQTT or Shelly-changes with my existing config. Normal elro_800_switches still work fine. But if I switch the generic switch for Diele, pilight crashes with Speicherzugriffsfehler (memory access violation). This is my existing config
Code:
{
    "devices": {
        "Version": {
            "protocol": [ "generic_label" ],
            "id": [{
                "id": 198
            }],
            "label": "21.09.2019",
            "color": "blue"
        },
        "ZeitEGArbeit": {
            "protocol": [ "generic_label" ],
            "id": [{
                "id": 199
            }],
            "label": "ab Sunset - 0:45",
            "color": "black"
        },
        "Arbeitstag": {
            "protocol": [ "generic_switch" ],
            "id": [{
                "id": 200
            }],
            "state": "off"
        },
        "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"
        },
        "Weihnachtsbaum": {
            "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"
        },
        "ShellyKuechenlichtOn": {
            "protocol": [ "program" ],
            "id": [{
                "name": "ShellyKuechenlichtOn"
            }],
            "program": "php /home/pi/ShellyAction.php",
            "arguments": "",
            "stop-command": "",
            "start-command": "php /home/pi/ShellyAction.php Kuechenlicht relay/0?turn=on",
            "state": "stopped",
            "pid": 0
        },
        "ShellyKuechenlichtOff": {
            "protocol": [ "program" ],
            "id": [{
                "name": "ShellyKuechenlichtOff"
            }],
            "program": "php /home/pi/ShellyAction.php",
            "arguments": "",
            "stop-command": "",
            "start-command": "php /home/pi/ShellyAction.php Kuechenlicht relay/0?turn=off",
            "state": "stopped",
            "pid": 0
        },
        "ShellyKueche": {
            "protocol": [ "generic_switch" ],
            "id": [{
                "id": 96
            }],
            "state": "on"
        },
        "ShellyHoflichtOn": {
            "protocol": [ "program" ],
            "id": [{
                "name": "ShellyHoflichtOn"
            }],
            "program": "php /home/pi/ShellyAction.php",
            "arguments": "",
            "stop-command": "",
            "start-command": "php /home/pi/ShellyAction.php Hoflicht relay/0?turn=on",
            "state": "stopped",
            "pid": 0
        },
        "ShellyHoflichtOff": {
            "protocol": [ "program" ],
            "id": [{
                "name": "ShellyHoflichtOff"
            }],
            "program": "php /home/pi/ShellyAction.php",
            "arguments": "",
            "stop-command": "",
            "start-command": "php /home/pi/ShellyAction.php Hoflicht relay/0?turn=off",
            "state": "stopped",
            "pid": 0
        },
        "Hof": {
            "protocol": [ "generic_switch" ],
            "id": [{
                "id": 97
            }],
            "state": "off"
        },
        "ShellyEsszimmerRolloRauf": {
            "protocol": [ "program" ],
            "id": [{
                "name": "ShellyEsszimmerRolloRauf"
            }],
            "program": "php /home/pi/ShellyAction.php",
            "arguments": "",
            "stop-command": "",
            "start-command": "php /home/pi/ShellyAction.php Esszimmerrollo roller/0?go=open",
            "state": "stopped",
            "pid": 0
        },
        "ShellyEsszimmerRolloSchatten": {
            "protocol": [ "program" ],
            "id": [{
                "name": "ShellyEsszimmerRolloSchatten"
            }],
            "program": "php /home/pi/ShellyAction.php",
            "arguments": "",
            "stop-command": "",
            "start-command": "php /home/pi/ShellyAction.php Esszimmerrollo roller/0?go=to_pos&50",
            "state": "stopped",
            "pid": 0
        },
        "ShellyEsszimmerRolloRunter": {
            "protocol": [ "program" ],
            "id": [{
                "name": "ShellyEsszimmerRolloRunter"
            }],
            "program": "php /home/pi/ShellyAction.php",
            "arguments": "",
            "stop-command": "",
            "start-command": "php /home/pi/ShellyAction.php Esszimmerrollo roller/0?go=close",
            "state": "stopped",
            "pid": 0
        },
        "ShellyKlavierRolloRauf": {
            "protocol": [ "program" ],
            "id": [{
                "name": "ShellyKlavierRolloRauf"
            }],
            "program": "php /home/pi/ShellyAction.php",
            "arguments": "",
            "stop-command": "",
            "start-command": "php /home/pi/ShellyAction.php Klavierrollo roller/0?go=open",
            "state": "stopped",
            "pid": 0
        },
        "ShellyKlavierRolloSchatten": {
            "protocol": [ "program" ],
            "id": [{
                "name": "ShellyKlavierRolloSchatten"
            }],
            "program": "php /home/pi/ShellyAction.php",
            "arguments": "",
            "stop-command": "",
            "start-command": "php /home/pi/ShellyAction.php Klavierrollo roller/0?go=to_pos&50",
            "state": "stopped",
            "pid": 0
        },
        "ShellyKlavierRolloRunter": {
            "protocol": [ "program" ],
            "id": [{
                "name": "ShellyKlavierRolloRunter"
            }],
            "program": "php /home/pi/ShellyAction.php",
            "arguments": "",
            "stop-command": "",
            "start-command": "php /home/pi/ShellyAction.php Klavierrollo roller/0?go=close",
            "state": "stopped",
            "pid": 0
        },
        "ShellyCouchRolloRauf": {
            "protocol": [ "program" ],
            "id": [{
                "name": "ShellyCouchRolloRauf"
            }],
            "program": "php /home/pi/ShellyAction.php",
            "arguments": "",
            "stop-command": "",
            "start-command": "php /home/pi/ShellyAction.php Couchrollo roller/0?go=open",
            "state": "stopped",
            "pid": 0
        },
        "ShellyCouchRolloSchatten": {
            "protocol": [ "program" ],
            "id": [{
                "name": "ShellyCouchRolloSchatten"
            }],
            "program": "php /home/pi/ShellyAction.php",
            "arguments": "",
            "stop-command": "",
            "start-command": "php /home/pi/ShellyAction.php Couchrollo roller/0?go=to_pos&50",
            "state": "stopped",
            "pid": 0
        },
        "ShellyCouchRolloRunter": {
            "protocol": [ "program" ],
            "id": [{
                "name": "ShellyCouchRolloRunter"
            }],
            "program": "php /home/pi/ShellyAction.php",
            "arguments": "",
            "stop-command": "",
            "start-command": "php /home/pi/ShellyAction.php Couchrollo roller/0?go=close",
            "state": "stopped",
            "pid": 0
        },
        "ShellyHofRolloRauf": {
            "protocol": [ "program" ],
            "id": [{
                "name": "ShellyHofRolloRauf"
            }],
            "program": "php /home/pi/ShellyAction.php",
            "arguments": "",
            "stop-command": "",
            "start-command": "php /home/pi/ShellyAction.php Hofrollo roller/0?go=open",
            "state": "stopped",
            "pid": 0
        },
        "ShellyHofRolloSchatten": {
            "protocol": [ "program" ],
            "id": [{
                "name": "ShellyHofRolloSchatten"
            }],
            "program": "php /home/pi/ShellyAction.php",
            "arguments": "",
            "stop-command": "",
            "start-command": "php /home/pi/ShellyAction.php Hofrollo roller/0?go=to_pos&50",
            "state": "stopped",
            "pid": 0
        },
        "ShellyHofRolloRunter": {
            "protocol": [ "program" ],
            "id": [{
                "name": "ShellyHofRolloRunter"
            }],
            "program": "php /home/pi/ShellyAction.php",
            "arguments": "",
            "stop-command": "",
            "start-command": "php /home/pi/ShellyAction.php Hofrollo roller/0?go=close",
            "state": "stopped",
            "pid": 0
        },
        "ShellyHofRollo": {
            "protocol": [ "generic_screen" ],
            "id": [{
                "id": 95
            }],
            "state": "up"
        },
        "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": "off"
        },
        "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": "Gray"
        },
        "ZeitEGMoMiWo": {
            "protocol": [ "generic_label" ],
            "id": [{
                "id": 111
            }],
            "label": "ab Sunset - 0:45",
            "color": "Green"
        },
        "ZeitOG": {
            "protocol": [ "generic_label" ],
            "id": [{
                "id": 112
            }],
            "label": "nicht aktiv",
            "color": "Gray"
        },
        "ZeitRollos": {
            "protocol": [ "generic_label" ],
            "id": [{
                "id": 113
            }],
            "label": "22:00 bis 6:30",
            "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": "213318",
            "color": "black"
        },
        "ZeitTest2": {
            "protocol": [ "generic_label" ],
            "id": [{
                "id": 117
            }],
            "label": "184500",
            "color": "black"
        },
        "Waschmaschine": {
            "protocol": [ "generic_label" ],
            "id": [{
                "id": 118
            }],
            "label": "Aus",
            "color": "red"
        },
        "Trockner": {
            "protocol": [ "generic_label" ],
            "id": [{
                "id": 119
            }],
            "label": "Aus",
            "color": "red"
        },
        "Currentdatetime": {
            "protocol": [ "datetime" ],
            "id": [{
                "longitude": 8.675,
                "latitude": 49.991
            }],
            "year": 2019,
            "month": 9,
            "day": 21,
            "hour": 18,
            "minute": 36,
            "second": 57,
            "weekday": 7,
            "dst": 1
        },
        "Sunriseset": {
            "protocol": [ "sunriseset" ],
            "id": [{
                "longitude": 8.675,
                "latitude": 49.991
            }],
            "sunrise": 7.09,
            "sunset": 19.28,
            "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": {
        "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 * 100 < 1900 THEN label DEVICE ZeitEGArbeit TO 'ab 18:15'",
            "active": 1
        },
        "SetLabelEGArbeit2": {
            "rule": "IF Currentdatetime.second != -1 AND Sunriseset.sunset * 100 >= 1900 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 6:30' 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
        },
        "TimerEGDiDoFrAn": {
            "rule": "IF TimerUrlaub.state == off AND TimerEG.state == on AND Arbeitstag.state == on AND Currentdatetime.second == 0 AND Sunriseset.sunset * 100 < 1900 AND DATE_FORMAT(Currentdatetime, %H%M) == 1815 THEN switch DEVICE Alles TO on",
            "active": 1
        },
        "TimerEGDiDoFrAn2": {
            "rule": "IF TimerUrlaub.state == off AND TimerEG.state == on AND Arbeitstag.state == on AND Currentdatetime.second == 0 AND Sunriseset.sunset * 100 >= 1900 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 Currentdatetime.second == 0 AND Sunriseset.sunset * 100 < 1900 AND DATE_FORMAT(Currentdatetime, %H%M) == 1815 THEN switch DEVICE Diele TO on",
            "active": 1
        },
        "TimerEGDiDoFrAn4": {
            "rule": "IF TimerUrlaub.state == off AND TimerEG.state == on AND Arbeitstag.state == on AND Currentdatetime.second == 0 AND Sunriseset.sunset * 100 >= 1900 AND DATE_FORMAT( DATE_ADD(Currentdatetime, '+45 MINUTE'), '%Y-%m-%d %H:%M:%S', %H.%M) == Sunriseset.sunset THEN switch DEVICE Diele TO on",
            "active": 1
        },
        "TimerEGMoMiWoAn1": {
            "rule": "IF TimerUrlaub.state == off AND TimerEG.state == on AND Arbeitstag.state == off AND Currentdatetime.second == 0 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 Currentdatetime.second == 0 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 Currentdatetime.second == 1 AND DATE_FORMAT( DATE_ADD(Currentdatetime, '+55 MINUTE'), '%Y-%m-%d %H:%M:%S', %H.%M) == Sunriseset.sunset THEN switch DEVICE Kueche AND ShellyKueche TO on AFTER RANDOM(1,20) . ' MINUTE'",
            "active": 1
        },
        "TimerUrlaubEGAn2": {
            "rule": "IF TimerUrlaub.state == on AND Currentdatetime.second == 2 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(1,20) . ' MINUTE'",
            "active": 1
        },
        "TimerUrlaubEGAn3": {
            "rule": "IF TimerUrlaub.state == on AND Currentdatetime.second == 3 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(1,20) . ' MINUTE'",
            "active": 1
        },
        "TimerUrlaubEGAn4": {
            "rule": "IF TimerUrlaub.state == on AND Currentdatetime.second == 4 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(1,20) . ' MINUTE'",
            "active": 1
        },
        "TimerUrlaubEGAus1": {
            "rule": "IF TimerUrlaub.state == on AND Currentdatetime.second == 1 AND DATE_FORMAT(Currentdatetime, %H%M) == 2150 THEN switch DEVICE Kueche AND ShellyKueche TO off AFTER RANDOM(1,20) . ' MINUTE'",
            "active": 1
        },
        "TimerUrlaubEGAus2": {
            "rule": "IF TimerUrlaub.state == on AND Currentdatetime.second == 2 AND DATE_FORMAT(Currentdatetime, %H%M) == 2150 THEN switch DEVICE Esszimmer TO off AFTER RANDOM(1,20) . ' MINUTE'",
            "active": 1
        },
        "TimerUrlaubEGAus3": {
            "rule": "IF TimerUrlaub.state == on AND Currentdatetime.second == 3 AND DATE_FORMAT(Currentdatetime, %H%M) == 2150 THEN switch DEVICE Wohnzimmer TO off AFTER RANDOM(1,20) . ' MINUTE'",
            "active": 1
        },
        "TimerUrlaubEGAus4": {
            "rule": "IF TimerUrlaub.state == on AND Currentdatetime.second == 4 AND DATE_FORMAT(Currentdatetime, %H%M) == 2150 THEN switch DEVICE Diele TO off AFTER RANDOM(1,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.second == 0 AND DATE_FORMAT(Currentdatetime, %H%M) == 2300 THEN switch DEVICE SteckdoseEckig2 TO off",
            "active": 1
        },
        "TimerUrlaubOGAn": {
            "rule": "IF TimerUrlaub.state == on AND Currentdatetime.second == 5 AND DATE_FORMAT(Currentdatetime, %H%M) == 2135 THEN switch DEVICE SteckdoseEckig2 TO on AFTER RANDOM(1,20) . ' MINUTE'",
            "active": 1
        },
        "TimerUrlaubOGAus": {
            "rule": "IF TimerUrlaub.state == on AND Currentdatetime.second == 5 AND DATE_FORMAT(Currentdatetime, %H%M) == 2250 THEN switch DEVICE SteckdoseEckig2 TO off AFTER RANDOM(1,20) . ' MINUTE'",
            "active": 1
        },
        "TimerRolloZu": {
            "rule": "IF TimerRollos.state == on AND Currentdatetime.second == 0 AND DATE_FORMAT(Currentdatetime, %H%M) == 2200 THEN switch DEVICE RolloEsszimmer AND RolloKlavier AND RolloCouch AND RolloHof TO down",
            "active": 1
        },
        "TimerRolloAuf": {
            "rule": "IF TimerRollos.state == on AND Currentdatetime.second == 0 AND DATE_FORMAT(Currentdatetime, %H%M) == 630 THEN switch DEVICE RolloEsszimmer AND RolloKlavier AND RolloCouch AND RolloHof TO up",
            "active": 1
        },
        "KuechenlichtAn": {
            "rule": "IF ShellyKueche.state == on THEN switch DEVICE ShellyKuechenlichtOn TO running",
            "active": 1
        },
        "KuechenlichtAus": {
            "rule": "IF ShellyKueche.state == off THEN switch DEVICE ShellyKuechenlichtOff TO running",
            "active": 1
        },
        "HofAn": {
            "rule": "IF Hof.state == on THEN switch DEVICE ShellyHoflichtOn TO running",
            "active": 1
        },
        "HofAus": {
            "rule": "IF Hof.state == off THEN switch DEVICE ShellyHoflichtOff TO running",
            "active": 1
        },
        "ShellyHofrolloRauf": {
            "rule": "IF ShellyHofRollo.state == up THEN switch DEVICE ShellyHofRolloRauf TO running",
            "active": 1
        },
        "ShellyHofrolloRunter": {
            "rule": "IF ShellyHofRollo.state == down THEN switch DEVICE ShellyHofRolloRunter TO running",
            "active": 1
        },
        "DieleAn": {
            "rule": "IF Diele.state == on THEN switch DEVICE SteckdoseRund1 AND SteckdoseRund2 TO on",
            "active": 1
        },
        "DieleAus": {
            "rule": "IF Diele.state == off THEN switch DEVICE SteckdoseRund1 AND SteckdoseRund2 TO off",
            "active": 1
        },
        "AllesAn": {
            "rule": "IF Alles.state == on THEN switch DEVICE Kueche AND ShellyKueche AND Esszimmer AND Wohnzimmer TO on",
            "active": 1
        },
        "AllesAus": {
            "rule": "IF Alles.state == off THEN switch DEVICE Kueche AND ShellyKueche AND Esszimmer AND Wohnzimmer TO off",
            "active": 1
        },
        "RolloAllesZu": {
            "rule": "IF RolloAlles.state == down THEN switch DEVICE RolloEsszimmer AND RolloKlavier AND RolloCouch AND RolloHof AND ShellyHofRollo TO down",
            "active": 1
        },
        "RolloAllesAuf": {
            "rule": "IF RolloAlles.state == up THEN switch DEVICE RolloEsszimmer AND RolloKlavier AND RolloCouch AND RolloHof AND ShellyHofRollo TO up",
            "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
        },
        "ShellyKueche": {
            "name": "Küche",
            "group": [ "Licht" ],
            "media": [ "all" ],
            "readonly": 0
        },
        "Diele": {
            "name": "Diele",
            "group": [ "Licht" ],
            "media": [ "all" ],
            "readonly": 0
        },
        "Hof": {
            "name": "Hof",
            "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" ]
        },
        "ShellyHofRollo": {
            "name": "Shelly Hof",
            "group": [ "Rollos" ],
            "media": [ "all" ]
        },
        "ShellyHofRolloRauf": {
            "name": "Hof rauf",
            "group": [ "Rollos" ],
            "media": [ "all" ]
        },
        "ShellyHofRolloSchatten": {
            "name": "Hof Beschattung",
            "group": [ "Rollos" ],
            "media": [ "all" ]
        },
        "ShellyHofRolloRunter": {
            "name": "Hof runter",
            "group": [ "Rollos" ],
            "media": [ "all" ]
        },
        "ShellyEsszimmerRolloRauf": {
            "name": "Esszimmer rauf",
            "group": [ "Rollos" ],
            "media": [ "all" ]
        },
        "ShellyEsszimmerRolloSchatten": {
            "name": "Esszimmer Beschattung",
            "group": [ "Rollos" ],
            "media": [ "all" ]
        },
        "ShellyEsszimmerRolloRunter": {
            "name": "Esszimmer runter",
            "group": [ "Rollos" ],
            "media": [ "all" ]
        },
        "ShellyKlavierRolloRauf": {
            "name": "Klavier rauf",
            "group": [ "Rollos" ],
            "media": [ "all" ]
        },
        "ShellyKlavierRolloSchatten": {
            "name": "Klavier Beschattung",
            "group": [ "Rollos" ],
            "media": [ "all" ]
        },
        "ShellyKlavierRolloRunter": {
            "name": "Klavier runter",
            "group": [ "Rollos" ],
            "media": [ "all" ]
        },
        "ShellyCouchRolloRauf": {
            "name": "Couch rauf",
            "group": [ "Rollos" ],
            "media": [ "all" ]
        },
        "ShellyCouchRolloSchatten": {
            "name": "Couch Beschattung",
            "group": [ "Rollos" ],
            "media": [ "all" ]
        },
        "ShellyCouchRolloRunter": {
            "name": "Couch runter",
            "group": [ "Rollos" ],
            "media": [ "all" ]
        },
        "Weihnachtsbaum": {
            "name": "Weihnachtsbaum",
            "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" ]
        },
        "ZeitEGArbeit": {
            "name": "ZeitEGArbeit",
            "group": [ "Modus" ],
            "media": [ "all" ]
        },
        "Arbeitstag": {
            "name": "Arbeitstag",
            "group": [ "Modus" ],
            "media": [ "all" ]
        },
        "Version": {
            "name": "Version",
            "group": [ "Modus" ],
            "media": [ "all" ]
        },
        "Waschmaschine": {
            "name": "Waschmaschine",
            "group": [ "Status" ],
            "media": [ "all" ]
        },
        "Trockner": {
            "name": "Trockner",
            "group": [ "Status" ],
            "media": [ "all" ]
        },
        "webcam": {
            "name": "Tor",
            "group": [ "Status" ],
            "media": [ "all" ]
        }
    },
    "settings": {
        "log-level": 6,
        "pid-file": "/var/run/pilight.pid",
        "log-file": "/var/log/pilight.log",
        "standalone": 1,
        "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": {
        "hardware": {
            "RF433": {
                "mingaplen": 4420,
                "maxgaplen": 72900,
                "minrawlen": 26,
                "maxrawlen": 400
            }
        },
        "pilight": {
            "version": {
                "current": "8.1.4"
            }
        },
        "webserver": {
            "ssl": {
                "certificate": {
                    "location": "/etc/pilight/pilight.pem"
                }
            }
        },
        "webgui": {
            "tabs": 1
        }
    }
}

Diele switches two clarus_switches. The log is appended.

I then downgraded to 8.1.5-stable. This works fine again, but of course here I cannot yet test the shelly's

Uli


Attached Files
.txt   log1std.txt (Size: 137.92 KB / Downloads: 2)
 
Reply
#2
I have no issues when testing it here in my local setup. Can you post a debug log as described in the manual?
https://manual.pilight.org/development/debugging.html
 
Reply
#3
(10-08-2019, 09:34 PM)curlymo Wrote: I have no issues when testing it here in my local setup. Can you post a debug log as described in the manual?
https://manual.pilight.org/development/debugging.html

Hi!

I've tested to switch one clarus-switch without the generic-switch and rule. This works fine.

With the gerneric-switch i get the following gdb-log:
Code:
[Oct 09 11:53:03:310459] DEBUG: socket write succeeded: {"origin":"update","type":1,"uuid":"0000-b8-27-eb-cd7a82","devices":["Diele"],"values":{"timestamp":1570621983,"state":"on"}}

[Oct 09 11:53:03:310546] DEBUG: broadcasted: {"origin":"update","type":1,"uuid":"0000-b8-27-eb-cd7a82","devices":["Diele"],"values":{"timestamp":1570621983,"state":"on"}}
[Oct 09 11:53:03:310745] DEBUG: socket write succeeded: {"origin":"sender","protocol":"generic_switch","message":{"id":99,"state":"on"},"repeat":1,"uuid":"0000-b8-27-eb-cd7a82"}

[Oct 09 11:53:03:310796] DEBUG: broadcasted: {"origin":"sender","protocol":"generic_switch","message":{"id":99,"state":"on"},"repeat":1,"uuid":"0000-b8-27-eb-cd7a82"}
[Oct 09 11:53:03:313887] DEBUG: lua thread on state #1
[Oct 09 11:53:03:314121] INFO: executed rule: DieleAn
[Oct 09 11:53:03:314164] DEBUG: lua thread on state #0
[Oct 09 11:53:03:314178] DEBUG: rule #48 DieleAn was parsed in 0.000899 seconds
[Oct 09 11:53:03:314381] DEBUG: rule #49 DieleAus was parsed in 0.000076 seconds
[Oct 09 11:53:03:315115] DEBUG: **** RAW CODE ****
180 540 540 180 180 540 180 540 180 540 540 180 180 540 540 180 180 540 180 540 180 540 540 180 180 540 540 180 180 540 540 180 180 540 180 540 540 180 540 180 180 540 180 540 540 180 540 180 180 6120
[Oct 09 11:53:03:315270] DEBUG: **** RAW CODE ****
[Oct 09 11:53:03:316321] DEBUG: **** RAW CODE ****
[Oct 09 11:53:03:316413] DEBUG: lua async on state #0
180 540 540 180 180 540 180 540 180 540 540 180 180 540 540 180 180 540 180 540 180 540 540 180 180 540 540 180 180 540 540 180 540 180 540 180 180 540 180 540 180 540 180 540 540 180 540 180 180 6120
[Oct 09 11:53:03:316503] DEBUG: **** RAW CODE ****
[Oct 09 11:53:03:316910] DEBUG: socket write succeeded: {"origin":"update","type":1,"uuid":"0000-b8-27-eb-cd7a82","devices":["SteckdoseRund1"],"values":{"timestamp":1570621983,"state":"on"}}

[Oct 09 11:53:03:317032] DEBUG: broadcasted: {"origin":"update","type":1,"uuid":"0000-b8-27-eb-cd7a82","devices":["SteckdoseRund1"],"values":{"timestamp":1570621983,"state":"on"}}
[Oct 09 11:53:03:317227] DEBUG: socket write succeeded: {"origin":"sender","protocol":"clarus_switch","message":{"id":"A3","unit":18,"state":"on"},"repeat":1,"uuid":"0000-b8-27-eb-cd7a82"}

[Oct 09 11:53:03:317318] DEBUG: broadcasted: {"origin":"sender","protocol":"clarus_switch","message":{"id":"A3","unit":18,"state":"on"},"repeat":1,"uuid":"0000-b8-27-eb-cd7a82"}
[Oct 09 11:53:03:318123] DEBUG: lua async on state #0
[Oct 09 11:53:03:318582] DEBUG: socket write succeeded: {"origin":"update","type":1,"uuid":"0000-b8-27-eb-cd7a82","devices":["SteckdoseRund2"],"values":{"timestamp":1570621983,"state":"on"}}

[Oct 09 11:53:03:318661] DEBUG: broadcasted: {"origin":"update","type":1,"uuid":"0000-b8-27-eb-cd7a82","devices":["SteckdoseRund2"],"values":{"timestamp":1570621983,"state":"on"}}
[Oct 09 11:53:03:318874] DEBUG: socket write succeeded: {"origin":"sender","protocol":"clarus_switch","message":{"id":"B3","unit":18,"state":"on"},"repeat":1,"uuid":"0000-b8-27-eb-cd7a82"}

[Oct 09 11:53:03:318927] DEBUG: broadcasted: {"origin":"sender","protocol":"clarus_switch","message":{"id":"B3","unit":18,"state":"on"},"repeat":1,"uuid":"0000-b8-27-eb-cd7a82"}
[Oct 09 11:53:03:416259] DEBUG: lua timer on state #0
[Oct 09 11:53:03:663302] DEBUG: lua timer on state #0

Thread 1 "pilight-daemon" received signal SIGSEGV, Segmentation fault.
strlen () at ../sysdeps/arm/armv6/strlen.S:26
26    ../sysdeps/arm/armv6/strlen.S: Datei oder Verzeichnis nicht gefunden.


(gdb) backtrace
#0  strlen () at ../sysdeps/arm/armv6/strlen.S:26
#1  0x76585ba8 in lua_getfield ()
  from /usr/lib/arm-linux-gnueabihf/libluajit-5.1.so.2
#2  0x7682cd28 in ?? () from /usr/local/lib/libpilight.so
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
Uli
 
Reply
#4
Please install the pilight-dbg version before testing?
 
Reply
#5
(10-09-2019, 06:40 PM)curlymo Wrote: Please install the pilight-dbg version before testing?

Hi!

I did the following:

apt-get update
apt-get install pilight-dbg
gdb --args pilight-daemon -D

This gets:
Code:
Thread 1 "pilight-daemon" received signal SIGSEGV, Segmentation fault.
strlen () at ../sysdeps/arm/armv6/strlen.S:26
26    ../sysdeps/arm/armv6/strlen.S: Datei oder Verzeichnis nicht gefunden.
(gdb)


(gdb) backtrace
#0  strlen () at ../sysdeps/arm/armv6/strlen.S:26
#1  0x7657dba8 in lua_getfield ()
  from /usr/lib/arm-linux-gnueabihf/libluajit-5.1.so.2
#2  0x768278e4 in timer_callback (req=<optimized out>)
   at /home/pilight/source/daemon-dev/libs/pilight/lua_c/async/timer.c:387
#3  0x7678e8a8 in uv__run_timers (
   loop=loop@entry=0x76f9d598 <default_loop_struct>)
   at /home/pilight/source/daemon-dev/libs/libuv/unix/timer.c:165
#4  0x7677fd54 in uv_run (loop=0x76f9d598 <default_loop_struct>,
   mode=mode@entry=UV_RUN_DEFAULT)
   at /home/pilight/source/daemon-dev/libs/libuv/unix/core.c:353
#5  0x0000b898 in main (argc=<optimized out>, argv=<optimized out>)
   at /home/pilight/source/daemon-dev/daemon.c:3512
(gdb)

I hope that helps

Uli
 
Reply
#6
I just can't seem to reproduce it. What version did you install?
 
Reply
#7
(10-10-2019, 12:29 PM)curlymo Wrote: I just can't seem to reproduce it. What version did you install?

The latest available nightly 8.1.5-37
 
Reply
#8
Are you sure it's just switching the Diele that should trigger the error? I'm asking this because the Diele change in itself doesn't trigger any timer anywhere.
 
Reply
#9
Another possibility is to start installing one version after another starting from 8.1.5 to see what change caused the error.
 
Reply
#10
(10-13-2019, 11:19 AM)curlymo Wrote: Another possibility is to start installing one version after another starting from 8.1.5 to see what change caused the error.

Hi curlymo

Yes i already did some testing today. 8.1.5-10 works fine,  the problem starts with 8.1.5-28.

I also could narrow down the cause. The generic-switch is not the problem, there are many generic switches in my config, which work fine. The problem is in the rules, which changes multiple devices at once (... THEN switch DEVICE a AND b TO on).

I remember there was a problem with this, the devices did not react without introducing a AFTER clause. This was solved in 8.1.4 nightly. Maybe there is some connection in this area.

Uli
 
Reply
  


Forum Jump:


Browsing: 1 Guest(s)