• 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
Daemon problems: no apparant sudo access
#1
pilight was working fine for me, but unfortunately after doing a fresh reinstall (I had pilight v 8.0 and now upgraded to 8.1.2 master branch) direct GPIO access is flawed. I can run

Service pilight start

But when I send commands using pilight-send, it doesn't work. I am using the same config file as before, but it seems to keep forking the daemon now...
 
Reply
#2
Not enough information to say something about the issue.
 
Reply
#3
Alright, up until a couple days back, I was able to switch on my RF remote controlled sockets (kaku_switch protocol) using a Raspberry Pi 3, a cheap RF transmitter/receiver pair, and pilight. I never actually used the GUI, but a custom app with shell commands like:

Code:
pilight-send -p kaku_switch -i 25544186 -u 1 -t


And then my lights would turn on. Now, I had to reinstall everything for other reasons, and I just followed the manual 
at manual.pilight.org

Code:
echo "deb http:// apt.pilight.org/ stable main" > /etc/apt/sources.list.d/pilight.list
wget -O - http:// apt.pilight.org/pilight.key | apt-key add -
apt-get update && apt install pilight


And after configuring some of my config.json:

Code:
{

"devices": {
"lamp1": {
"protocol": [ "kaku_switch" ],
"id": [{
"id": 25544186,
"unit": 0
}],
"state": "off"
}
},
"rules": {},
"gui": {
"lamp1": {
"name": "Lamp 1",
"group": [ "Woonkamer" ],
"media": [ "all" ]
}
},
"settings": {
"log-level": 6,
"pid-file": "/var/run/pilight.pid",
"log-file": "/var/log/pilight.log",
"webserver-enable": 1,
"webserver-root": "/usr/local/share/pilight/webgui",
"webserver-http-port": 5001,
"webserver-https-port": 5002,
"webserver-cache": 1,
"gpio-platform": "raspberrypi3"
},
"hardware": {
"433gpio": {
"sender": 7,
"receiver": 0
}
},
"registry": {
"webserver": {
"ssl": {
"certificate": {
"secure": 0,
"location": "/etc/pilight/pilight.pem"
}
}
},
"pilight": {
"version": {
"current": "8.0.8"
}
}
}

I can finally use:

Code:
pi@redfordbase:~ $ sudo su

root@redfordbase:/home/pi# service pilight start
root@redfordbase:/home/pi# pilight-send -p kaku_switch -i 25544186 -u 1 -t
root@redfordbase:/home/pi# pilight-send -p kaku_switch -i 25544186 -u 1 -f


But to no avail. I don't know why it is not sending anything out through the GPIO, since it also does not give me any additional errors and I can only see the main process being 'forked' into other PIDs. 


Code:
root@redfordbase:/home/pi# pilight-daemon --debug

[Aug 13 21:26:56:774936] pilight-daemon: DEBUG: loaded event function /usr/local/lib/pilight/functions/date_add.lua v2.0
[Aug 13 21:26:56:776283] pilight-daemon: DEBUG: loaded event function /usr/local/lib/pilight/functions/random.lua v2.1
[Aug 13 21:26:56:777185] pilight-daemon: DEBUG: loaded event function /usr/local/lib/pilight/functions/date_format.lua v1.0
[Aug 13 21:26:56:778080] pilight-daemon: DEBUG: loaded event operator /usr/local/lib/pilight/operators/intdivide.lua v1.0
[Aug 13 21:26:56:778720] pilight-daemon: DEBUG: loaded event operator /usr/local/lib/pilight/operators/or.lua v1.0
[Aug 13 21:26:56:779213] pilight-daemon: DEBUG: loaded event operator /usr/local/lib/pilight/operators/concat.lua v1.0
[Aug 13 21:26:56:779694] pilight-daemon: DEBUG: loaded event operator /usr/local/lib/pilight/operators/plus.lua v1.0
[Aug 13 21:26:56:780221] pilight-daemon: DEBUG: loaded event operator /usr/local/lib/pilight/operators/gt.lua v1.0
[Aug 13 21:26:56:780831] pilight-daemon: DEBUG: loaded event operator /usr/local/lib/pilight/operators/modulus.lua v1.0
[Aug 13 21:26:56:781330] pilight-daemon: DEBUG: loaded event operator /usr/local/lib/pilight/operators/ne.lua v1.0
[Aug 13 21:26:56:781850] pilight-daemon: DEBUG: loaded event operator /usr/local/lib/pilight/operators/divide.lua v1.0
[Aug 13 21:26:56:782301] pilight-daemon: DEBUG: loaded event operator /usr/local/lib/pilight/operators/and.lua v1.0
[Aug 13 21:26:56:782774] pilight-daemon: DEBUG: loaded event operator /usr/local/lib/pilight/operators/ge.lua v1.0
[Aug 13 21:26:56:783372] pilight-daemon: DEBUG: loaded event operator /usr/local/lib/pilight/operators/multiply.lua v1.0
[Aug 13 21:26:56:783907] pilight-daemon: DEBUG: loaded event operator /usr/local/lib/pilight/operators/eq.lua v1.0
[Aug 13 21:26:56:784555] pilight-daemon: DEBUG: loaded event operator /usr/local/lib/pilight/operators/lt.lua v1.0
[Aug 13 21:26:56:785149] pilight-daemon: DEBUG: loaded event operator /usr/local/lib/pilight/operators/minus.lua v1.0
[Aug 13 21:26:56:786059] pilight-daemon: DEBUG: loaded event operator /usr/local/lib/pilight/operators/le.lua v1.0
[Aug 13 21:26:56:790253] pilight-daemon: DEBUG: loaded event action /usr/local/lib/pilight/actions/dim.lua v4.1
[Aug 13 21:26:56:792802] pilight-daemon: DEBUG: loaded event action /usr/local/lib/pilight/actions/sendmail.lua v4.1
[Aug 13 21:26:56:796259] pilight-daemon: DEBUG: loaded event action /usr/local/lib/pilight/actions/switch.lua v4.1
[Aug 13 21:26:56:797806] pilight-daemon: DEBUG: loaded event action /usr/local/lib/pilight/actions/pushover.lua v1.0
[Aug 13 21:26:56:799933] pilight-daemon: DEBUG: loaded event action /usr/local/lib/pilight/actions/toggle.lua v4.1
[Aug 13 21:26:56:803717] pilight-daemon: DEBUG: loaded event action /usr/local/lib/pilight/actions/label.lua v4.1
[Aug 13 21:26:56:805973] pilight-daemon: DEBUG: loaded event action /usr/local/lib/pilight/actions/pushbullet.lua v1.0
[Aug 13 21:26:56:810431] pilight-daemon: INFO: version v8.1.2-nightly-271a0ade
[Aug 13 21:26:56:810925] pilight-daemon: DEBUG: ssdp sent search
[Aug 13 21:26:56:915756] pilight-daemon: NOTICE: a pilight daemon was found @192.168.1.70, clientizing

[ Aug 13 21:26:57:37466] pilight-daemon: DEBUG: socket recv: {"message":"config","config":{"devices":{"lamp1":{"protocol":["kaku_switch"],"id":[{"id":12344000,"unit":0}],"state":"off"}},"rules":{},"gui":{"lamp1":{"name":"Lamp 1","group":["Woonkamer"],"media":["all"]}},"settings":{"log-level":6,"pid-file":"/var/run/pilight.pid","log-file":"/var/log/pilight.log","webserver-enable":1,"webserver-root":"/usr/local/share/pilight/webgui","webserver-http-port":5001,"webserver-https-port":5002,"webserver-cache":1,"gpio-platform":"raspberrypi3"},"hardware":{"433gpio":{"sender":7,"receiver":-1}},"registry":{"webserver":{"ssl":{"certificate":{"secure":0,"location":"/etc/pilight/pilight.pem"}}},"pilight":{"version":{"current":"8.1.2"}}}}}


No clue if this is helpful in any way, but that's the output of pilight-daemon --debug

Lastly, here's pilight status:

Code:
root@redfordbase:/home/pi# service pilight start

root@redfordbase:/home/pi# service pilight status
● pilight.service - pilight
  Loaded: loaded (/etc/systemd/system/pilight.service; enabled; vendor preset: enabled)
  Active: active (running) since Mon 2018-08-13 21:31:08 UTC; 4s ago
 Process: 2387 ExecStart=/usr/local/sbin/pilight-daemon (code=exited, status=0/SUCCESS)
Main PID: 2391 (pilight-daemon)
  CGroup: /system.slice/pilight.service
          └─2391 /usr/local/sbin/pilight-daemon

aug 13 21:31:08 redfordbase systemd[1]: Starting pilight...
aug 13 21:31:08 redfordbase systemd[1]: Started pilight.
root@redfordbase:/home/pi#


I hope you guys know any possible solutions, because I've tried pretty much everything I can think of, but am not getting any closer to getting results..
 
Reply
#4
If you post this much information, can you do so according to the forum rules?
 
Reply
  


Possibly Related Threads...
Thread Author Replies Views Last Post
  oom_reaper: reaped process pilight-daemon va13 4 655 05-15-2019, 08:03 AM
Last Post: va13
  Problems after upgrade with switching on and off multiple lamps consecutively Mario.Steinberg 30 2,021 05-02-2019, 05:15 PM
Last Post: curlymo
  Using pilight-daemon socket API def_meggi 4 389 04-29-2019, 05:58 PM
Last Post: curlymo
  pilight-daemon does not start since 8.1.3-21 robertkrause 1 570 11-05-2018, 07:01 PM
Last Post: robertkrause
Thumbs Up Newbie problems, usbnano connection and rsl366 pukington 1 505 02-14-2018, 07:36 PM
Last Post: pukington
  pilight-daemon: cpu usage too high when using sendmail bnk72 11 1,853 01-25-2018, 10:00 AM
Last Post: curlymo
  SSDP Problems stritzi 1 878 11-14-2017, 01:18 PM
Last Post: curlymo
  pilight-daemon on LEDE ? hasselh 5 1,466 11-05-2017, 09:17 PM
Last Post: curlymo
  Problems with pilight 7.0, Pi 3 IncepTer 1 1,214 08-30-2017, 09:36 PM
Last Post: curlymo
  daemon crash on orange pi pc plus now 8 1,764 06-28-2017, 10:15 AM
Last Post: curlymo

Forum Jump:


Browsing: 1 Guest(s)