So, ich gebe nicht auf! Die Dinger müssen irgendwann doch mal Daten ausspucken. Vielleicht könnt ihr mir bei der Eingrenzung des Problems helfen und einen Blick drüber werfen, ob ich hier richtig denke. Folgendes habe ich geprüft:
1. Homebridge startet als root
pi@raspberrypi:~ $ sudo systemctl status homebridge -l
...
CGroup: /system.slice/homebridge.service
??1399 sudo -u root DEBUG=* /usr/local/bin/homebridge
??1406 homebridge
Apr 09 19:06:17 raspberrypi homebridge[1397]: Starting homebridge
Apr 09 19:06:17 raspberrypi sudo[1399]: root : TTY=unknown ; PWD=/root ; USE
...
2. Bluetooth-Dienst läuft - oder nicht? Die roten Einträge sehen seltsam aus.
pi@raspberrypi:~ $ bluetoothctl
[NEW] Controller B8:27:EB:79:18:2B raspberrypi [default]
[NEW] Device C4:7C:8D:6A:5D:93 Flower care
[NEW] Device C4:7C:8D:6A:61:B8 Flower care
pi@raspberrypi:~ $ service bluetooth status
? bluetooth.service - Bluetooth service
Loaded: loaded (/lib/systemd/system/bluetooth.service; enabled; vendor preset: enabled)
Active: active (running) since Tue 2019-04-09 18:55:01 CEST; 3h 8min ago
Docs: man:bluetoothd(8)
Main PID: 560 (bluetoothd)
Status: "Running"
CGroup: /system.slice/bluetooth.service
??560 /usr/lib/bluetooth/bluetoothd
Apr 09 18:55:01 raspberrypi systemd[1]: Starting Bluetooth service...
Apr 09 18:55:01 raspberrypi bluetoothd[560]: Bluetooth daemon 5.43
Apr 09 18:55:01 raspberrypi systemd[1]: Started Bluetooth service.
Apr 09 18:55:01 raspberrypi bluetoothd[560]: Starting SDP server
Apr 09 18:55:01 raspberrypi bluetoothd[560]: Bluetooth management interface 1.14 initialized
Apr 09 18:55:01 raspberrypi bluetoothd[560]: Failed to obtain handles for "Service Changed" characteri
Apr 09 18:55:01 raspberrypi bluetoothd[560]: Sap driver initialization failed.
Apr 09 18:55:01 raspberrypi bluetoothd[560]: sap-server: Operation not permitted (1)
Apr 09 18:55:02 raspberrypi bluetoothd[560]: Endpoint registered: sender=:1.10 path=/A2DP/SBC/Source/1
Apr 09 18:55:02 raspberrypi bluetoothd[560]: Endpoint registered: sender=:1.10 path=/A2DP/SBC/Sink/1
3. Flower-Cares werden mittels lescan gefunden
pi@raspberrypi:~ $ sudo hcitool lescan
LE Scan ...
C4:7C:8D:6A:61:B8 Flower care
C4:7C:8D:6A:5D:93 Flower care
4. die aktuelle Version des Plugins ist installiert
pi@raspberrypi:~ $ sudo npm list -g --depth=0
/usr/local/lib
5. Plugin und Geräte werden bei Start sauber geladen
[2019-4-9 19:06:20] Loaded plugin: homebridge-mi-flower-care
[2019-4-9 19:06:21] Registering accessory 'homebridge-mi-flower-care.mi-flower-care'
[2019-4-9 19:06:22] [Tomaten] Initializing mi-flower-care accessory...
[2019-4-9 19:06:22] [Lavendel] Initializing mi-flower-care accessory...
6. config.json ist korrekt eingerichtet
pi@raspberrypi:~ $ sudo cat /root/.homebridge/config.json
...
{
"accessory" : "mi-flower-care",
"name" : "Tomaten",
"deviceID" : "C4:7C:8D:6A:5D:93",
"interval" : 30
},
{
"accessory" : "mi-flower-care",
"name" : "Lavendel",
"deviceID" : "C4:7C:8D:6A:61:B8",
"interval" : 30
}
...
7. Pi und Flower Cares kommunizieren, aber: alle Daten werden ins Error-Log geschrieben ???
...
Tue, 09 Apr 2019 19:52:54 GMT att c4:7c:8d:6a:61:b8: read: 0be7000003000000070000023c00fb349b
Tue, 09 Apr 2019 19:52:54 GMT miflora data: <Buffer e7 00 00 03 00 00 00 07 00 00 02 3c 00 fb 34 9b>
Tue, 09 Apr 2019 19:52:54 GMT miflora temperature: 23.1 °C
Tue, 09 Apr 2019 19:52:54 GMT miflora Light: 3 lux
Tue, 09 Apr 2019 19:52:54 GMT miflora moisture: 7 %
Tue, 09 Apr 2019 19:52:54 GMT miflora fertility: 0 µS/cm
Tue, 09 Apr 2019 19:52:54 GMT att c4:7c:8d:6a:61:b8: write: 0a3800
...