Ich habe vorhin das Plugin homebridge-hue installiert. Dies lief anfangs nicht, bis mir auffiel, dass homebridge die config.json nicht findet (was merkwürdig ist, denn meine anderen Plugins hat das nie gestört). Die homebridge hat config.json unter /home/pi/.homebridge verlangt, bis dato war die in /var/homebridge. Also per cp die config.json einfach dorthin kopiert und schon ging das homebridge-hue plugin ohne murren. Ich hab das nicht weiter hinterfragt.
Dann fiel mir auf, dass meine homebridge ab diesem Zeitpunkt nur erreichbar war, wenn ich diese mit homebridge manuell gestartet habe. Sobald ich putty schließe war homebridge nicht mehr erreichbar.
Ich hatte vermute, dass es an der homebridge.service liegt und nun die aktuelle config.json nicht gefunden wird. Als homebridge gestoppt und per sudo nano /etc/default/homebridge die Datei angepasst
# 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=-I -U /home/pi/.homebridge
# If you uncomment the following line, homebridge will log more
# You can display this via systemd's journalctl: journalctl -f -u homebridge
# DEBUG=*
Dann nochmal
Weiterhin kein Erfolg. Mein PLugin homebridge-config-ui-x begrüßt mich weiterhin mit "Homebridge Gestoppt" bis ich diese manuell neustarte und das putty-Fenster auch fein offen lasse. Wenn ich dies mache kriege ich auch ab und an folgenden Fehler nun dazu:
[2019-1-7 22:26:54] [Config] Using Form Authentication
Error: listen EADDRINUSE: address already in use :::8080
at Server.setupListenHandle [as _listen2] (net.js:1290:14)
at listenInCluster (net.js:1338:12)
at Server.listen (net.js:1425:7)
at UiServer.<anonymous> (/usr/local/lib/node_modules/homebridge-config-ui-x/src/server.ts:48:17)
at Generator.next (<anonymous>)
at fulfilled (/usr/local/lib/node_modules/homebridge-config-ui-x/dist/server.js:4:58)
Ist aber halt sehr sporadisch. Manchmal gehts auch und ich kann wie gesagt homebridge nutzen solange putty offen bleibt. Über ps sehe ich aber übrigens keine aktuele homebridge Instanz am laufen.
Hier ein Auszug meines Logs:
Jan 7 22:11:18 raspberrypi homebridge[337]: [2019-1-7 22:11:18] Registering platform 'homebridge-fritz.Fritz!Box'
Jan 7 22:11:18 raspberrypi homebridge[337]: [2019-1-7 22:11:18] ---
Jan 7 22:11:20 raspberrypi homebridge[337]: [2019-1-7 22:11:20] Loaded plugin: homebridge-hue
Jan 7 22:11:20 raspberrypi homebridge[337]: [2019-1-7 22:11:20] Registering platform 'homebridge-hue.Hue'
Jan 7 22:11:20 raspberrypi homebridge[337]: [2019-1-7 22:11:20] ---
Jan 7 22:11:20 raspberrypi homebridge[337]: [2019-1-7 22:11:20] Loading 4 platforms...
Jan 7 22:11:20 raspberrypi homebridge[337]: [2019-1-7 22:11:20] [Config] Initializing config platform...
Jan 7 22:11:20 raspberrypi systemd[1]: Created slice User Slice of pihole.
Jan 7 22:11:20 raspberrypi systemd[1]: Starting User Manager for UID 999...
Jan 7 22:11:20 raspberrypi systemd[1]: Started Session c2 of user pihole.
Jan 7 22:11:20 raspberrypi homebridge[337]: [2019-1-7 22:11:20] [Config] Spawning homebridge-config-ui-x with PID 950
Jan 7 22:11:20 raspberrypi homebridge[337]: [2019-1-7 22:11:20] [FRITZ!Box 7430 VX] Initializing Fritz!Box platform...
Jan 7 22:11:20 raspberrypi homebridge[337]: [2019-1-7 22:11:20] [Hue] Initializing Hue platform...
Jan 7 22:11:20 raspberrypi systemd[949]: Listening on GnuPG cryptographic agent and passphrase cache (restricted).
Jan 7 22:11:20 raspberrypi systemd[949]: Starting D-Bus User Message Bus Socket.
Jan 7 22:11:20 raspberrypi systemd[949]: Reached target Paths.
Jan 7 22:11:20 raspberrypi systemd[949]: Listening on GnuPG cryptographic agent and passphrase cache.
Jan 7 22:11:20 raspberrypi systemd[949]: Listening on GnuPG cryptographic agent (ssh-agent emulation).
Jan 7 22:11:20 raspberrypi systemd[949]: Reached target Timers.
Jan 7 22:11:20 raspberrypi systemd[949]: Listening on GnuPG cryptographic agent (access for web browsers).
Jan 7 22:11:20 raspberrypi systemd[949]: Listening on D-Bus User Message Bus Socket.
Jan 7 22:11:20 raspberrypi systemd[949]: Reached target Sockets.
Jan 7 22:11:20 raspberrypi systemd[949]: Reached target Basic System.
Jan 7 22:11:20 raspberrypi systemd[949]: Reached target Default.
Jan 7 22:11:20 raspberrypi systemd[949]: Startup finished in 84ms.
Jan 7 22:11:20 raspberrypi systemd[1]: Started User Manager for UID 999.
Jan 7 22:11:20 raspberrypi homebridge[337]: [2019-1-7 22:11:20] [Hue] homebridge-hue v0.11.6, node v10.15.0, homebridge v0.4.45
Jan 7 22:11:20 raspberrypi homebridge[337]: [2019-1-7 22:11:20] [AutomationSwitches] Initializing AutomationSwitches platform...
Jan 7 22:11:20 raspberrypi homebridge[337]: [2019-1-7 22:11:20] [AutomationSwitches] AutomationSwitchesPlatform Plugin Loaded - Version 3.2.1
Jan 7 22:11:20 raspberrypi homebridge[337]: [2019-1-7 22:11:20] [AutomationSwitches] Found automation switch in config: "Automation Switch Flur"
Jan 7 22:11:20 raspberrypi homebridge[337]: [2019-1-7 22:11:20] [AutomationSwitches] Found automation switch in config: "Fake Switch"
Jan 7 22:11:20 raspberrypi homebridge[337]: [2019-1-7 22:11:20] [AutomationSwitches] Switch Fake Switch is stored in file switch.3F7D1F73B6B0.json
Jan 7 22:11:20 raspberrypi homebridge[337]: [2019-1-7 22:11:20] [AutomationSwitches] Initializing platform accessory 'Automation Switch Flur'...
Jan 7 22:11:20 raspberrypi homebridge[337]: [2019-1-7 22:11:20] [AutomationSwitches] Initializing platform accessory 'Fake Switch'...
Jan 7 22:11:20 raspberrypi homebridge[337]: [2019-1-7 22:11:20] Loading 0 accessories...
Jan 7 22:11:20 raspberrypi homebridge[337]: Load homebridge-switches.AutomationSwitches
Jan 7 22:11:20 raspberrypi homebridge[337]: [2019-1-7 22:11:20] [homebridge-switches.AutomationSwitches] AutomationSwitchesPlatform Plugin Loaded - Version 3.2.1
Jan 7 22:11:20 raspberrypi homebridge[337]: [2019-1-7 22:11:20] [Hue] npm registry: communication error EAI_AGAIN on https://registry.npmjs.org/
Jan 7 22:11:20 raspberrypi pihole-FTL[383]: FTL started!
Jan 7 22:11:20 raspberrypi systemd[1]: Started LSB: pihole-FTL daemon.
Jan 7 22:11:20 raspberrypi systemd[1]: Reached target Multi-User System.
Jan 7 22:11:20 raspberrypi systemd[1]: Reached target Graphical Interface.
Jan 7 22:11:20 raspberrypi systemd[1]: Starting Update UTMP about System Runlevel Changes...
Jan 7 22:11:20 raspberrypi systemd[1]: Started Update UTMP about System Runlevel Changes.
Jan 7 22:11:20 raspberrypi systemd[1]: Startup finished in 1.430s (kernel) + 16.777s (userspace) = 18.207s.
Jan 7 22:11:21 raspberrypi systemd[1]: Started Session c3 of user pi.
Jan 7 22:11:21 raspberrypi homebridge[337]: [2019-1-7 22:11:21] [FRITZ!Box 7430 VX] Fritz!Box platform login successful
Jan 7 22:11:21 raspberrypi homebridge[337]: [2019-1-7 22:11:21] [FRITZ!Box 7430 VX] Discovering accessories
Jan 7 22:11:22 raspberrypi homebridge[337]: [2019-1-7 22:11:22] [FRITZ!Box 7430 VX] Alarm sensors found: none
Jan 7 22:11:22 raspberrypi homebridge[337]: [2019-1-7 22:11:22] [FRITZ!Box 7430 VX] Outlets found: none
Jan 7 22:11:23 raspberrypi homebridge[337]: [2019-1-7 22:11:23] [FRITZ!Box 7430 VX] Thermostats found: 119600053168,119610689600,119610319320
Jan 7 22:11:23 raspberrypi homebridge[337]: [2019-1-7 22:11:23] [FRITZ!Box 7430 VX] Sensors found: none
Jan 7 22:11:23 raspberrypi homebridge[337]: [2019-1-7 22:11:23] [FRITZ!Box 7430 VX] Initializing platform accessory 'Schlafzimmer Thermostat'...
Jan 7 22:11:23 raspberrypi homebridge[337]: [2019-1-7 22:11:23] [FRITZ!Box 7430 VX] Initializing platform accessory 'Badezimmer Thermostat'...
Jan 7 22:11:23 raspberrypi homebridge[337]: [2019-1-7 22:11:23] [FRITZ!Box 7430 VX] Initializing platform accessory 'Küche Thermostat'...
Jan 7 22:11:25 raspberrypi homebridge[337]: [2019-1-7 22:11:25] [Hue] Philips hue: Philips BSB002 bridge v1810251352, api v1.28.0
Jan 7 22:11:25 raspberrypi homebridge[337]: #033[0;37m[2019-1-7 22:11:25]#033[0m #033[0;36m[Config]#033[0m Using Form Authentication
Jan 7 22:11:25 raspberrypi homebridge[337]: #033[0;37m[2019-1-7 22:11:25]#033[0m #033[0;36m[Config]#033[0m Console v3.9.3 is listening on port 8080.
Jan 7 22:11:25 raspberrypi homebridge[337]: [2019-1-7 22:11:25] [Hue] Philips hue: 2 accessories
Jan 7 22:11:25 raspberrypi homebridge[337]: [2019-1-7 22:11:25] [Hue] cannot create /home/pi/.homebridge/homebridge-hue.json.gz: error EACCES
Jan 7 22:11:25 raspberrypi homebridge[337]: [2019-1-7 22:11:25] [Hue] Initializing platform accessory 'Philips hue'...
Jan 7 22:11:25 raspberrypi homebridge[337]: [2019-1-7 22:11:25] [Hue] Philips hue: 3 services
Jan 7 22:11:25 raspberrypi homebridge[337]: [2019-1-7 22:11:25] [Hue] Initializing platform accessory 'Schlafzimmer Stehlampe'...
Jan 7 22:11:25 raspberrypi homebridge[337]: [2019-1-7 22:11:25] [Hue] { Error: EACCES: permission denied, open '/home/pi/.homebridge/persist/AccessoryInfo.CC223DE3CE31.json'
Jan 7 22:11:25 raspberrypi homebridge[337]: at Object.openSync (fs.js:439:3)
Jan 7 22:11:25 raspberrypi homebridge[337]: at Object.writeFileSync (fs.js:1190:35)
Jan 7 22:11:25 raspberrypi homebridge[337]: at LocalStorage.persistKeySync (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/node_modules/node-persist/src/local-storage.js:476:16)
Jan 7 22:11:25 raspberrypi homebridge[337]: at LocalStorage.setItemSync (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/node_modules/node-persist/src/local-storage.js:277:14)
Jan 7 22:11:25 raspberrypi homebridge[337]: at Object.nodePersist.setItemSync (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/node_modules/node-persist/src/node-persist.js:99:29)
Jan 7 22:11:25 raspberrypi homebridge[337]: at AccessoryInfo.save (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/model/AccessoryInfo.js:165:11)
Jan 7 22:11:25 raspberrypi homebridge[337]: at Bridge.Accessory.publish (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Accessory.js:543:23)
Jan 7 22:11:25 raspberrypi homebridge[337]: at Server._publish (/usr/local/lib/node_modules/homebridge/lib/server.js:128:16)
Jan 7 22:11:25 raspberrypi homebridge[337]: at Server.<anonymous> (/usr/local/lib/node_modules/homebridge/lib/server.js:404:14)
Jan 7 22:11:25 raspberrypi homebridge[337]: at /usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/util/once.js:16:19
Jan 7 22:11:25 raspberrypi homebridge[337]: at request.then.catch.then.then.then (/usr/local/lib/node_modules/homebridge-hue/lib/HuePlatform.js:292:5)
Jan 7 22:11:25 raspberrypi homebridge[337]: at Function.then (/usr/local/lib/node_modules/homebridge-hue/node_modules/deferred/_ext.js:67:13)
Jan 7 22:11:25 raspberrypi homebridge[337]: at Deferred._settle (/usr/local/lib/node_modules/homebridge-hue/node_modules/deferred/deferred.js:97:26)
Jan 7 22:11:25 raspberrypi homebridge[337]: at Deferred.resolve (/usr/local/lib/node_modules/homebridge-hue/node_modules/deferred/deferred.js:142:15)
Jan 7 22:11:25 raspberrypi homebridge[337]: at fs.writeFile (/usr/local/lib/node_modules/homebridge-hue/lib/HuePlatform.js:360:20)
Jan 7 22:11:25 raspberrypi homebridge[337]: at fs.js:1170:7
Jan 7 22:11:25 raspberrypi homebridge[337]: errno: -13,
Jan 7 22:11:25 raspberrypi homebridge[337]: syscall: 'open',
Jan 7 22:11:25 raspberrypi homebridge[337]: code: 'EACCES',
Jan 7 22:11:25 raspberrypi homebridge[337]: path:
Jan 7 22:11:25 raspberrypi homebridge[337]: '/home/pi/.homebridge/persist/AccessoryInfo.CC223DE3CE31.json' }
Jan 7 22:11:44 raspberrypi systemd[949]: Time has been changed
Jan 7 22:11:44 raspberrypi systemd-timesyncd[303]: Synchronized to time server 193.30.120.245:123 (2.debian.pool.ntp.org).
Jan 7 22:11:44 raspberrypi systemd[613]: Time has been changed
Jan 7 22:11:44 raspberrypi systemd[1]: Time has been changed
Jan 7 22:11:44 raspberrypi systemd[1]: apt-daily.timer: Adding 4h 35min 23.367691s random time.
Jan 7 22:11:44 raspberrypi systemd[1]: apt-daily-upgrade.timer: Adding 26min 50.811676s random time.
Jan 7 22:11:52 raspberrypi kernel: [ 42.872435] random: crng init done
Jan 7 22:11:52 raspberrypi kernel: [ 42.872449] random: 7 urandom warning(s) missed due to ratelimiting
Jan 7 22:11:52 raspberrypi vncserver-x11[505]: ServerManager: Server started
Jan 7 22:11:52 raspberrypi vncserver-x11[505]: ConsoleDisplay: Found running X server (pid=569, binary=/usr/lib/xorg/Xorg)
Jan 7 22:12:29 raspberrypi homebridge[337]: [2019-1-7 22:12:29] [FRITZ!Box 7430 VX] Updating thermostat 119600053168
Jan 7 22:12:29 raspberrypi homebridge[337]: [2019-1-7 22:12:29] [FRITZ!Box 7430 VX] Getting thermostat 119600053168 temperature
Jan 7 22:12:29 raspberrypi homebridge[337]: [2019-1-7 22:12:29] [FRITZ!Box 7430 VX] Getting thermostat 119600053168 target temperature
Jan 7 22:12:29 raspberrypi homebridge[337]: [2019-1-7 22:12:29] [FRITZ!Box 7430 VX] Getting thermostat 119600053168 battery level
Jan 7 22:12:29 raspberrypi homebridge[337]: [2019-1-7 22:12:29] [FRITZ!Box 7430 VX] Getting thermostat 119600053168 battery status
Jan 7 22:12:29 raspberrypi homebridge[337]: [2019-1-7 22:12:29] [FRITZ!Box 7430 VX] Updating thermostat 119610689600
Jan 7 22:12:29 raspberrypi homebridge[337]: [2019-1-7 22:12:29] [FRITZ!Box 7430 VX] Getting thermostat 119610689600 temperature
Jan 7 22:12:29 raspberrypi homebridge[337]: [2019-1-7 22:12:29] [FRITZ!Box 7430 VX] Getting thermostat 119610689600 target temperature
Jan 7 22:12:29 raspberrypi homebridge[337]: [2019-1-7 22:12:29] [FRITZ!Box 7430 VX] Getting thermostat 119610689600 battery level
Jan 7 22:12:29 raspberrypi homebridge[337]: [2019-1-7 22:12:29] [FRITZ!Box 7430 VX] Getting thermostat 119610689600 battery status
Jan 7 22:12:29 raspberrypi homebridge[337]: [2019-1-7 22:12:29] [FRITZ!Box 7430 VX] Updating thermostat 119610319320
Jan 7 22:12:29 raspberrypi homebridge[337]: [2019-1-7 22:12:29] [FRITZ!Box 7430 VX] Getting thermostat 119610319320 temperature
Jan 7 22:12:29 raspberrypi homebridge[337]: [2019-1-7 22:12:29] [FRITZ!Box 7430 VX] Getting thermostat 119610319320 target temperature
Jan 7 22:12:29 raspberrypi homebridge[337]: [2019-1-7 22:12:29] [FRITZ!Box 7430 VX] Getting thermostat 119610319320 battery level
Jan 7 22:12:29 raspberrypi homebridge[337]: [2019-1-7 22:12:29] [FRITZ!Box 7430 VX] Getting thermostat 119610319320 battery status
Jan 7 22:13:29 raspberrypi homebridge[337]: [2019-1-7 22:13:29] [FRITZ!Box 7430 VX] Updating thermostat 119600053168
Jan 7 22:13:29 raspberrypi homebridge[337]: [2019-1-7 22:13:29] [FRITZ!Box 7430 VX] Getting thermostat 119600053168 temperature
Jan 7 22:13:29 raspberrypi homebridge[337]: [2019-1-7 22:13:29] [FRITZ!Box 7430 VX] Getting thermostat 119600053168 target temperature
Jan 7 22:13:29 raspberrypi homebridge[337]: [2019-1-7 22:13:29] [FRITZ!Box 7430 VX] Getting thermostat 119600053168 battery level
Jan 7 22:13:29 raspberrypi homebridge[337]: [2019-1-7 22:13:29] [FRITZ!Box 7430 VX] Getting thermostat 119600053168 battery status
Jan 7 22:13:29 raspberrypi homebridge[337]: [2019-1-7 22:13:29] [FRITZ!Box 7430 VX] Updating thermostat 119610689600
Jan 7 22:13:29 raspberrypi homebridge[337]: [2019-1-7 22:13:29] [FRITZ!Box 7430 VX] Getting thermostat 119610689600 temperature
Jan 7 22:13:29 raspberrypi homebridge[337]: [2019-1-7 22:13:29] [FRITZ!Box 7430 VX] Getting thermostat 119610689600 target temperature
Jan 7 22:13:29 raspberrypi homebridge[337]: [2019-1-7 22:13:29] [FRITZ!Box 7430 VX] Getting thermostat 119610689600 battery level
Jan 7 22:13:29 raspberrypi homebridge[337]: [2019-1-7 22:13:29] [FRITZ!Box 7430 VX] Getting thermostat 119610689600 battery status
Jan 7 22:13:29 raspberrypi homebridge[337]: [2019-1-7 22:13:29] [FRITZ!Box 7430 VX] Updating thermostat 119610319320
Jan 7 22:13:29 raspberrypi homebridge[337]: [2019-1-7 22:13:29] [FRITZ!Box 7430 VX] Getting thermostat 119610319320 temperature
Jan 7 22:13:29 raspberrypi homebridge[337]: [2019-1-7 22:13:29] [FRITZ!Box 7430 VX] Getting thermostat 119610319320 target temperature
Jan 7 22:13:29 raspberrypi homebridge[337]: [2019-1-7 22:13:29] [FRITZ!Box 7430 VX] Getting thermostat 119610319320 battery level
Jan 7 22:13:29 raspberrypi homebridge[337]: [2019-1-7 22:13:29] [FRITZ!Box 7430 VX] Getting thermostat 119610319320 battery status
Jan 7 22:14:29 raspberrypi homebridge[337]: [2019-1-7 22:14:29] [FRITZ!Box 7430 VX] Updating thermostat 119600053168
Jan 7 22:14:29 raspberrypi homebridge[337]: [2019-1-7 22:14:29] [FRITZ!Box 7430 VX] Getting thermostat 119600053168 temperature
Jan 7 22:14:29 raspberrypi homebridge[337]: [2019-1-7 22:14:29] [FRITZ!Box 7430 VX] Getting thermostat 119600053168 target temperature
Jan 7 22:14:29 raspberrypi homebridge[337]: [2019-1-7 22:14:29] [FRITZ!Box 7430 VX] Getting thermostat 119600053168 battery level
Jan 7 22:14:29 raspberrypi homebridge[337]: [2019-1-7 22:14:29] [FRITZ!Box 7430 VX] Getting thermostat 119600053168 battery status
Jan 7 22:14:29 raspberrypi homebridge[337]: [2019-1-7 22:14:29] [FRITZ!Box 7430 VX] Updating thermostat 119610689600
Jan 7 22:14:29 raspberrypi homebridge[337]: [2019-1-7 22:14:29] [FRITZ!Box 7430 VX] Getting thermostat 119610689600 temperature
Jan 7 22:14:29 raspberrypi homebridge[337]: [2019-1-7 22:14:29] [FRITZ!Box 7430 VX] Getting thermostat 119610689600 target temperature
Jan 7 22:14:29 raspberrypi homebridge[337]: [2019-1-7 22:14:29] [FRITZ!Box 7430 VX] Getting thermostat 119610689600 battery level
Jan 7 22:14:29 raspberrypi homebridge[337]: [2019-1-7 22:14:29] [FRITZ!Box 7430 VX] Getting thermostat 119610689600 battery status
Jan 7 22:14:29 raspberrypi homebridge[337]: [2019-1-7 22:14:29] [FRITZ!Box 7430 VX] Updating thermostat 119610319320
Jan 7 22:14:29 raspberrypi homebridge[337]: [2019-1-7 22:14:29] [FRITZ!Box 7430 VX] Getting thermostat 119610319320 temperature
Jan 7 22:14:29 raspberrypi homebridge[337]: [2019-1-7 22:14:29] [FRITZ!Box 7430 VX] Getting thermostat 119610319320 target temperature
Jan 7 22:14:29 raspberrypi homebridge[337]: [2019-1-7 22:14:29] [FRITZ!Box 7430 VX] Getting thermostat 119610319320 battery level
Jan 7 22:14:29 raspberrypi homebridge[337]: [2019-1-7 22:14:29] [FRITZ!Box 7430 VX] Getting thermostat 119610319320 battery status
(zwischendrin etwas pihole-Action, aber ich lass das mal so lückenlos stehen)
Mir fiel auch auf, wenn ich die config.json über die Weboberfläche bearbeiten will kommt "Fehler Speichern der Config fehlgeschlagen", was meine config.json Vermutung nur untermauert. Ich vermute fast, der findet die aktuelle config.json nicht, obwhol ich den homebridge.service angepasst habe.