• 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
[SOLVED] pilight wont start since update from 8.0.8 to 8.1.2
#1
Hi Curlymo

Recently my SD card on my HomeAssistant Pi failed and I took the opportunity to start afresh since it was fairly bogged down.  I installed all the software I previously used which works quite happily, that being HA, Homebridge, dasher.  It's only pilight I'm having issues with unfortunately and since it's such a great bit of kit I really want to get past my issues.

I'm using a 433 Nano with pilight, it worked perfectly before.  I simply use pilight to receive button presses from various remotes that interact with homeassistant to make the house more 'wife friendly'.

Since the change from 8.0.8 to 8.1.2 my pilight won't start using my old config, shown below.  Unfortunately I'm not clever enough to work out why and would really appreciate your input.

PHP Code:
{
    
"devices": {
        
"backlight": {
            
"protocol": ["kaku_switch"],
            
"id": [{
                
"id"5628626,
                
"unit"1
            
}],
            
"state""off"
        
},
        
"lounge_lamp": {
            
"protocol": ["kaku_switch"],
            
"id": [{
                
"id"5628626,
                
"unit"0
            
}],
            
"state""on"
        
},
        
"screen": {
            
"protocol": ["kaku_screen_old"],
            
"id": [{
                
"id"14,
                
"unit"6
            
}],
            
"state""down"
        
}
    },
    
"rules": {
        
"toggle_screen": {
            
"rule""IF screen IS down THEN toggle DEVICE screen BETWEEN down AND up",
            
"active"1
        
}
    },
    
"gui": {
        
"backlight": {
            
"name""Backlight",
            
"group": ["Lights"],
            
"media": ["all"],
            
"readonly"0
        
},
        
"screen": {
            
"name""Screen",
            
"group": ["Entrances"],
            
"media": ["all"]
        },
        
"lounge_lamp": {
            
"name""Lamp",
            
"group": ["Lights"],
            
"media": ["all"],
            
"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-https-port"5002,
        
"webserver-cache"1,
        
"port"5000,
        
"gpio-platform""none"
    
},
    
"hardware": {
        
"433nano": {
            
"comport""/dev/ttyUSB0"
        
}
    },
    
"registry": {
        
"webserver": {
            
"ssl": {
                
"certificate": {
                    
"secure"0,
                    
"location""/etc/pilight/pilight.pem"
                
}
            }
        },
        
"pilight": {
            
"firmware": {
                
"version"1,
                
"lpf"8,
                
"hpf"1600
            
},
            
"version": {
                
"current""8.1.2"
            
}
        }
    }



I changed the version number to 8.1.2 but still get a journal error of:

Code:
Jul 30 13:42:28 Pi3 sudo[19997]:      puk : TTY=pts/0 ; PWD=/home/puk ; USER=root ; COMMAND=/bin/systemctl start pilight.service
Jul 30 13:42:28 Pi3 sudo[19997]: pam_unix(sudo:session): session opened for user root by puk(uid=0)
Jul 30 13:42:28 Pi3 systemd[1]: Starting pilight...
-- Subject: Unit pilight.service has begun start-up
-- Defined-By: systemd
-- Support: debian.org/support
--
-- Unit pilight.service has begun starting up.
Jul 30 13:42:28 Pi3 systemd[1]: pilight.service: Control process exited, code=exited status=1
Jul 30 13:42:28 Pi3 systemd[1]: Failed to start pilight.
-- Subject: Unit pilight.service has failed
-- Defined-By: systemd
-- Support: debian.org/support
--
-- Unit pilight.service has failed.
--
-- The result is failed.
Jul 30 13:42:28 Pi3 systemd[1]: pilight.service: Unit entered failed state.
Jul 30 13:42:28 Pi3 systemd[1]: pilight.service: Failed with result 'exit-code'.

With the config.json included on install and edited to include the nano, I can use pilight-receive, but when using my config.json pilight won't start. As far as I can see all my json is valid.

Thanks for any help and thanks for a great product curlymo!
 
Reply
#2
Check the error messages in the log or when starting pilight in debugging mode.
 
Reply
#3
(07-30-2018, 04:43 PM)curlymo Wrote: Check the error messages in the log or when starting pilight in debugging mode.

Thanks mate, apparently my IF statement was dodgy.  As I say though, that config is simply a backup from my previous working one with no differences.  It's also thrown out my other switch.  I've used a really basic config and got some weird things happening.

So my current config is basic:
Code:
{
       "devices": {
               "backlight": {
                       "protocol": [ "kaku_switch" ],
                       "id": [{
                               "id": 5628626,
                               "unit": 1
                       }],
                       "state": "off"
               }
       },
       "rules": {},
       "gui": {
               "backlight": {
                       "name": "Backlight",
                       "group": [ "Lights" ],
                       "media": [ "all" ],
                       "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-https-port": 5002,
               "webserver-cache": 1,
               "port": 5000,
               "gpio-platform": "none"
       },
       "hardware": {
               "433nano": {
                       "comport": "/dev/ttyUSB0"
               }
       },
       "registry": {
               "webserver": {
                       "ssl": {
                               "certificate": {
                                       "secure": 0,
                                       "location": "/etc/pilight/pilight.pem"
                               }
                       }
               },
               "pilight": {
                       "firmware": {
                               "version": 1,
                               "lpf": 8,
                               "hpf": 1600
                       },
                       "version": {
                               "current": "8.1.2"
                       }
               }
       }
}

It passes no errors.  If i reboot my Pi, it starts, I get the webgui and it operates to a button press.  If i stop the service with 'sudo systemctl pilight-service stop' and try and use sudo 'pilight-daemon -D' pilight starts up, webgui is there but it doesn't react to button presses. My -D output is below, no reaction to presses at all:

Code:
[Aug 02 14:26:29:106530] pilight-daemon: DEBUG: loaded event function /usr/local/lib/pilight/functions/date_add.lua v2.0
[Aug 02 14:26:29:107440] pilight-daemon: DEBUG: loaded event function /usr/local/lib/pilight/functions/date_format.lua v1.0
[Aug 02 14:26:29:107984] pilight-daemon: DEBUG: loaded event function /usr/local/lib/pilight/functions/random.lua v2.1
[Aug 02 14:26:29:108693] pilight-daemon: DEBUG: loaded event operator /usr/local/lib/pilight/operators/modulus.lua v1.0
[Aug 02 14:26:29:109293] pilight-daemon: DEBUG: loaded event operator /usr/local/lib/pilight/operators/and.lua v1.0
[Aug 02 14:26:29:109756] pilight-daemon: DEBUG: loaded event operator /usr/local/lib/pilight/operators/multiply.lua v1.0
[Aug 02 14:26:29:110267] pilight-daemon: DEBUG: loaded event operator /usr/local/lib/pilight/operators/lt.lua v1.0
[Aug 02 14:26:29:110711] pilight-daemon: DEBUG: loaded event operator /usr/local/lib/pilight/operators/plus.lua v1.0
[Aug 02 14:26:29:111170] pilight-daemon: DEBUG: loaded event operator /usr/local/lib/pilight/operators/or.lua v1.0
[Aug 02 14:26:29:111662] pilight-daemon: DEBUG: loaded event operator /usr/local/lib/pilight/operators/ge.lua v1.0
[Aug 02 14:26:29:112154] pilight-daemon: DEBUG: loaded event operator /usr/local/lib/pilight/operators/ne.lua v1.0
[Aug 02 14:26:29:112558] pilight-daemon: DEBUG: loaded event operator /usr/local/lib/pilight/operators/minus.lua v1.0
[Aug 02 14:26:29:113012] pilight-daemon: DEBUG: loaded event operator /usr/local/lib/pilight/operators/gt.lua v1.0
[Aug 02 14:26:29:113587] pilight-daemon: DEBUG: loaded event operator /usr/local/lib/pilight/operators/divide.lua v1.0
[Aug 02 14:26:29:114101] pilight-daemon: DEBUG: loaded event operator /usr/local/lib/pilight/operators/eq.lua v1.0
[Aug 02 14:26:29:115258] pilight-daemon: DEBUG: loaded event operator /usr/local/lib/pilight/operators/intdivide.lua v1.0
[Aug 02 14:26:29:115882] pilight-daemon: DEBUG: loaded event operator /usr/local/lib/pilight/operators/le.lua v1.0
[Aug 02 14:26:29:116467] pilight-daemon: DEBUG: loaded event operator /usr/local/lib/pilight/operators/concat.lua v1.0
[Aug 02 14:26:29:118597] pilight-daemon: DEBUG: loaded event action /usr/local/lib/pilight/actions/switch.lua v4.1
[Aug 02 14:26:29:119740] pilight-daemon: DEBUG: loaded event action /usr/local/lib/pilight/actions/pushover.lua v1.0
[Aug 02 14:26:29:120419] pilight-daemon: DEBUG: loaded event action /usr/local/lib/pilight/actions/sendmail.lua v4.1
[Aug 02 14:26:29:120923] pilight-daemon: DEBUG: loaded event action /usr/local/lib/pilight/actions/pushbullet.lua v1.0
[Aug 02 14:26:29:121503] pilight-daemon: DEBUG: loaded event action /usr/local/lib/pilight/actions/toggle.lua v4.1
[Aug 02 14:26:29:122955] pilight-daemon: DEBUG: loaded event action /usr/local/lib/pilight/actions/label.lua v4.1
[Aug 02 14:26:29:124829] pilight-daemon: DEBUG: loaded event action /usr/local/lib/pilight/actions/dim.lua v4.1
[Aug 02 14:26:29:126612] pilight-daemon: INFO: version v8.1.2-nightly-271a0ade
[Aug 02 14:26:29:126813] pilight-daemon: DEBUG: ssdp sent search
[Aug 02 14:26:29:234222] pilight-daemon: INFO: no pilight daemon found, daemonizing
[Aug 02 14:26:29:245210] pilight-daemon: INFO: daemon listening to port: 5000
[Aug 02 14:26:29:245804] pilight-daemon: DEBUG: new thread socket, 1 thread running
[Aug 02 14:26:29:245960] pilight-daemon: DEBUG: new thread ssdp, 2 threads running
[Aug 02 14:26:29:246049] pilight-daemon: INFO: new client, ip: 127.0.0.1, port: 55222
[Aug 02 14:26:29:246055] pilight-daemon: DEBUG: new thread sender, 3 threads running
[Aug 02 14:26:29:246095] pilight-daemon: DEBUG: client fd: 12
[Aug 02 14:26:29:246123] pilight-daemon: DEBUG: client id: 1
[Aug 02 14:26:29:246176] pilight-daemon: DEBUG: new thread broadcaster, 4 threads running
[Aug 02 14:26:29:247799] pilight-daemon: DEBUG: new thread 433nano, 5 threads running
[Aug 02 14:26:29:247988] pilight-daemon: DEBUG: new thread receive parser, 6 threads running
[Aug 02 14:26:29:248073] pilight-daemon: DEBUG: new thread events client, 7 threads running
[Aug 02 14:26:29:248141] pilight-daemon: DEBUG: new thread events loop, 8 threads running
[Aug 02 14:26:29:248237] pilight-daemon: DEBUG: ssdp sent search
[Aug 02 14:26:29:247819] pilight-daemon: INFO: secured webserver started on port: 5002 (fd 14)
[Aug 02 14:26:29:248619] pilight-daemon: INFO: regular webserver started on port: 5001 (fd 16)
[Aug 02 14:26:29:248643] pilight-daemon: DEBUG: ssdp sent notify
[Aug 02 14:26:29:354416] pilight-daemon: INFO: new client, ip: 192.168.0.3, port: 42882
[Aug 02 14:26:29:354469] pilight-daemon: DEBUG: client fd: 17
[Aug 02 14:26:29:354496] pilight-daemon: DEBUG: client id: 2
[Aug 02 14:26:29:354722] pilight-daemon: DEBUG: socket recv: {"action":"identify","options":{"config":1,"receiver":1},"media":"all"}
[Aug 02 14:26:29:354835] pilight-daemon: DEBUG: socket write succeeded: {"status":"success"}

[Aug 02 14:26:29:354898] pilight-daemon: DEBUG: socket write succeeded: {"action":"identify","options":{"config":1,"receiver":1},"media":"all"}

[ Aug 02 14:26:30:85190] pilight-daemon: DEBUG: cpu: 0.000000%
[ Aug 02 14:26:33:85650] pilight-daemon: DEBUG: cpu: 0.061691%
[ Aug 02 14:26:36:85793] pilight-daemon: DEBUG: cpu: 0.035985%


But if i reboot it works.  Same if i stop it, then restart it with systemctl, the gui operates but i get out no reaction from button presses.

Am I doing something silly here and I'm just not seeing it?  I'm literally banging my head against a brick wall lol.

I tried adding a second switch to my config.json:
Code:
{
       "devices": {
               "backlight": {
                       "protocol": [ "kaku_switch" ],
                       "id": [{
                               "id": 5628626,
                               "unit": 1
                       }],
                       "state": "off"
               },
               "lounge_lamp": {
                       "protocol": [ "kaku_switch" ],
                       "id": [{
                               "id": 5628626,
                               "unit": 0
                       }],
                       "state": "on"
               }
       },
       "rules": {},
       "gui": {
               "backlight": {
                       "name": "Backlight",
                       "group": [ "Lights" ],
                       "media": [ "all" ],
                       "readonly": 0
               },
               "lounge_lamp": {
                       "name": "Lamp",
                       "group": [ "Lights" ],
                       "media": [ "all" ],
                       "readonly": 0
               }
       },
       "settings": {
               "log-level": 6,
               "pid-file": "/var/run/pilight.pid",
               "log-file": "/var/log/pilight.log",
               "webserver-enable": 1,
               "port": 5000,
               "gpio-platform": "none"
       },
       "hardware": {
               "433nano": {
                       "comport": "/dev/ttyUSB0"
               }
       },
       "registry": {
               "webserver": {
                       "ssl": {
                               "certificate": {
                                       "secure": 0,
                                       "location": "/etc/pilight/pilight.pem"
                               }
                       }
               },
               "pilight": {
                       "firmware": {
                               "version": 1,
                               "lpf": 8,
                               "hpf": 1600
                       },
                       "version": {
                               "current": "8.1.2"
                       }
               }
       }
}

Which also passes jsonlint, but it won't start pilight on a reboot, whereas it does start with pilight-damon -D, I get a gui, but it doesn't react to button presses.

I get a systemctl journal error of:
Code:
● pilight.service - pilight
  Loaded: loaded (/etc/systemd/system/pilight.service; enabled; vendor preset: enabled)
  Active: failed (Result: signal) since Thu 2018-08-02 15:57:51 BST; 27s ago
 Process: 332 ExecStart=/usr/local/sbin/pilight-daemon (code=exited, status=0/SUCCESS)
Main PID: 431 (code=killed, signal=ABRT)

Aug 02 15:55:37 Pi3 systemd[1]: Starting pilight...
Aug 02 15:55:39 Pi3 systemd[1]: Started pilight.
Aug 02 15:57:51 Pi3 pilight-daemon[332]: pilight-daemon: /home/pilight/source/daemon-dev/libs/pilight/core/json.c:1147: emit_string: Assertion `utf8_validate(str)' failed.
Aug 02 15:57:51 Pi3 systemd[1]: pilight.service: Main process exited, code=killed, status=6/ABRT
Aug 02 15:57:51 Pi3 systemd[1]: pilight.service: Unit entered failed state.
Aug 02 15:57:51 Pi3 systemd[1]: pilight.service: Failed with result 'signal'.
No errors with daemon -D


I really don't get whats going on. I've tried a reinstall.
 
Reply
#4
Do you wait long enough for the USB nano to initialize?

And output the second error. I need a gdb debugging output to see why it fails. Check the manual for a howto.
 
Reply
#5
(08-02-2018, 05:29 PM)curlymo Wrote: Do you wait long enough for the USB nano to initialize?

And output the second error. I need a gdb debugging output to see why it fails. Check the manual for a howto.

Hi Curlymo, yes I was waiting long enough.

This can be marked as closed. I was debugging with gdb and thought i'd just start over again, new install of rasbian et all.  Miraculously it works and works fine with the previous config items.

Must have been some dodgy install, so I appreciate your input but thankfully it's running fine again!
 
Reply
#6
Just add prefix to the title marking solved like this: [SOLVED]
 
Reply
  


Possibly Related Threads...
Thread Author Replies Views Last Post
Tongue pilight 8.1.5-1-gc0a175e0 Chrashes fleisch 4 83 08-17-2019, 01:04 PM
Last Post: curlymo
  Solved - On / Off Command is the same command tigrablue 11 315 07-23-2019, 11:24 AM
Last Post: curlymo
  pilight for Raspbian Buster (raspberry pi 4) ? starob 29 1,488 07-15-2019, 08:45 PM
Last Post: curlymo
  pilight-receive Filteroption not working Alex 2 335 07-14-2019, 08:35 AM
Last Post: Alex
  pilight usb nano format conversion ettman8 2 228 07-14-2019, 08:32 AM
Last Post: curlymo
  pilight 8.1.4 crashes after some hours Ulrich.Arnold 47 1,979 06-29-2019, 08:58 PM
Last Post: curlymo
  Raspberry PI, gpio-ir-tx and pilight not starting lordslash 5 523 06-11-2019, 05:19 PM
Last Post: curlymo
  pilight fails starting on boot Alex 5 461 06-09-2019, 06:02 PM
Last Post: curlymo
  Google Assistant coupled to pilight hansrijn2 4 895 05-29-2019, 06:54 PM
Last Post: curlymo
  pilight-send does not stop (terminate) va13 3 454 05-15-2019, 06:06 PM
Last Post: curlymo

Forum Jump:


Browsing: 1 Guest(s)