In deinem Post # 53 ist nicht zu erkennen was auf einer Zeile steht.
Das ist wichtig!
In deinem Post # 53 ist nicht zu erkennen was auf einer Zeile steht.
Das ist wichtig!
systemctl status homebridge.service
? homebridge.service - Node.js HomeKit
Loaded: error (Reason: Bad message)
Active: inactive (dead)
Das ist der Status,
Die letzten Zeilen von Dem Inhalt von /var/log/syslog bzw. deamon
Ich habe den Inhalt nochmals komplett gelöscht und sauber am mac eingefügt.
Ich konnte nun die schritte ab
sudo systemctl daemon-reload
sauber ohne Fehlermeldung abarbeiten.
Homebridge läuft auch wieder.
Hierfür und für deine geduldigen Anleitungen vielen Dank.
Ich komme noch nicht ganz zurecht, was manchmal mit „was steht im log“ gemeint ist.
Kann ich noch irgendwie überprüfen, ob homebridge mit systemd sauber läuft?
Oct 12 22:38:15 raspberrypi homebridge[554]: [2017-10-12 22:38:15] WebHook: Started server on port '51828'.
Oct 12 22:38:15 raspberrypi homebridge[554]: [2017-10-12 22:38:15] Initializing VorwerkVacuumRobot platform...
Oct 12 22:38:15 raspberrypi homebridge[554]: [2017-10-12 22:38:15] [Hue] Initializing Hue platform...
Oct 12 22:38:15 raspberrypi homebridge[554]: [2017-10-12 22:38:15] [Hue] homebridge-hue v0.5.7, node v6.10.0, homebridge v0.4.22
Oct 12 22:38:15 raspberrypi homebridge[554]: [2017-10-12 22:38:15] Loading 0 accessories...
Oct 12 22:38:15 raspberrypi dhcpcd[436]: eth0: no IPv6 Routers available
Oct 12 22:38:15 raspberrypi homebridge[554]: [2017-10-12 22:38:15] Changed occupancy state for 192.168.192.56 to true. Last successful ping 2017-10-12T22:38:15+02:00 , last webhook none .
Oct 12 22:38:15 raspberrypi homebridge[554]: [2017-10-12 22:38:15] Changed occupancy state for 192.168.192.24 to true. Last successful ping 2017-10-12T22:38:15+02:00 , last webhook none .
Oct 12 22:38:15 raspberrypi homebridge[554]: [2017-10-12 22:38:15] [Hue] Philips hue: warning: api version 1.21.0
Oct 12 22:38:15 raspberrypi homebridge[554]: [2017-10-12 22:38:15] [Hue] Philips hue: BSB002 bridge v1709131301, api v1.21.0
Oct 12 22:38:15 raspberrypi homebridge[554]: [2017-10-12 22:38:15] [Hue] Philips hue: 6 accessories
Oct 12 22:38:15 raspberrypi homebridge[554]: [2017-10-12 22:38:15] [Hue] Initializing platform accessory 'Philips hue'...
Oct 12 22:38:15 raspberrypi homebridge[554]: [2017-10-12 22:38:15] [Hue] Philips hue: 3 services
Oct 12 22:38:15 raspberrypi homebridge[554]: [2017-10-12 22:38:15] [Hue] Initializing platform accessory 'Lichter Wohnwand'...
Oct 12 22:38:15 raspberrypi homebridge[554]: [2017-10-12 22:38:15] [Hue] Initializing platform accessory 'Unterschrank'...
Oct 12 22:38:15 raspberrypi homebridge[554]: [2017-10-12 22:38:15] [Hue] Initializing platform accessory 'Freie Steckdose'...
Oct 12 22:38:15 raspberrypi homebridge[554]: [2017-10-12 22:38:15] [Hue] Initializing platform accessory 'Sofa'...
Oct 12 22:38:15 raspberrypi homebridge[554]: [2017-10-12 22:38:15] [Hue] Initializing platform accessory 'Gartenspot'...
Oct 12 22:38:15 raspberrypi homebridge[554]: [2017-10-12 22:38:15] Found robot #1: Kohlers VR200
Oct 12 22:38:16 raspberrypi homebridge[554]: [2017-10-12 22:38:16] Initializing platform accessory 'Kohlers VR200'...
Oct 12 22:38:16 raspberrypi homebridge[554]: Scan this code with your HomeKit App on your iOS device to pair with Homebridge:
Oct 12 22:38:16 raspberrypi homebridge[554]: ??????????????
Oct 12 22:38:16 raspberrypi homebridge[554]: ? 031-45-154 ?
Oct 12 22:38:16 raspberrypi homebridge[554]: ??????????????
Oct 12 22:38:16 raspberrypi homebridge[554]: [2017-10-12 22:38:16] Homebridge is running on port 51826.
Oct 12 22:38:16 raspberrypi homebridge[554]: [2017-10-12 22:38:16] [Harmony Hub] Fetching Logitech Harmony activities...
Oct 12 22:38:37 raspberrypi systemd[690]: Time has been changed
Oct 12 22:38:37 raspberrypi rsyslogd-2007: action 'action 17' suspended, next retry is Thu Oct 12 22:39:07 2017 [try http://www.rsyslog.com/e/2007 ]
Oct 12 22:38:37 raspberrypi systemd[1]: Time has been changed
Oct 12 22:38:37 raspberrypi homebridge[554]: [2017-10-12 22:38:37] [Harmony Hub] Found activities:
Oct 12 22:38:37 raspberrypi homebridge[554]: Samsung
Oct 12 22:38:37 raspberrypi homebridge[554]: Radio
Oct 12 22:38:37 raspberrypi homebridge[554]: Receiver
Oct 12 22:38:37 raspberrypi homebridge[554]: Nachtruhe
Oct 12 22:38:37 raspberrypi homebridge[554]: Fernsehen
Oct 12 22:38:37 raspberrypi homebridge[554]: PowerOff
Oct 12 22:38:37 raspberrypi homebridge[554]: BlueRay
Oct 12 22:38:37 raspberrypi homebridge[554]: NickiRadio
Oct 12 22:38:37 raspberrypi homebridge[554]: Mac anschalten
Oct 12 22:38:37 raspberrypi homebridge[554]: CD-Player
Oct 12 22:38:37 raspberrypi homebridge[554]: Heimkino
Oct 12 22:39:44 raspberrypi rsyslogd-2007: action 'action 17' suspended, next retry is Thu Oct 12 22:40:14 2017 [try http://www.rsyslog.com/e/2007 ]
Oct 12 22:39:52 raspberrypi systemd[1]: Starting Session c3 of user pi.
Oct 12 22:39:52 raspberrypi systemd[1]: Started Session c3 of user pi.
Oct 12 22:41:06 raspberrypi rsyslogd-2007: action 'action 17' suspended, next retry is Thu Oct 12 22:41:36 2017 [try http://www.rsyslog.com/e/2007 ]
Oct 12 22:42:05 raspberrypi rsyslogd-2007: action 'action 17' suspended, next retry is Thu Oct 12 22:42:35 2017 [try http://www.rsyslog.com/e/2007 ]
Oct 12 22:51:06 raspberrypi rsyslogd-2007: action 'action 17' suspended, next retry is Thu Oct 12 22:51:36 2017 [try http://www.rsyslog.com/e/2007 ]
Oct 12 22:52:02 raspberrypi rsyslogd-2007: action 'action 17' suspended, next retry is Thu Oct 12 22:52:32 2017 [try http://www.rsyslog.com/e/2007 ]
Oct 12 22:53:03 raspberrypi rsyslogd-2007: action 'action 17' suspended, next retry is Thu Oct 12 22:53:33 2017 [try http://www.rsyslog.com/e/2007 ]
Oct 12 22:53:40 raspberrypi systemd[1]: Starting Cleanup of Temporary Directories...
Oct 12 22:53:40 raspberrypi rsyslogd-2007: action 'action 17' suspended, next retry is Thu Oct 12 22:54:10 2017 [try http://www.rsyslog.com/e/2007 ]
Oct 12 22:53:40 raspberrypi systemd[1]: Started Cleanup of Temporary Directories.
Oct 12 22:54:39 raspberrypi rsyslogd-2007: action 'action 17' suspended, next retry is Thu Oct 12 22:55:09 2017 [try http://www.rsyslog.com/e/2007 ]
Das sieht doch sehr gut aus, keine Fehler. ?
Um nur das interessante von homebridge zu sehen, benutze
sudo tail -f /var/log/syslog | grep homebridge
Nach einem reboot des raspi sollte die hombridge automatisch gestartet werden.
Moin! Hab die Homebridge unter Node 9.3.0 und raspbian stretch manuell installiert. Soweit so gut.
Habe sie dann nach dieser Anleitung als systemdienst eingerichtet mit root.
Sobald ich aber ein plugin in meiner config.json habe, egal welches, startet die homebridge nicht mehr.
Nehme ich alle plugins aus der config.json raus, läuft sie ganz normal.
Any ideas?
Hier noch der Log:
-- Logs begin at Thu 2016-11-03 18:16:43 CET. --
Dec 21 22:33:01 raspberrypi homebridge[1101]: at Object.Module._extensions..js (module.js:671:10)
Dec 21 22:33:01 raspberrypi homebridge[1101]: at Module.load (module.js:573:32)
Dec 21 22:33:01 raspberrypi homebridge[1101]: at tryModuleLoad (module.js:513:12)
Dec 21 22:33:01 raspberrypi homebridge[1101]: at Function.Module._load (module.js:505:3)
Dec 21 22:33:01 raspberrypi homebridge[1101]: at Function.Module.runMain (module.js:701:10)
Dec 21 22:33:01 raspberrypi homebridge[1101]: at startup (bootstrap_node.js:194:16)
Dec 21 22:33:01 raspberrypi homebridge[1101]: at bootstrap_node.js:618:3
Dec 21 22:33:01 raspberrypi systemd[1]: homebridge.service: Main process exited, code=exited, status=1/FAILURE
Dec 21 22:33:01 raspberrypi systemd[1]: homebridge.service: Unit entered failed state.
Dec 21 22:33:01 raspberrypi systemd[1]: homebridge.service: Failed with result 'exit-code'.
Dec 21 22:33:11 raspberrypi systemd[1]: homebridge.service: Service hold-off time over, scheduling restart.
Dec 21 22:33:11 raspberrypi systemd[1]: Stopped Node.js HomeKit Server.
Dec 21 22:33:11 raspberrypi systemd[1]: Started Node.js HomeKit Server.
Dec 21 22:33:11 raspberrypi homebridge[1135]: *** WARNING *** The program 'node' uses the Apple Bonjour compatibility layer of Avahi.
Dec 21 22:33:11 raspberrypi homebridge[1135]: *** WARNING *** Please fix your application to use the native API of Avahi!
Dec 21 22:33:11 raspberrypi homebridge[1135]: *** WARNING *** For more information see <http://0pointer.de/avahi-compat?s=libdns_sd&e=node>
Dec 21 22:33:11 raspberrypi homebridge[1135]: *** WARNING *** The program 'node' called 'DNSServiceRegister()' which is not supported (or only supported partially) in the Apple Bonjour compatibility layer of Avahi.
Dec 21 22:33:11 raspberrypi homebridge[1135]: *** WARNING *** Please fix your application to use the native API of Avahi!
Dec 21 22:33:11 raspberrypi homebridge[1135]: *** WARNING *** For more information see <http://0pointer.de/avahi-compa…node&f=DNSServiceRegister>
Dec 21 22:33:11 raspberrypi node[1135]: *** WARNING *** The program 'node' uses the Apple Bonjour compatibility layer of Avahi.
Dec 21 22:33:11 raspberrypi node[1135]: *** WARNING *** Please fix your application to use the native API of Avahi!
Dec 21 22:33:11 raspberrypi node[1135]: *** WARNING *** For more information see <http://0pointer.de/avahi-compat?s=libdns_sd&e=node>
Dec 21 22:33:11 raspberrypi node[1135]: *** WARNING *** The program 'node' called 'DNSServiceRegister()' which is not supported (or only supported partially) in the Apple Bonjour compatibility layer of Avahi.
Dec 21 22:33:11 raspberrypi node[1135]: *** WARNING *** Please fix your application to use the native API of Avahi!
Dec 21 22:33:11 raspberrypi node[1135]: *** WARNING *** For more information see <http://0pointer.de/avahi-compa…node&f=DNSServiceRegister>
Dec 21 22:33:14 raspberrypi homebridge[1135]: [2017-12-21 22:33:14] Loaded plugin: homebridge-nest
Dec 21 22:33:14 raspberrypi homebridge[1135]: [2017-12-21 22:33:14] Registering platform 'homebridge-nest.Nest'
Dec 21 22:33:14 raspberrypi homebridge[1135]: [2017-12-21 22:33:14] ---
Dec 21 22:33:14 raspberrypi homebridge[1135]: [2017-12-21 22:33:14] Loaded config.json with 1 accessories and 1 platforms.
Dec 21 22:33:14 raspberrypi homebridge[1135]: [2017-12-21 22:33:14] ---
Dec 21 22:33:14 raspberrypi homebridge[1135]: [2017-12-21 22:33:14] Loading 1 platforms...
Dec 21 22:33:14 raspberrypi homebridge[1135]: [2017-12-21 22:33:14] [Nest] Initializing Nest platform...
Dec 21 22:33:14 raspberrypi homebridge[1135]: [2017-12-21 22:33:14] [Nest] Fetching Nest devices.
Dec 21 22:33:14 raspberrypi homebridge[1135]: [2017-12-21 22:33:14] Loading 1 accessories...
Dec 21 22:33:14 raspberrypi homebridge[1135]: /usr/lib/node_modules/homebridge/lib/api.js:64
Dec 21 22:33:14 raspberrypi homebridge[1135]: throw new Error("The requested accessory '" + name + "' was not registered by any plugin.");
Dec 21 22:33:14 raspberrypi homebridge[1135]: ^
Dec 21 22:33:14 raspberrypi homebridge[1135]: Error: The requested accessory 'RaspberryPiTemperature' was not registered by any plugin.
Dec 21 22:33:14 raspberrypi homebridge[1135]: at API.accessory (/usr/lib/node_modules/homebridge/lib/api.js:64:13)
Dec 21 22:33:14 raspberrypi homebridge[1135]: at Server._loadAccessories (/usr/lib/node_modules/homebridge/lib/server.js:264:42)
Dec 21 22:33:14 raspberrypi homebridge[1135]: at Server.run (/usr/lib/node_modules/homebridge/lib/server.js:86:38)
Dec 21 22:33:14 raspberrypi homebridge[1135]: at module.exports (/usr/lib/node_modules/homebridge/lib/cli.js:40:10)
Dec 21 22:33:14 raspberrypi homebridge[1135]: at Object.<anonymous> (/usr/lib/node_modules/homebridge/bin/homebridge:17:22)
Dec 21 22:33:14 raspberrypi homebridge[1135]: at Module._compile (module.js:660:30)
Dec 21 22:33:14 raspberrypi homebridge[1135]: at Object.Module._extensions..js (module.js:671:10)
Dec 21 22:33:14 raspberrypi homebridge[1135]: at Module.load (module.js:573:32)
Dec 21 22:33:14 raspberrypi homebridge[1135]: at tryModuleLoad (module.js:513:12)
Dec 21 22:33:14 raspberrypi homebridge[1135]: at Function.Module._load (module.js:505:3)
Dec 21 22:33:14 raspberrypi homebridge[1135]: at Function.Module.runMain (module.js:701:10)
Dec 21 22:33:14 raspberrypi homebridge[1135]: at startup (bootstrap_node.js:194:16)
Dec 21 22:33:14 raspberrypi homebridge[1135]: at bootstrap_node.js:618:
Wie sieht die Config aus?
An der config sollte es hoffentlich nicht liegen. Dort ist lediglich das raspberry und Nest Plugin enthalten. Ich lade sie später mal hoch, habe aktuell keinen Zugriff. Es funktionierte aber mit der selben config problemlos, als die Homebridge normal lief und über init.d im Autostart war.
Irgendwie lassen sich auch keine Plugins mehr installieren aktuell, er zeigt nur Fehlermeldungen. Sollte ich vor sudo npm install mit cd /var/homebridge vielleicht erst in diesen Pfad wechseln?
Damit die Homebridge ohne Plugins überhaupt startet, musste ich aus der homebridge.service Datei den Pfad um „local“ reduzieren.
sollte ich vor sudo npm install mit cd /var/homebridge vielleicht erst in diesen Pfad wechseln
brauchst du nicht.
homebridge.service Datei den Pfad um „local“ reduzieren.
zeigen was du meinst
so muss es aussehen:
homebridge.services
[Unit]
Description=Node.js HomeKit Server
After=syslog.target network-online.target
[Service]
Type=simple
User=root
EnvironmentFile=/etc/default/homebridge
ExecStart=/usr/local/bin/homebridge $HOMEBRIDGE_OPTS
Restart=on-failure
RestartSec=10
KillMode=process
[Install]
WantedBy=multi-user.target
Alles anzeigen
und die homebridge in defaults:
# Defaults / Configuration options for homebridge
# The following settings tells homebridge where to find the config.json file and where to persist the data (i.e. pairing and others)
#HOMEBRIDGE_OPTS=-U /var/homebridge >> /var/log/homebridge.log 2>> //var/log/homebridge.err
HOMEBRIDGE_OPTS=-U /var/homebridge
# If you uncomment the following line, homebridge will log more
# You can display this via systemd's journalctl: journalctl -f -u homebridge
# DEBUG=*
Mein hombridge.services sieht so aus.
Einziger Unterschied ist:
"ExecStart" ist der Pfad nicht: ExecStart=/usr/local/bin/homebridge $HOMEBRIDGE_OPTS sondern ExecStart=/usr/bin/homebridge $HOMEBRIDGE_OPTS
Wenn "local" mit drin steht, startet die HomeBridge überhaupt nicht. Das Problem hatte auch jemand auf Seite 2 dieses Threads, daher mein "Lösungsansatz".
Homebridge in defaults ist exakt so angelegt wie bei dir. Bin ratlos.
[Unit]
Description=Node.js HomeKit Server
After=syslog.target network-online.target
[Service]
Type=simple
User=root
EnvironmentFile=/etc/default/homebridge
ExecStart=/usr/bin/homebridge $HOMEBRIDGE_OPTS
Restart=on-failure
RestartSec=10
KillMode=process
[Install]
WantedBy=multi-user.target
Alles anzeigen
das ist die homebridge anderst installiert bei Dir, ok.
sieht eher nach einem problem der config bzw. nest aus.
post mal die config, haste die schon mal geprüft?
Hey det, danke für deine Hilfe. Ich poste die config sobald ich daheim bin.
Habe noch eine generelle Frage, gibt es eine Möglichkeit die ganzen Installationen rückgängig zu machen, um frisch zu starten?
Wenn die Homebridge bisher irgendwelche Fehler macht, mache ich meinen Raspberry immer komplett platt und installiere Raspbian neu, das dauert immer etwas.. Am liebsten würde ich das frische aufsetzen der Homebridge und allen dazugehörigen installationen wie node, npm avahi etc manuell entfernen via ssh. Ich denke, jedesmal raspbian neu aufzusetzen ist unnötig?
Hier ist die config. Eigentlich unspektakulär.
{
"bridge":{
"name":"Homebridge",
"username":"CC:22:3D:E3:CE:30",
"port":51826,
"pin":"031-45-154"
},
"accessories":[
{
"accessory":"RaspberryPiTemperature",
"name":"Temperatur"
}
],
"platforms":[
{
"platform":"Nest",
"token":"entfernt",
"clientId":"entfernt",
"clientSecret":"entfernt",
"code":"entfernt",
"username":"entfernt",
"password":"entfernt"
},
{
"platform":"Nest-cam",
"username":"entfernt",
"password":"entfernt",
"useOMX":true
}
]
}
Alles anzeigen
Weiterhin bekomme ich folgenden Fehler bei Plugin Installation:
pi@raspberrypi:~ $ sudo systemctl stop homebridge
pi@raspberrypi:~ $ sudo npm install homebridge-raspberrypi-temperature
npm WARN saveError ENOENT: no such file or directory, open '/home/pi/package.json'
npm WARN enoent ENOENT: no such file or directory, open '/home/pi/package.json'
npm WARN pi No description
npm WARN pi No repository field.
npm WARN pi No README data
npm WARN pi No license field.
+ [email protected]
updated 1 package in 1.978s
Alles anzeigen
die config scheint soweit iO,
mit einer leeren config startet homebridge ja.
wie oder welcher Anleizung hast Du homebridge installiert, das mit local und der Fehler beim Plugin ist komisch.
Homebridge installiere ich wie folgt, als User Pi auf einem frischen Raspbian Stretch full
sudo apt-get update
sudo apt-get upgrade
curl -sL https//deb.node.source.com/setup_8.x | sudo -E bash -
sudo apt-get install -y nodejs
sudo npm i npm -g
sudo apt-get install libavahi-compat-libdnssd-dev
sudo apt-get install git
sudo npm install -g --unsafe-perm homebridge
curl -sL https//deb.node.source.com/setup_8.x | sudo -E bash -
sudo apt-get install -y nodejs
aha deswegen sind die Pfade bei dir anderst
System cleanen,
sudo apt-get install -y ntpdate libpcap*
wget https://nodejs.org/dist/v8.9.3…8.9.3-linux-armv7l.tar.gz
tar -xvf node-v8.9.3-linux-armv7l.tar.gz
cd ./node-v8.9.3-linux-armv7l
sudo cp -R * /usr/local/
cd ..
sudo rm node-v8.9.3-linux-armv7l -r
sudo rm node-v8.9.3-linux-armv7l.tar.gz
sudo apt-get install -y libavahi-compat-libdnssd-dev
sudo npm install -g --unsafe-perm npm@latest homebridge@latest
jetzt die Plugins installieren
so ungefähr
Hallo zusammen,
ich bin neu hier und habe mir Homebridge über die Anleitung manuell erfolgreich installiert. Vielen Dank für die Anleitung. Prinzipiell habe ich Homebridge mit dem Harmony-Plugin zum Fliegen bekommen incl. automatischem Start beim Booten des Raspi (Version 1 B+). Leider stürzt die Homebridge aus unerfindlichen Gründen ständig ab, fast täglich.
Ich habe daher anhand der Anleitung in diesem Thread versucht, den automatischen Neustart zu implementieren. Das ist mir nicht gelungen und ich bekomme nun die Homebridge überhaupt nicht mehr gestartet.
Beim Versuch über "sudo systemctl start homebridge" kommt die Fehlermeldung:
"Failed to start homebridge.service: Unit homebridge.service is not loaded properly: Invalid argument.
See system logs and 'systemctl status homebridge.service' for details."
Der systemctl status liefert mehrmals:
"Jan 08 22:11:39 raspberrypi systemd[1]: homebridge.service: Service lacks both ExecStart= and ExecStop= setting. Refusing."
Was kann ich tun? Unklar war mir beim Einrichten die Stelle in der Beschreibung:
"...wenn hombridge als root laufen soll, dann diese Zeile anpassen
Code
in
Code
Wo steht diese Zeile überhaupt?
Wenn ich standardmäßig installiert habe, bin ich user homebridge, oder?
Ihr merkt, ich habe keine Ahnung, hoffe aber, dass ich mir meine Installation nicht zerschossen habe und ihr mir helfen könnt!? Vielen Dank schon mal....
Grüße
Volker
Das sollte in
/etc/systemd/system/homebridge.service
Stehen