• 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
hardware module issues in nightly
#11
Hi curlymo,

Per your request i am moving this here.

I am running pilight version v8.1.4-nightly-54672bef on a Rasberrypi3 with Raspbian linux (64bit).

When i execute the following rule from the web interface pilight crashes:

Code:
               "kasten_aan": {
                        "rule": "IF (kasten_aan.state == on) THEN switch DEVICE lamp_kast TO on AND switch DEVICE lamp_kast2 TO on AND switch DEVICE kasten_aan TO off",
                        "active": 1
                },

There are nog errors in the log. This is the pilight.service status after the crash:

Quote:root@domo:/# service pilight status
● pilight.service - pilight
   Loaded: loaded (/etc/systemd/system/pilight.service; enabled; vendor preset: enabled)
   Active: failed (Result: signal) since Wed 2019-04-03 19:05:52 CEST; 38s ago
  Process: 2382 ExecStart=/usr/local/sbin/pilight-daemon (code=exited, status=0/SUCCESS)
 Main PID: 2390 (code=killed, signal=SEGV)

Mar 30 16:23:32 domo systemd[1]: Starting pilight...
Mar 30 16:23:33 domo systemd[1]: Started pilight.
Apr 03 19:05:52 domo systemd[1]: pilight.service: Main process exited, code=killed, status=11/SEGV
Apr 03 19:05:52 domo systemd[1]: pilight.service: Unit entered failed state.
Apr 03 19:05:52 domo systemd[1]: pilight.service: Failed with result 'signal'.

This is the rule that triggered the new errors i mentioned in my previous post.

The following rule also crashes pilight, but the are errors in the log:

Code:
      "tv_mode1": {
                        "rule": "IF (tv_mode1.state == on) THEN switch DEVICE leds_woonkamer_uit TO on AND dim DEVICE dimmers_voor TO 10 AFTER '4 SECOND' AND dim DEVICE dimmer_vitrinekast TO 8 AFTER '6 SECOND' AND switch DEVICE tv_mode1 TO off",
                        "active": 1
                },

This is the leds_woonkamer_uit rule that is executed from the tv_mode1 rule:

Code:
 "leds_woonkamer_uit": {
                        "rule": "IF (leds_woonkamer_uit.state == on) THEN switch DEVICE dj_lamp TO off AFTER '1 SECOND' AND switch DEVICE lamp_eettafel TO off AFTER '2 SECOND' AND switch DEVICE lamp_kast TO off AFTER '3 SECOND' AND switch DEVICE lamp_kast2 TO off AFTER '4 SECOND' AND switch DEVICE leds_woonkamer_uit TO off",
                        "active": 1
                },

These are the errors i get in pilight.log:

Quote: Apr 03 17:12:52:31949] pilight-daemon: INFO: executed rule: tv_mode1
[ Apr 03 17:12:52:33865] pilight-daemon: ERROR: /usr/local/lib/pilight/hardware/433gpio.lua:27: bad argument #1 to 'pairs' (table expected, got nil)
[ Apr 03 17:12:52:38044] pilight-daemon: ERROR: no free lua states available
[ Apr 03 17:12:52:38088] pilight-daemon: ERROR: no free lua states available
[ Apr 03 17:12:52:38187] pilight-daemon: INFO: executed rule: leds_woonkamer_uit
[ Apr 03 17:12:52:38192] pilight-daemon: ERROR: /usr/local/lib/pilight/hardware/433gpio.lua:24: bad argument #1 to 'setup' (string expected, got nil)

I dont think there are (syntax) errors in these rules. When i restart piligt it doesn't complain about them:

Quote:cat pilight.log
[Apr 03 17:09:02:442261] pilight-daemon: INFO: sunriseset zon 6.603295:53.245634 seems to be in timezone: Europe/Berlin
[Apr 03 17:09:02:442432] pilight-daemon: INFO: datetime tijd 6.603295:53.245634 seems to be in timezone: Europe/Berlin
[Apr 03 17:09:02:494032] pilight-daemon: INFO: rule #1 keuken_aan_uur_voor_zonsondergang was parsed in 0.010716 seconds
[Apr 03 17:09:02:504809] pilight-daemon: INFO: rule #2 aquarium_aan_0715 was parsed in 0.010733 seconds
[Apr 03 17:09:02:516768] pilight-daemon: INFO: rule #3 aquaruim_uit_om_2115 was parsed in 0.011925 seconds
[Apr 03 17:09:02:532139] pilight-daemon: INFO: rule #4 lamp_slaapkamer_sochtends_aan1 was parsed in 0.015328 seconds
[Apr 03 17:09:02:548330] pilight-daemon: INFO: rule #5 lamp_slaapkamer_sochtends_aan2 was parsed in 0.016133 seconds
[Apr 03 17:09:02:561561] pilight-daemon: INFO: rule #6 lamp_slaapkamer_sochtends_uit was parsed in 0.013199 seconds
[Apr 03 17:09:02:574828] pilight-daemon: INFO: rule #7 lamp_slaapkamer_savonds_auto_uit was parsed in 0.013236 seconds
[Apr 03 17:09:02:589974] pilight-daemon: INFO: rule #8 dimmers_voor_sochtends_aan was parsed in 0.015090 seconds
[Apr 03 17:09:02:604958] pilight-daemon: INFO: rule #9 dimmers_voor_sochtends_uit was parsed in 0.014952 seconds
[Apr 03 17:09:02:613818] pilight-daemon: INFO: rule #10 waterval_aan was parsed in 0.008829 seconds
[Apr 03 17:09:02:627049] pilight-daemon: INFO: rule #11 waterval_uit_om_2215_en_0000 was parsed in 0.013172 seconds
[Apr 03 17:09:02:635329] pilight-daemon: INFO: rule #12 waterval_uit_om_2215 was parsed in 0.008240 seconds
[Apr 03 17:09:02:643995] pilight-daemon: INFO: rule #13 fan_woonkamer_uit_om_2359 was parsed in 0.008638 seconds
[Apr 03 17:09:02:657982] pilight-daemon: INFO: rule #14 woonkamer_auto_uit_om_0000 was parsed in 0.013961 seconds
[Apr 03 17:09:02:671849] pilight-daemon: INFO: rule #15 woonkamer_auto_uit_om_0200 was parsed in 0.013805 seconds
[Apr 03 17:09:02:685574] pilight-daemon: INFO: rule #16 woonkamer_auto_uit_om_0400 was parsed in 0.013674 seconds
[Apr 03 17:09:02:693112] pilight-daemon: INFO: rule #17 lamp_keuken_auto_uit_om_2200 was parsed in 0.007493 seconds
[Apr 03 17:09:02:703552] pilight-daemon: INFO: rule #18 leds_woonkamer_uit was parsed in 0.010375 seconds
[Apr 03 17:09:02:716304] pilight-daemon: INFO: rule #19 dimmers_voor_aan_half_uur_voor_zonsondergang was parsed in 0.012675 seconds
[Apr 03 17:09:02:728500] pilight-daemon: INFO: rule #20 leds_kasten_aan_15_min_voor_zonsondergang_als_niet_thuis was parsed in 0.012140 seconds
[Apr 03 17:09:02:736575] pilight-daemon: INFO: rule #21 tv_mode1 was parsed in 0.008033 seconds
[Apr 03 17:09:02:744731] pilight-daemon: INFO: rule #22 tv_mode2 was parsed in 0.008103 seconds
[Apr 03 17:09:02:752717] pilight-daemon: INFO: rule #23 tv_mode3 was parsed in 0.007936 seconds
[Apr 03 17:09:02:772646] pilight-daemon: INFO: rule #24 alles_uit was parsed in 0.019898 seconds
[Apr 03 17:09:02:778576] pilight-daemon: INFO: rule #25 kasten_aan was parsed in 0.005867 seconds
[Apr 03 17:09:02:794768] pilight-daemon: INFO: rule #26 scenario99 was parsed in 0.016137 seconds

This is the settings section from my config.json:

Code:
"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-cache": 1,
                "whitelist": "",
                "ntp-servers": [ "192.168.1.150" ],
                "gpio-platform": "raspberrypi3"
        },
        "hardware": {
                "433gpio": {
                        "sender": 0,
                        "receiver": 1
                }
        },
        "registry": {
                "webserver": {
                        "ssl": {
                                "certificate": {
                                        "location": "/etc/pilight/pilight.pem"
                                }
                        }
                },
                "pilight": {
                        "version": {
                                "current": "8.1.4"
                        }
                },
                "hardware": {
                        "RF433": {
                                "mingaplen": 4420,
                                "maxgaplen": 72900,
                                "minrawlen": 26,
                                "maxrawlen": 400
                        }
                }
        }

The second "hardware" entry was added by pilight after upgrading to version v8.1.4-nightly-54672bef from 8.1.4
If you need me to try something or need more information please let me know.
 
Reply
#12
I'm currently debugging myself. You are running without a filter also right?



Can you guys test the latest nightly of tomorrow?
 
Reply
#13
Hi curlymo,

I am running without a filter.

Just installed the latest nightly.
I am still getting errors when executing certain rules:

Code:
                "kasten_aan": {
                        "rule": "IF (kasten_aan.state == on) THEN switch DEVICE lamp_kast TO on AND switch DEVICE lamp_kast2 TO on AND switch DEVICE kasten_aan TO off",
                        "active": 1
                },

pilight.log:


Code:
[Apr 04 17:45:21:120210] pilight-daemon: INFO: executed rule: kasten_aan
[Apr 04 17:45:21:121069] pilight-daemon: ERROR: /usr/local/lib/pilight/hardware/433gpio.lua:27: bad argument #1 to 'pairs' (table expected, got nil)
[Apr 04 17:45:21:123929] pilight-daemon: ERROR: no free lua states available
[Apr 04 17:45:21:123966] pilight-daemon: ERROR: no free lua states available
[Apr 04 17:45:21:124084] pilight-daemon: ERROR: /usr/local/lib/pilight/hardware/433gpio.lua:24: bad argument #1 to 'setup' (string expected, got nil)

But pilight no longer crashes when executing the rule and the lights do turn on.

The next rule does still crash pilight, and there is nothing in the log:

Code:
 "tv_mode1": {
                        "rule": "IF (tv_mode1.state == on) THEN switch DEVICE leds_woonkamer_uit TO on AND dim DEVICE dimmers_voor TO 10 AFTER '4 SECOND' AND dim DEVICE dimmer_vitrinekast TO 8 AFTER '6 SECOND' AND switch DEVICE tv_mode1 TO off",
                        "active": 1
                },

The rules that cause errors and/or crashes are the ones which i trigger from the web interface by turning a device on, the device then triggers some actions,
and then turns off again.
Rules that do something at specific times are working fine.
 
Reply
#14
Can you post the debug log for the crash? Also post the full config so i can run it myself.
 
Reply
#15
This is the debug log:

Code:
[Apr 04 18:54:42:867196] pilight-daemon: DEBUG: socket recv: {"action":"control","code":{"device":"tv_mode1","state":"on"}}
[Apr 04 18:54:42:867542] pilight-daemon: DEBUG: **** RAW CODE ****
315 2835 315 315 315 1260 315 315 315 1260 315 315 315 1260 315 315 315 1260 315 315 315 1260 315 315 315 1260 315 315 315 1260 315 315 315 1260 315 315 315 1260 315 315 315 1260 315 315 315 1260 315 315 315 1260 315 315 315 1260 315 315 315 1260 315 315 315 1260 315 315 315 1260 315 315 315 1260 315 315 315 1260 315 315 315 1260 315 315 315 1260 315 315 315 1260 315 315 315 1260 315 315 315 1260 315 315 315 1260 315 1260 315 315 315 315 315 1260 315 315 315 1260 315 1260 315 315 315 315 315 1260 315 315 315 1260 315 315 315 1260 315 1260 315 315 315 10710
[Apr 04 18:54:42:867694] pilight-daemon: DEBUG: **** RAW CODE ****
[Apr 04 18:54:42:869076] pilight-daemon: DEBUG: lua async on state #0
[Apr 04 18:54:42:869564] pilight-daemon: DEBUG: socket write succeeded: {"origin":"update","type":1,"uuid":"0000-b8-27-eb-fcf38c","devices":["tv_mode1"],"values":{"timestamp":1554404082,"state":"on"}}

[Apr 04 18:54:42:869611] pilight-daemon: DEBUG: broadcasted: {"origin":"update","type":1,"uuid":"0000-b8-27-eb-fcf38c","devices":["tv_mode1"],"values":{"timestamp":1554404082,"state":"on"}}
[Apr 04 18:54:42:869789] pilight-daemon: DEBUG: socket write succeeded: {"origin":"sender","protocol":"arctech_switch","message":{"id":2,"unit":1,"state":"on"},"repeat":1,"uuid":"0000-b8-27-eb-fcf38c"}

[Apr 04 18:54:42:869817] pilight-daemon: DEBUG: broadcasted: {"origin":"sender","protocol":"arctech_switch","message":{"id":2,"unit":1,"state":"on"},"repeat":1,"uuid":"0000-b8-27-eb-fcf38c"}
[Apr 04 18:54:42:870984] pilight-daemon: DEBUG: lua thread on state #2
[Apr 04 18:54:42:871519] pilight-daemon: DEBUG: **** RAW CODE ****
[Apr 04 18:54:42:871655] pilight-daemon: INFO: executed rule: tv_mode1
[Apr 04 18:54:42:871668] pilight-daemon: DEBUG: lua thread on state #1
[Apr 04 18:54:42:871692] pilight-daemon: DEBUG: rule #21 tv_mode1 was parsed in 0.001125 seconds
315 2835 315 315 315 1260 315 315 315 1260 315 315 315 1260 315 315 315 1260 315 315 315 1260 315 315 315 1260 315 315 315 1260 315 315 315 1260 315 315 315 1260 315 315 315 1260 315 315 315 1260 315 315 315 1260 315 315 315 1260 315 315 315 1260 315 315 315 1260 315 315 315 1260 315 315 315 1260 315 315 315 1260 315 315 315 1260 315 315 315 1260 315 315 315 1260 315 315 315 1260 315 315 315 1260 315 315 315 1260 315 1260 315 315 315 315 315 1260 315 315 315 1260 315 315 315 1260 315 315 315 1260 315 315 315 1260 315 315 315 1260 315 1260 315 315 315 10710
[Apr 04 18:54:42:871743] pilight-daemon: DEBUG: **** RAW CODE ****
[Apr 04 18:54:42:873363] pilight-daemon: DEBUG: lua async on state #1
[Apr 04 18:54:42:873565] pilight-daemon: DEBUG: **** RAW CODE ****

[Apr 04 18:54:42:873603] pilight-daemon: DEBUG: **** RAW CODE ****
[Apr 04 18:54:42:873697] pilight-daemon: DEBUG: lua async on state #2
[Apr 04 18:54:42:873832] pilight-daemon: DEBUG: socket write succeeded: {"origin":"update","type":1,"uuid":"0000-b8-27-eb-fcf38c","devices":["tv_mode1"],"values":{"timestamp":1554404082,"state":"off"}}

[Apr 04 18:54:42:873860] pilight-daemon: DEBUG: broadcasted: {"origin":"update","type":1,"uuid":"0000-b8-27-eb-fcf38c","devices":["tv_mode1"],"values":{"timestamp":1554404082,"state":"off"}}
[Apr 04 18:54:42:874020] pilight-daemon: DEBUG: socket write succeeded: {"origin":"sender","protocol":"arctech_switch","message":{"id":2,"unit":1,"state":"off"},"repeat":1,"uuid":"0000-b8-27-eb-fcf38c"}

[Apr 04 18:54:42:874043] pilight-daemon: ERROR: /usr/local/lib/pilight/hardware/433gpio.lua:27: bad argument #1 to 'pairs' (table expected, got nil)
[Apr 04 18:54:42:874046] pilight-daemon: DEBUG: broadcasted: {"origin":"sender","protocol":"arctech_switch","message":{"id":2,"unit":1,"state":"off"},"repeat":1,"uuid":"0000-b8-27-eb-fcf38c"}
[Apr 04 18:54:42:874529] pilight-daemon: DEBUG: socket write succeeded: {"origin":"update","type":1,"uuid":"0000-b8-27-eb-fcf38c","devices":["leds_woonkamer_uit"],"values":{"timestamp":1554404082,"state":"on"}}

[Apr 04 18:54:42:874573] pilight-daemon: DEBUG: broadcasted: {"origin":"update","type":1,"uuid":"0000-b8-27-eb-fcf38c","devices":["leds_woonkamer_uit"],"values":{"timestamp":1554404082,"state":"on"}}
[Apr 04 18:54:42:874693] pilight-daemon: DEBUG: socket write succeeded: {"origin":"sender","protocol":"generic_switch","message":{"id":98,"state":"on"},"repeat":1,"uuid":"0000-b8-27-eb-fcf38c"}

[Apr 04 18:54:42:874716] pilight-daemon: DEBUG: broadcasted: {"origin":"sender","protocol":"generic_switch","message":{"id":98,"state":"on"},"repeat":1,"uuid":"0000-b8-27-eb-fcf38c"}
[Apr 04 18:54:42:875124] pilight-daemon: DEBUG: rule #21 tv_mode1 was parsed in 0.000056 seconds
[Apr 04 18:54:42:877704] pilight-daemon: DEBUG: lua thread on state #3
[Apr 04 18:54:42:878149] pilight-daemon: DEBUG: **** RAW CODE ****

[Apr 04 18:54:42:878192] pilight-daemon: DEBUG: **** RAW CODE ****
[Apr 04 18:54:42:878296] pilight-daemon: DEBUG: lua async on state #3
[Apr 04 18:54:42:878402] pilight-daemon: ERROR: no free lua states available
[Apr 04 18:54:42:878438] pilight-daemon: ERROR: no free lua states available
[Apr 04 18:54:42:878467] pilight-daemon: INFO: executed rule: leds_woonkamer_uit
[Apr 04 18:54:42:878491] pilight-daemon: DEBUG: rule #18 leds_woonkamer_uit was parsed in 0.001187 seconds
[Apr 04 18:54:42:878587] pilight-daemon: ERROR: /usr/local/lib/pilight/hardware/433gpio.lua:24: bad argument #1 to 'setup' (string expected, got nil)
[Apr 04 18:54:42:878821] pilight-daemon: DEBUG: socket write succeeded: {"origin":"update","type":1,"uuid":"0000-b8-27-eb-fcf38c","devices":["leds_woonkamer_uit"],"values":{"timestamp":1554404082,"state":"off"}}

[Apr 04 18:54:42:878951] pilight-daemon: DEBUG: broadcasted: {"origin":"update","type":1,"uuid":"0000-b8-27-eb-fcf38c","devices":["leds_woonkamer_uit"],"values":{"timestamp":1554404082,"state":"off"}}
[Apr 04 18:54:42:879150] pilight-daemon: DEBUG: socket write succeeded: {"origin":"sender","protocol":"generic_switch","message":{"id":98,"state":"off"},"repeat":1,"uuid":"0000-b8-27-eb-fcf38c"}

[Apr 04 18:54:42:879186] pilight-daemon: DEBUG: broadcasted: {"origin":"sender","protocol":"generic_switch","message":{"id":98,"state":"off"},"repeat":1,"uuid":"0000-b8-27-eb-fcf38c"}
[Apr 04 18:54:42:881125] pilight-daemon: DEBUG: rule #18 leds_woonkamer_uit was parsed in 0.000082 seconds
[ Apr 04 18:54:43:25208] pilight-daemon: DEBUG: socket recv: {"action":"control","code":{"device":"tv_mode1","state":"on"}}
[ Apr 04 18:54:43:25841] pilight-daemon: DEBUG: **** RAW CODE ****
315 2835 315 315 315 1260 315 315 315 1260 315 315 315 1260 315 315 315 1260 315 315 315 1260 315 315 315 1260 315 315 315 1260 315 315 315 1260 315 315 315 1260 315 315 315 1260 315 315 315 1260 315 315 315 1260 315 315 315 1260 315 315 315 1260 315 315 315 1260 315 315 315 1260 315 315 315 1260 315 315 315 1260 315 315 315 1260 315 315 315 1260 315 315 315 1260 315 315 315 1260 315 315 315 1260 315 315 315 1260 315 1260 315 315 315 315 315 1260 315 315 315 1260 315 1260 315 315 315 315 315 1260 315 315 315 1260 315 315 315 1260 315 1260 315 315 315 10710
[ Apr 04 18:54:43:26183] pilight-daemon: DEBUG: **** RAW CODE ****
[ Apr 04 18:54:43:28724] pilight-daemon: DEBUG: lua async on state #2
[ Apr 04 18:54:43:29530] pilight-daemon: DEBUG: socket write succeeded: {"origin":"update","type":1,"uuid":"0000-b8-27-eb-fcf38c","devices":["tv_mode1"],"values":{"timestamp":1554404083,"state":"on"}}

[ Apr 04 18:54:43:29649] pilight-daemon: DEBUG: broadcasted: {"origin":"update","type":1,"uuid":"0000-b8-27-eb-fcf38c","devices":["tv_mode1"],"values":{"timestamp":1554404083,"state":"on"}}
[ Apr 04 18:54:43:29922] pilight-daemon: DEBUG: socket write succeeded: {"origin":"sender","protocol":"arctech_switch","message":{"id":2,"unit":1,"state":"on"},"repeat":1,"uuid":"0000-b8-27-eb-fcf38c"}

[ Apr 04 18:54:43:30006] pilight-daemon: DEBUG: broadcasted: {"origin":"sender","protocol":"arctech_switch","message":{"id":2,"unit":1,"state":"on"},"repeat":1,"uuid":"0000-b8-27-eb-fcf38c"}
[ Apr 04 18:54:43:32192] pilight-daemon: ERROR: no free lua states available
Segmentation fault

Here is my config:

Code:
{
        "devices": {
                "dimmer_vitrinekast": {
                        "protocol": [ "kaku_dimmer", "kaku_switch" ],
                        "id": [{
                                "id": 17708574,
                                "unit": 1
                        }],
                        "state": "off",
                        "dimlevel": 8
                },
                "dimmers_voor": {
                        "protocol": [ "kaku_dimmer", "kaku_switch" ],
                        "id": [{
                                "id": 17708574,
                                "unit": 0
                        }],
                        "state": "on",
                        "dimlevel": 10
                },
                "lamp_keuken": {
                        "protocol": [ "kaku_switch_old" ],
                        "id": [{
                                "id": 3,
                                "unit": 2
                        }],
                        "state": "on"
                },
                "lamp_slaapkamer": {
                        "protocol": [ "kaku_dimmer" ],
                        "id": [{
                                "id": 17708574,
                                "unit": 8
                        },
                        {
                                "id": 21434194,
                                "unit": 0
                        }],
                        "state": "off",
                        "dimlevel": 14
                },
                "led_lamp_slaapkamer": {
                        "protocol": [ "kaku_switch" ],
                        "id": [{
                                "id": 21434194,
                                "unit": 1
                        },
                        {
                                "id": 17708574,
                                "unit": 9
                        }],
                        "state": "off"
                },
                "lamp_eettafel": {
                        "protocol": [ "kaku_switch" ],
                        "id": [{
                                "id": 17708574,
                                "unit": 2
                        }],
                        "state": "off"
                },
                "lamp_kast": {
                        "protocol": [ "kaku_switch" ],
                        "id": [{
                                "id": 17708574,
                                "unit": 3
                        }],
                        "state": "off"
                },
                "aquarium": {
                        "protocol": [ "kaku_switch" ],
                        "id": [{
                                "id": 17708574,
                                "unit": 11
                        }],
                        "state": "on"
                },
                "weer": {
                        "protocol": [ "openweathermap" ],
                        "id": [{
                                "country": "nl",
                                "api": "c478632a3c33e1fcba45ec0209ab254f",
                                "location": "groningen"
                        }],
                        "humidity": 93.00,
                        "temperature": 6.16,
                        "sunrise": 5.00,
                        "sunset": 18.12,
                        "sun": "set",
                        "update": 0,
                        "poll-interval": 600
                },
                "zon": {
                        "protocol": [ "sunriseset" ],
                        "id": [{
                                "longitude": 6.603295,
                                "latitude": 53.245634
                        }],
                        "sunrise": 7.01,
                        "sunset": 20.14,
                        "sun": "set"
                },
                "tijd": {
                        "protocol": [ "datetime" ],
                        "id": [{
                                "longitude": 6.603295,
                                "latitude": 53.245634
                        }],
                        "year": 2019,
                        "month": 4,
                        "day": 4,
                        "hour": 20,
                        "minute": 49,
                        "second": 51,
                        "weekday": 5,
                        "dst": 1
                },
                "niet_thuis": {
                        "protocol": [ "generic_switch" ],
                        "id": [{
                                "id": 1
                        }],
                        "state": "off"
                },
                "vakantie_vrij": {
                        "protocol": [ "generic_switch" ],
                        "id": [{
                                "id": 5
                        }],
                        "state": "off"
                },
                "woonkamer_auto_uit_0000": {
                        "protocol": [ "generic_switch" ],
                        "id": [{
                                "id": 7
                        }],
                        "state": "off"
                },
                "woonkamer_auto_uit_0200": {
                        "protocol": [ "generic_switch" ],
                        "id": [{
                                "id": 8
                        }],
                        "state": "off"
                },
                "woonkamer_auto_uit_0400": {
                        "protocol": [ "generic_switch" ],
                        "id": [{
                                "id": 9
                        }],
                        "state": "off"
                },
                "lamp_slaapkamer_wakeup": {
                        "protocol": [ "generic_switch" ],
                        "id": [{
                                "id": 10
                        }],
                        "state": "off"
                },
                "aquarium_auto_uit": {
                        "protocol": [ "generic_switch" ],
                        "id": [{
                                "id": 11
                        }],
                        "state": "on"
                },
                "lamp_keuken_auto_uit_2200": {
                        "protocol": [ "generic_switch" ],
                        "id": [{
                                "id": 12
                        }],
                        "state": "on"
                },
                "tv_mode1": {
                        "protocol": [ "kaku_switch" ],
                        "id": [{
                                "id": 2,
                                "unit": 1
                        },
                        {
                                "id": 17708574,
                                "unit": 12
                        }],
                        "state": "on"
                },
                "tv_mode2": {
                        "protocol": [ "kaku_switch" ],
                        "id": [{
                                "id": 3,
                                "unit": 1
                        },
                        {
                                "id": 17708574,
                                "unit": 13
                        }],
                        "state": "off"
                },
                "tv_mode3": {
                        "protocol": [ "kaku_switch" ],
                        "id": [{
                                "id": 4,
                                "unit": 1
                        },
                        {
                                "id": 17708574,
                                "unit": 14
                        }],
                        "state": "off"
                },
                "scenario99": {
                        "protocol": [ "kaku_switch" ],
                        "id": [{
                                "id": 6,
                                "unit": 1
                        },
                        {
                                "id": 17708574,
                                "unit": 15
                        }],
                        "state": "off"
                },
                "alles_uit": {
                        "protocol": [ "generic_switch" ],
                        "id": [{
                                "id": 99
                        }],
                        "state": "off"
                },
                "leds_woonkamer_uit": {
                        "protocol": [ "generic_switch" ],
                        "id": [{
                                "id": 98
                        }],
                        "state": "off"
                },
                "dj_lamp": {
                        "protocol": [ "kaku_switch" ],
                        "id": [{
                                "id": 17708574,
                                "unit": 4
                        }],
                        "state": "off"
                },
                "waterval": {
                        "protocol": [ "kaku_switch_old", "kaku_switch" ],
                        "id": [{
                                "id": 1,
                                "unit": 0
                        }],
                        "state": "off"
                },
                "fan_woonkamer": {
                        "protocol": [ "kaku_switch" ],
                        "id": [{
                                "id": 17708574,
                                "unit": 6
                        }],
                        "state": "off"
                },
                "lamp_kast2": {
                        "protocol": [ "kaku_switch" ],
                        "id": [{
                                "id": 17708574,
                                "unit": 5
                        }],
                        "state": "off"
                },
                "kasten_aan": {
                        "protocol": [ "generic_switch" ],
                        "id": [{
                                "id": 100
                        }],
                        "state": "off"
                },
                "waterval_auto_aan": {
                        "protocol": [ "generic_switch" ],
                        "id": [{
                                "id": 6
                        }],
                        "state": "off"
                }
        },
        "rules": {
                "keuken_aan_uur_voor_zonsondergang": {
                        "rule": "IF (zon.sunset == DATE_FORMAT(DATE_ADD(tijd, '+1 HOUR'), '%Y-%m-%d %H:%M:%S', %H.%M)) AND (lamp_keuken.state == off) AND (tijd.second == 0) THEN switch DEVICE lamp_keuken TO on",
                        "active": 1
                },
                "aquarium_aan_0715": {
                        "rule": "IF ((tijd.hour == 7 AND tijd.minute == 15 AND tijd.second == 0) AND (aquarium.state == off) AND (tijd.second == 0)) THEN switch DEVICE aquarium TO on",
                        "active": 1
                },
                "aquaruim_uit_om_2115": {
                        "rule": "IF ((tijd.hour == 21) AND (tijd.minute == 15) AND (tijd.second == 0) AND (aquarium_auto_uit.state == on) AND (aquarium.state == on)) THEN switch DEVICE aquarium TO off",
                        "active": 1
                },
                "lamp_slaapkamer_sochtends_aan1": {
                        "rule": "IF (tijd.weekday != 1 AND tijd.weekday != 7) AND ((tijd.hour == 6) AND (tijd.minute == 40) AND (tijd.second == 0) AND (vakantie_vrij.state == off) AND (lamp_slaapkamer_wakeup.state == off)) THEN switch DEVICE lamp_slaapkamer TO on",
                        "active": 1
                },
                "lamp_slaapkamer_sochtends_aan2": {
                        "rule": "IF (tijd.weekday != 1 AND tijd.weekday != 7) AND ((tijd.hour == 6) AND (tijd.minute == 32) AND (tijd.second == 0) AND (vakantie_vrij.state == off) AND (lamp_slaapkamer_wakeup.state == on)) THEN dim DEVICE lamp_slaapkamer TO 14 FROM 6 IN '8 MINUTE'",
                        "active": 1
                },
                "lamp_slaapkamer_sochtends_uit": {
                        "rule": "IF (tijd.weekday != 1 AND tijd.weekday != 7) AND ((tijd.hour == 7) AND (tijd.minute == 14) AND (tijd.second == 0) AND (vakantie_vrij.state == off)) THEN switch DEVICE lamp_slaapkamer TO off",
                        "active": 1
                },
                "lamp_slaapkamer_savonds_auto_uit": {
                        "rule": "IF (tijd.weekday != 1 AND tijd.weekday != 7) AND ((tijd.hour == 23) AND (tijd.minute == 55) AND (tijd.second == 0) AND (vakantie_vrij.state == off)) THEN switch DEVICE lamp_slaapkamer TO off",
                        "active": 1
                },
                "dimmers_voor_sochtends_aan": {
                        "rule": "IF (tijd.weekday != 1 AND tijd.weekday != 7) AND ((tijd.hour == 6) AND (tijd.minute == 45) AND (tijd.second == 0) AND (dimmers_voor.state == off) AND (vakantie_vrij.state == off)) THEN dim DEVICE dimmers_voor TO 14",
                        "active": 1
                },
                "dimmers_voor_sochtends_uit": {
                        "rule": "IF (tijd.weekday != 1 AND tijd.weekday != 7) AND ((tijd.hour == 7) AND (tijd.minute == 30) AND (tijd.second == 0) AND (dimmers_voor.state == on) AND (vakantie_vrij.state == off)) THEN switch DEVICE dimmers_voor TO off",
                        "active": 1
                },
                "waterval_aan": {
                        "rule": "IF tijd.hour == 12 AND tijd.minute == 30 AND tijd.second == 0 AND waterval_auto_aan.state == on AND waterval.state == off THEN switch DEVICE waterval TO on",
                        "active": 1
                },
                "waterval_uit_om_2215_en_0000": {
                        "rule": "IF ((tijd.hour == 22 AND tijd.minute == 15 AND tijd.second == 0) OR (tijd.hour == 0 AND tijd.minute == 0 AND tijd.second == 0) AND waterval.state == on) THEN switch DEVICE waterval TO off",
                        "active": 0
                },
                "waterval_uit_om_2215": {
                        "rule": "IF ((tijd.hour == 22 AND tijd.minute == 15 AND tijd.second == 0) AND waterval.state == on) THEN switch DEVICE waterval TO off",
                        "active": 1
                },
                "fan_woonkamer_uit_om_2359": {
                        "rule": "IF tijd.hour == 23 AND tijd.minute == 59 AND tijd.second == 0 AND dimmers_voor.state == off AND fan_woonkamer.state == on THEN switch DEVICE fan_woonkamer TO off",
                        "active": 1
                },
                "woonkamer_auto_uit_om_0000": {
                        "rule": "IF tijd.hour == 0 AND tijd.minute == 0 AND tijd.second == 0 AND woonkamer_auto_uit_0000.state == on THEN switch DEVICE dimmers_voor TO off AND switch DEVICE dimmer_vitrinekast TO off AND switch DEVICE dj_lamp TO off AND switch DEVICE lamp_eettafel TO off AND switch DEVICE lamp_kast TO off AND switch DEVICE lamp_kast2 TO off AND switch DEVICE aquarium TO off",
                        "active": 1
                },
                "woonkamer_auto_uit_om_0200": {
                        "rule": "IF tijd.hour == 2 AND tijd.minute == 0 AND tijd.second == 0 AND woonkamer_auto_uit_0200.state == on THEN switch DEVICE dimmers_voor TO off AND switch DEVICE dimmer_vitrinekast TO off AND switch DEVICE dj_lamp TO off AND switch DEVICE lamp_eettafel TO off AND switch DEVICE lamp_kast TO off AND switch DEVICE lamp_kast2 TO off AND switch DEVICE aquarium TO off",
                        "active": 1
                },
                "woonkamer_auto_uit_om_0400": {
                        "rule": "IF tijd.hour == 4 AND tijd.minute == 0 AND tijd.second == 0 AND woonkamer_auto_uit_0400.state == on THEN switch DEVICE dimmers_voor TO off AND switch DEVICE dimmer_vitrinekast TO off AND switch DEVICE dj_lamp TO off AND switch DEVICE lamp_eettafel TO off AND switch DEVICE lamp_kast TO off AND switch DEVICE lamp_kast2 TO off AND switch DEVICE aquarium TO off",
                        "active": 1
                },
                "lamp_keuken_auto_uit_om_2200": {
                        "rule": "IF tijd.hour == 22 AND tijd.minute == 0 AND tijd.second == 0 AND lamp_keuken_auto_uit_2200.state == on THEN switch DEVICE lamp_keuken TO off",
                        "active": 1
                },
                "leds_woonkamer_uit": {
                        "rule": "IF (leds_woonkamer_uit.state == on) THEN switch DEVICE dj_lamp TO off AFTER '1 SECOND' AND switch DEVICE lamp_eettafel TO off AFTER '2 SECOND' AND switch DEVICE lamp_kast TO off AFTER '3 SECOND' AND switch DEVICE lamp_kast2 TO off AFTER '4 SECOND' AND switch DEVICE leds_woonkamer_uit TO off",
                        "active": 1
                },
                "dimmers_voor_aan_half_uur_voor_zonsondergang": {
                        "rule": "IF (zon.sunset == DATE_FORMAT(DATE_ADD(tijd, '+30 MINUTE'), '%Y-%m-%d %H:%M:%S', %H.%M)) AND (dimmers_voor.state == off) AND (niet_thuis.state == off) AND (tijd.second == 0) THEN dim DEVICE dimmers_voor TO 14",
                        "active": 1
                },
                "leds_kasten_aan_15_min_voor_zonsondergang_als_niet_thuis": {
                        "rule": "IF (zon.sunset == DATE_FORMAT(DATE_ADD(tijd, '+15 MINUTE'), '%Y-%m-%d %H:%M:%S', %H.%M)) AND (niet_thuis.state == on) AND (dimmers_voor.state == off) AND (tijd.second == 0) THEN switch DEVICE kasten_aan TO on",
                        "active": 1
                },
                "tv_mode1": {
                        "rule": "IF (tv_mode1.state == on) THEN switch DEVICE leds_woonkamer_uit TO on AND dim DEVICE dimmers_voor TO 10 AFTER '4 SECOND' AND dim DEVICE dimmer_vitrinekast TO 8 AFTER '6 SECOND' AND switch DEVICE tv_mode1 TO off",
                        "active": 1
                },
                "tv_mode2": {
                        "rule": "IF (tv_mode2.state == on) THEN switch DEVICE leds_woonkamer_uit TO on AND dim DEVICE dimmers_voor TO 8 AFTER '4 SECOND' AND dim DEVICE dimmer_vitrinekast TO 6 AFTER '6 SECOND' AND switch DEVICE tv_mode2 TO off",
                        "active": 1
                },
                "tv_mode3": {
                        "rule": "IF (tv_mode3.state == on) THEN switch DEVICE leds_woonkamer_uit TO on AND dim DEVICE dimmers_voor TO 6 AFTER '4 SECOND' AND dim DEVICE dimmer_vitrinekast TO 6 AFTER '2 SECOND' AND switch DEVICE tv_mode3 TO off",
                        "active": 1
                },
                "alles_uit": {
                        "rule": "IF (alles_uit.state == on) THEN switch DEVICE lamp_keuken TO off AND switch DEVICE waterval TO off AND switch DEVICE dimmer_vitrinekast TO off AFTER '2 SECOND' AND switch DEVICE fan_woonkamer TO off AND switch DEVICE lamp_eettafel TO off AFTER '3 SECOND' AND switch DEVICE lamp_kast2 TO off AFTER '4 SECOND' AND switch DEVICE lamp_kast TO off AFTER '5 SECOND' AND switch DEVICE dj_lamp TO off AFTER '6 SECOND' AND switch DEVICE dimmers_voor TO off AFTER '7 SECOND' AND switch DEVICE lamp_slaapkamer TO off AFTER '8 SECOND' AND switch DEVICE led_lamp_slaapkamer TO off AFTER '9 SECOND' AND switch DEVICE alles_uit TO off",
                        "active": 1
                },
                "kasten_aan": {
                        "rule": "IF (kasten_aan.state == on) THEN switch DEVICE lamp_kast TO on AND switch DEVICE lamp_kast2 TO on AND switch DEVICE kasten_aan TO off",
                        "active": 1
                },
                "scenario99": {
                        "rule": "IF (scenario99.state == on) THEN switch DEVICE lamp_slaapkamer TO on AND switch DEVICE lamp_keuken TO off AFTER '2 SECOND' AND switch DEVICE lamp_eettafel TO off AFTER '6 SECOND' AND switch DEVICE dimmer_vitrinekast TO off AFTER '7 SECOND' AND switch DEVICE lamp_kast TO off AFTER '8 SECOND' AND switch DEVICE lamp_kast2 TO off AFTER '9 SECOND' AND switch DEVICE dj_lamp TO off AFTER '10 SECOND' AND switch DEVICE dimmers_voor TO off AFTER '14 SECOND' AND switch DEVICE scenario99 TO off",
                        "active": 1
                }
        },
        "gui": {
                "dimmers_voor": {
                        "name": "dimmers voor",
                        "group": [ "woonkamer" ],
                        "readonly": 0
                },
                "dimmer_vitrinekast": {
                        "name": "dimmer vitrinekast",
                        "group": [ "woonkamer" ],
                        "readonly": 0
                },
                "lamp_keuken": {
                        "name": "lamp keuken",
                        "group": [ "keuken" ],
                        "readonly": 0
                },
                "lamp_eettafel": {
                        "name": "lamp eettafel",
                        "group": [ "woonkamer" ],
                        "readonly": 0
                },
                "aquarium": {
                        "name": "aquarium",
                        "group": [ "woonkamer" ],
                        "readonly": 0
                },
                "lamp_kast": {
                        "name": "leds platenkast",
                        "group": [ "woonkamer" ],
                        "readonly": 0
                },
                "lamp_slaapkamer": {
                        "name": "lamp slaapkamer",
                        "group": [ "slaapkamer" ],
                        "readonly": 0
                },
                "led_lamp_slaapkamer": {
                        "name": "led lamp slaapkamer",
                        "group": [ "slaapkamer" ],
                        "readonly": 0
                },
                "weer": {
                        "name": "weer - groningen",
                        "show-sunriseset": 0,
                        "group": [ "buiten" ],
                        "media": [ "all" ]
                },
                "zon": {
                        "name": "sunrise / sunset",
                        "group": [ "buiten" ],
                        "media": [ "all" ]
                },
                "niet_thuis": {
                        "name": "niet thuis",
                        "group": [ "settings" ],
                        "readonly": 0
                },
                "woonkamer_auto_uit_0000": {
                        "name": "licht woonkamer auto uit @00.00",
                        "group": [ "settings" ],
                        "readonly": 0
                },
                "woonkamer_auto_uit_0200": {
                        "name": "licht woonkamer auto uit @02.00",
                        "group": [ "settings" ],
                        "readonly": 0
                },
                "woonkamer_auto_uit_0400": {
                        "name": "licht woonkamer auto uit @04.00",
                        "group": [ "settings" ],
                        "readonly": 0
                },
                "aquarium_auto_uit": {
                        "name": "aquarium auto uit @21.15",
                        "group": [ "settings" ],
                        "readonly": 0
                },
                "lamp_keuken_auto_uit_2200": {
                        "name": "licht keuken auto uit @22.00",
                        "group": [ "settings" ],
                        "readonly": 0
                },
                "vakantie_vrij": {
                        "name": "vakantie / vrij",
                        "group": [ "settings" ],
                        "readonly": 0
                },
                "tv_mode1": {
                        "name": "tv mode #1",
                        "group": [ "triggers" ],
                        "readonly": 0
                },
                "tv_mode2": {
                        "name": "tv mode #2",
                        "group": [ "triggers" ],
                        "readonly": 0
                },
                "tv_mode3": {
                        "name": "tv mode #3",
                        "group": [ "triggers" ],
                        "readonly": 0
                },
                "lamp_slaapkamer_wakeup": {
                        "name": "slaapkamer wakeuplight aan",
                        "group": [ "settings" ],
                        "readonly": 0
                },
                "leds_woonkamer_uit": {
                        "name": "leds woonkamer uit",
                        "group": [ "triggers" ],
                        "readonly": 0
                },
                "kasten_aan": {
                        "name": "leds kasten aan",
                        "group": [ "triggers" ],
                        "readonly": 0
                },
                "scenario99": {
                        "name": "scenario #99",
                        "group": [ "triggers" ],
                        "readonly": 0
                },
                "alles_uit": {
                        "name": "alles uit!",
                        "group": [ "triggers" ],
                        "readonly": 0
                },
                "dj_lamp": {
                        "name": "mix licht",
                        "group": [ "woonkamer" ],
                        "readonly": 0
                },
                "waterval": {
                        "name": "waterval",
                        "group": [ "buiten" ],
                        "readonly": 0
                },
                "lamp_kast2": {
                        "name": "leds kast",
                        "group": [ "woonkamer" ],
                        "readonly": 0
                },
                "fan_woonkamer": {
                        "name": "fan",
                        "group": [ "woonkamer" ],
                        "readonly": 0
                },
                "waterval_auto_aan": {
                        "name": "waterval automatisch aan",
                        "group": [ "settings" ],
                        "readonly": 0
                }
        },
        "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-cache": 1,
                "whitelist": "",
                "ntp-servers": [ "192.168.1.150" ],
                "gpio-platform": "raspberrypi3"
        },
        "hardware": {
                "433gpio": {
                        "sender": 0,
                        "receiver": 1
                }
        },
        "registry": {
                "webserver": {
                        "ssl": {
                                "certificate": {
                                        "location": "/etc/pilight/pilight.pem"
                                }
                        }
                },
                "pilight": {
                        "version": {
                                "current": "8.1.4"
                        }
                },
                "hardware": {
                        "RF433": {
                                "mingaplen": 4420,
                                "maxgaplen": 72900,
                                "minrawlen": 26,
                                "maxrawlen": 400
                        }
                }
        }
}
 
Reply
#16
Where that backtrace?

Great config through. It was easy to replicate the bug.
 
Reply
#17
(04-04-2019, 09:47 PM)curlymo Wrote: Where that backtrace?

Sorry, i didn't know about gdb yet.
I thought you just needed the output from pilight-daemon -D

(04-04-2019, 09:47 PM)curlymo Wrote: Great config through. It was easy to replicate the bug.

Thanks :)

Do you still need the gdb debugging output? (Since you replicated the bug.)
Please let me know.
 
Reply
#18
No, currently working on that fix.
 
Reply
  


Possibly Related Threads...
Thread Author Replies Views Last Post
  Strange issues with kaku_switch and v8.1.4 bitboy 7 466 05-13-2019, 09:17 PM
Last Post: curlymo
  Basic testing pilight hardware dirk 5 1,031 06-07-2018, 06:09 PM
Last Post: curlymo
  Update to v8.0.10-nightly-a1279212 Ulrich.Arnold 3 1,283 06-04-2018, 08:31 PM
Last Post: curlymo
  [Solved] reach of pilight hardware PT-Biker 2 984 05-21-2018, 08:28 AM
Last Post: PT-Biker
  Issues receiving RF OrangeTang 8 1,072 05-13-2018, 09:27 AM
Last Post: curlymo
  Elro 800 issues after upgrade to 8.0.9 TomiB 2 682 01-29-2018, 10:12 PM
Last Post: TomiB
  Updates for nightly Ulrich.Arnold 1 574 01-26-2018, 07:31 PM
Last Post: curlymo
  pilight works without connected hardware wanky 4 1,471 12-29-2017, 06:10 PM
Last Post: curlymo
  pilight does no longer start because of hardware error stratege-0815 2 1,062 12-27-2017, 11:16 PM
Last Post: stratege-0815
  Installing WiringX Python Module on Radxa Rock 8BitBob 5 1,320 04-20-2017, 07:20 PM
Last Post: curlymo

Forum Jump:


Browsing: 1 Guest(s)