Gut nun ersetze root durch pi
Und dann .....homebridge restart
Und log zeigen.
Gut nun ersetze root durch pi
Und dann .....homebridge restart
Und log zeigen.
Ohne sudo, habe ich immer noch das Passswort Problem und mit Sudo kommt folgendens:
pi@raspberrypi:~ $ /etc/init.d/homebridge start
Passwort:
-su: /var/log/homebridge.log: Keine Berechtigung
Homebridge starting
Homebridge is not running
pi@raspberrypi:~ $ sudo /etc/init.d/homebridge start
-su: /var/log/homebridge.log: Keine Berechtigung
Homebridge starting
Homebridge is not running
pi@raspberrypi:~ $ sudo tail -f /var/log/homebridge.log
Or enter this code with your HomeKit app on your iOS device to pair with Homebridge:
??????????????
? 031-45-154 ?
??????????????
[2018-1-3 20:39:08] Homebridge is running on port 41315.
[2018-1-3 21:04:38] Got SIGTERM, shutting down Homebridge...
Alles anzeigen
Bitte nochmal kurz zum Verständnis. Das Homebridge-Verzeichnis liegt immer an der gleichen Stelle (Ordner) egal ob root oder pi nur beim starten ist es wichtig wo die config.json ist? Kann ich die dann nicht "einfach" ins root kopieren oder dort erstellen und alles funktioniert. Das wird wohl noch eine Weile daueren bis ich das mit root (=Admin?) und Pi (=Gast-User?) verstanden habe.
Starten mit
sudo /etc/init.d/homebridge start
Jetzt hat pi nicht das recht in /var/log/ zuschreiben.
Also anpassen inde /etc/init.d/homebridge
var/log/homebridge.log 2>> /var/log/homebridge.err &"
In
/home/pi/homebridge.log 2>> /home/pi/homebridge.err &"
Dann mit
tail -f /home/pi/homebridge.log
Nachsehen im log
Okay, das scheint er erstmal gefressen zu haben, es kommt aber immer noch die Meldung Homebridge is not running:
pi@raspberrypi:~ $ sudo /etc/init.d/homebridge start
Homebridge starting
Homebridge is not running
pi@raspberrypi:~ $ tail -f /home/pi/homebridge.log
[2018-1-3 22:24:30] [HomeMatic CCU] init RPC for HmIP-RF.
[2018-1-3 22:24:30] [HomeMatic CCU] local ip used : 192.168.1.24. you may change that with local_ip parameter in config
[2018-1-3 22:24:30] [HomeMatic CCU] Fetching Homematic devices...
[2018-1-3 22:24:30] Loading 0 accessories...
[2018-1-3 22:24:30] [HomeMatic CCU] RPC server for interface BidCos-RF. is listening on port 9090.
[2018-1-3 22:24:30] [HomeMatic CCU] Creating Local HTTP Client for CCU RPC Events
[2018-1-3 22:24:30] [HomeMatic CCU] RPC server for interface HmIP-RF. is listening on port 9092.
[2018-1-3 22:24:30] [HomeMatic CCU] Creating Local HTTP Client for CCU RPC Events
[2018-1-3 22:24:30] [HomeMatic CCU] if PONG is PONG CCU is alive
[2018-1-3 22:24:32] [HomeMatic CCU] NPM 0.0.96 vs Local 0.0.96
[2018-1-3 22:24:58] [HomeMatic CCU] Fetch Response
[2018-1-3 22:24:58] [HomeMatic CCU] Initializing platform accessory 'Bewegungsmelder Treppe'...
[2018-1-3 22:24:58] [HomeMatic CCU] Initializing platform accessory 'Bewegungsmelder Wohnzimmer'...
[2018-1-3 22:24:58] [HomeMatic CCU] Initializing platform accessory 'Licht Badezimmer Farbe'...
[2018-1-3 22:24:58] [HomeMatic CCU] Initializing platform accessory 'Licht Flur'...
[2018-1-3 22:24:58] [HomeMatic CCU] Initializing platform accessory 'Licht Küche'...
[2018-1-3 22:24:58] [HomeMatic CCU] Initializing platform accessory 'Licht Hauswirtschaftsraum'...
[2018-1-3 22:24:58] [HomeMatic CCU] Initializing platform accessory 'Licht Kleiderschrank'...
[2018-1-3 22:24:58] [HomeMatic CCU] Initializing platform accessory 'Licht Küchenschrank'...
[2018-1-3 22:24:58] [HomeMatic CCU] Initializing platform accessory 'Licht Spiegelschrank'...
[2018-1-3 22:24:58] [HomeMatic CCU] Initializing platform accessory 'Licht Wintergarten'...
[2018-1-3 22:24:58] [HomeMatic CCU] Initializing platform accessory 'Licht Wohnzimmer'...
[2018-1-3 22:24:58] [HomeMatic CCU] Initializing platform accessory 'Licht Wohnzimmer klein'...
[2018-1-3 22:24:58] [HomeMatic CCU] Initializing platform accessory 'Rollladen Badezimmer'...
[2018-1-3 22:24:58] [HomeMatic CCU] Initializing platform accessory 'Rollladen Hauswirtschaftsraum'...
[2018-1-3 22:24:58] [HomeMatic CCU] Initializing platform accessory 'Rollladen Küche'...
[2018-1-3 22:24:58] [HomeMatic CCU] Initializing platform accessory 'Rollladen Wohnzimmer 1'...
[2018-1-3 22:24:58] [HomeMatic CCU] Initializing platform accessory 'Rollladen Wohnzimmer 2'...
Setup Payload:
X-HM://0023ISYWY9EK2
Scan this code with your HomeKit app on your iOS device to pair with Homebridge:
Or enter this code with your HomeKit app on your iOS device to pair with Homebridge:
??????????????
? 031-45-154 ?
??????????????
[2018-1-3 22:24:59] [HomeMatic CCU] Number of mapped devices : 17
[2018-1-3 22:24:59] Homebridge is running on port 51826.
[2018-1-3 22:24:59] [HomeMatic CCU] will cache ccu response ...
Alles anzeigen
Laufen tut es
running on port 51826
Der Port ist auch der Standard.
Der Fehler muss nun in der PID Auswertung in
/etc/init.d/homebridge liegen.
Post doch nochmal die aktuelle, komplette Datei .
Okay:
#!/bin/sh
### BEGIN INIT INFO
# Provides: homebridge
# Required-Start: $network $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start daemon at boot time for homebridge
# Description: Enable service provided by daemon.
### END INIT INFO
export PATH=$PATH:/usr/local/bin
export NODE_PATH=$NODE_PATH:/usr/local/lib/node_modules
PID=`pidof homebridge`
case "$1" in
start)
if ps -p $PID > /dev/null 2>&1; then
echo "Homebridge is already running"
else
# su - pi -c "homebridge > /dev/null 2>&1 &"
su - pi -c "homebridge >> /home/pi/homebridge.log 2>> /home/pi/homebridge.err &"
echo "Homebridge starting"
$0 status
fi
;;
stop)
if ! ps -p $PID > /dev/null 2>&1; then
echo "Homebridge is not running"
else
kill $PID
echo "Homebridge closed"
fi
;;
restart)
if ! ps -p $PID > /dev/null 2>&1; then
$0 start
else
Alles anzeigen
habe jetzt doch weiter Form die Datei gefunden,
Da wird nach dem Start
$0 status
Aufgerufen, habe aber keinen Eintrag
status)
Gefunden.
Dann mach mal # davor am Zeilen Anfang.
Deine start Datei ist unvollständig.
Mit dem iPad ist das in und her scrollen im Thread etwas doof.
im Post 28 fehlt der untere Teil der Datei.
Stimmt, mein Fehler, sorry
#!/bin/sh
### BEGIN INIT INFO
# Provides: homebridge
# Required-Start: $network $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start daemon at boot time for homebridge
# Description: Enable service provided by daemon.
### END INIT INFO
export PATH=$PATH:/usr/local/bin
export NODE_PATH=$NODE_PATH:/usr/local/lib/node_modules
PID=`pidof homebridge`
case "$1" in
start)
if ps -p $PID > /dev/null 2>&1; then
echo "Homebridge is already running"
else
# su - pi -c "homebridge > /dev/null 2>&1 &"
su - pi -c "homebridge >> /home/pi/homebridge.log 2>> /home/pi/homebridge.err &"
echo "Homebridge starting"
$0 status
fi
;;
stop)
if ! ps -p $PID > /dev/null 2>&1; then
echo "Homebridge is not running"
else
kill $PID
echo "Homebridge closed"
fi
;;
restart)
if ! ps -p $PID > /dev/null 2>&1; then
$0 start
else
$0 stop
$0 start
fi
;;
status)
if ps -p $PID > /dev/null 2>&1; then
echo "Homebridge is running PID $PID"
else
echo "Homebridge is not running"
fi
;;
*)
echo "Usage: $0 {start|stop|status|restart}"
exit 1
;;
esac
exit 0
Alles anzeigen
Ok Staus gibt es doch,
Was sagt er bei laufender homebridge
sudo /etc/init.d/homebridge status
?
Und
sudo ps -ax | grep homebridge
Wenn ich neu starte, habe ich wieder den Effekt wie am Anfang, durch die Eingefügte log Datei kann man aber jetzt sehen das es sich wohl an einem rega script aufhängt.
login as: pi
[email protected]'s password:
Linux raspberrypi 4.9.59-v7+ #1047 SMP Sun Oct 29 12:19:23 GMT 2017 armv7l
The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Wed Jan 3 22:30:09 2018
pi@raspberrypi:~ $ tail -f /home/pi/homebridge.log
??????????????
? 031-45-154 ?
??????????????
[2018-1-3 22:30:11] [HomeMatic CCU] Number of mapped devices : 17
[2018-1-3 22:30:11] Homebridge is running on port 51826.
[2018-1-3 22:30:23] [HomeMatic CCU] NPM 0.0.96 vs Local 0.0.96
[2018-1-3 22:32:18] [HomeMatic CCU] timeout while executing rega script
[2018-1-3 22:32:18] [HomeMatic CCU] timeout while executing rega script
Alles anzeigen
Nach einem restart läuft dann alles wieder perfekt.
pi@raspberrypi:~ $ sudo /etc/init.d/homebridge restart
Homebridge closed
Homebridge starting
Homebridge is not running
pi@raspberrypi:~ $ tail -f /home/pi/homebridge.log
[2018-1-3 22:58:09] [HomeMatic CCU] init RPC for HmIP-RF.
[2018-1-3 22:58:09] [HomeMatic CCU] local ip used : 192.168.1.24. you may change that with local_ip parameter in config
[2018-1-3 22:58:09] [HomeMatic CCU] Fetching Homematic devices...
[2018-1-3 22:58:09] Loading 0 accessories...
[2018-1-3 22:58:09] [HomeMatic CCU] RPC server for interface BidCos-RF. is listening on port 9090.
[2018-1-3 22:58:09] [HomeMatic CCU] Creating Local HTTP Client for CCU RPC Events
[2018-1-3 22:58:09] [HomeMatic CCU] RPC server for interface HmIP-RF. is listening on port 9092.
[2018-1-3 22:58:09] [HomeMatic CCU] Creating Local HTTP Client for CCU RPC Events
[2018-1-3 22:58:09] [HomeMatic CCU] if PONG is PONG CCU is alive
[2018-1-3 22:58:12] [HomeMatic CCU] NPM 0.0.96 vs Local 0.0.96
[2018-1-3 22:58:37] [HomeMatic CCU] Fetch Response
[2018-1-3 22:58:38] [HomeMatic CCU] Initializing platform accessory 'Bewegungsmelder Treppe'...
[2018-1-3 22:58:38] [HomeMatic CCU] Initializing platform accessory 'Bewegungsmelder Wohnzimmer'...
[2018-1-3 22:58:38] [HomeMatic CCU] Initializing platform accessory 'Licht Badezimmer Farbe'...
[2018-1-3 22:58:38] [HomeMatic CCU] Initializing platform accessory 'Licht Flur'...
[2018-1-3 22:58:38] [HomeMatic CCU] Initializing platform accessory 'Licht Küche'...
[2018-1-3 22:58:38] [HomeMatic CCU] Initializing platform accessory 'Licht Hauswirtschaftsraum'...
[2018-1-3 22:58:38] [HomeMatic CCU] Initializing platform accessory 'Licht Kleiderschrank'...
[2018-1-3 22:58:38] [HomeMatic CCU] Initializing platform accessory 'Licht Küchenschrank'...
[2018-1-3 22:58:38] [HomeMatic CCU] Initializing platform accessory 'Licht Spiegelschrank'...
[2018-1-3 22:58:38] [HomeMatic CCU] Initializing platform accessory 'Licht Wintergarten'...
[2018-1-3 22:58:38] [HomeMatic CCU] Initializing platform accessory 'Licht Wohnzimmer'...
[2018-1-3 22:58:38] [HomeMatic CCU] Initializing platform accessory 'Licht Wohnzimmer klein'...
[2018-1-3 22:58:38] [HomeMatic CCU] Initializing platform accessory 'Rollladen Badezimmer'...
[2018-1-3 22:58:38] [HomeMatic CCU] Initializing platform accessory 'Rollladen Hauswirtschaftsraum'...
[2018-1-3 22:58:38] [HomeMatic CCU] Initializing platform accessory 'Rollladen Küche'...
[2018-1-3 22:58:38] [HomeMatic CCU] Initializing platform accessory 'Rollladen Wohnzimmer 1'...
[2018-1-3 22:58:38] [HomeMatic CCU] Initializing platform accessory 'Rollladen Wohnzimmer 2'...
Setup Payload:
X-HM://0023ISYWY9EK2
Scan this code with your HomeKit app on your iOS device to pair with Homebridge:
Or enter this code with your HomeKit app on your iOS device to pair with Homebridge:
??????????????
? 031-45-154 ?
??????????????
[2018-1-3 22:58:38] [HomeMatic CCU] Number of mapped devices : 17
[2018-1-3 22:58:38] Homebridge is running on port 51826.
[2018-1-3 22:58:38] [HomeMatic CCU] will cache ccu response ...
Alles anzeigen
Liegt dann vielleicht an dem Homematic plugin?
Wenn die Bridge richtig läuft:
pi@raspberrypi:~ $ sudo /etc/init.d/homebridge status
Homebridge is running PID 736
pi@raspberrypi:~ $ sudo ps -ax | grep homebridge
736 ? Sl 0:05 homebridge
792 pts/0 S+ 0:00 grep --color=auto homebridge
Nach einem Neustart:
login as: pi
[email protected]'s password:
Linux raspberrypi 4.9.59-v7+ #1047 SMP Sun Oct 29 12:19:23 GMT 2017 armv7l
The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Wed Jan 3 23:02:47 2018
pi@raspberrypi:~ $ sudo /etc/init.d/homebridge status
Homebridge is running PID 486
pi@raspberrypi:~ $ sudo ps -ax | grep homebridge
486 ? Sl 0:03 homebridge
697 pts/0 S+ 0:00 grep --color=auto homebridge
pi@raspberrypi:~ $
Alles anzeigen
Mich stört diese Meldung.
Homebridge is not running
Das sieht aber eher danach aus das noch etwas für die CCU erst starten muss.
Bevor homebridge zugreifen kann.
Ich kenne aber weder CCU Plugin noch das Gerät.
homebridge selber läuft in beiden Logs im Post 34
So ist es richtig
Ja, die Homebridge läuft in beiden Logs...
Werde dazu wohl mal thkl im Homematic Forum kontaktieren, den Programmierer dieses Plugins.
Was allerdings wirklich komisch ist, dass nach einem Restart der Homebridge alles funktioniert aber immer noch die Meldung kommt: Homebridge is not running.
Vielen Dank, das Du Dir soviel Zeit genommen hast!!!
sollte also so aussehen:
#!/bin/sh
### BEGIN INIT INFO
# Provides: homebridge
# Required-Start: $network $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start daemon at boot time for homebridge
# Description: Enable service provided by daemon.
### END INIT INFO
export PATH=$PATH:/usr/local/bin
export NODE_PATH=$NODE_PATH:/usr/local/lib/node_modules
PID=`pidof homebridge`
case "$1" in
start)
if ps -p $PID > /dev/null 2>&1; then
echo "Homebridge is already running"
else
# su - pi -c "homebridge > /dev/null 2>&1 &"
su - pi -c "homebridge >> /home/pi/homebridge.log 2>> /home/pi/homebridge.err &"
echo "Homebridge starting"
sleep 2
$0 status
fi
;;
stop)
if ! ps -p $PID > /dev/null 2>&1; then
echo "Homebridge is not running"
else
kill $PID
echo "Homebridge closed"
fi
;;
restart)
if ! ps -p $PID > /dev/null 2>&1; then
$0 start
else
$0 stop
$0 start
fi
;;
status)
if ps -p $PID > /dev/null 2>&1; then
echo "Homebridge is running PID $PID"
else
echo "Homebridge is not running"
fi
;;
*)
echo "Usage: $0 {start|stop|status|restart}"
exit 1
;;
esac
exit 0
Alles anzeigen