Alors grosse avancée. Dès le reveil ce matin (je suis en guyane donc c’est 4h après pour vous)
pi@jeedomPi:/home/ring-mqtt $ systemctl stop ring-mqtt
==== AUTHENTICATING FOR org.freedesktop.systemd1.manage-units ===
Authentification requise pour arrêter « ring-mqtt.service ».
Authenticating as: ,,, (pi)
Password:
==== AUTHENTICATION COMPLETE ===
suivi du delete ring token dans config.json et rm state.json
pi@jeedomPi:/home/ring-mqtt $ nano config.json
pi@jeedomPi:/home/ring-mqtt $ rm ring-state.json
J’ai relancé la procédure de génération du token que j’ai tout de suite repris dans state.json pour la coller dans config.json et relancé la commande :
pi@jeedomPi:/home/ring-mqtt $ DEBUG=ring-mqtt ./ring-mqtt.js
ring-mqtt Detected runmode: standard +0ms
ring-mqtt Configuration file: /home/ring-mqtt/config.json +4ms
ring-mqtt MQTT URL: mqtt://127.0.0.1:1883 +3ms
ring-mqtt Reading latest data from state file: /home/ring-mqtt/ring-state.json +0ms
ring-mqtt Attempting connection to Ring API using saved refresh token... +0ms
ring-mqtt Successfully established connection to Ring API using saved token +810ms
ring-mqtt Received updated refresh token +2ms
ring-mqtt Saving updated refresh token to state file +920ms
ring-mqtt Successfully saved updated state file: /home/ring-mqtt/ring-state.json +1s
ring-mqtt Attempting connection to MQTT broker... +0ms
ring-mqtt MQTT connection established, processing Ring locations... +2s
ring-mqtt ------------------------------------------------------------------------------------------ +2s
ring-mqtt This account has access to the following locations: +0ms
ring-mqtt Bar-le-Duc (2051XXXXXXXX51c) +1ms
ring-mqtt +0ms
ring-mqtt IMPORTANT: If *ANY* alarm or smart lighting hubs at these locations are *OFFLINE* +0ms
ring-mqtt the device discovery process below will hang and no devices will be +0ms
ring-mqtt published! +0ms
ring-mqtt +1ms
ring-mqtt If the message "Device Discovery Complete!" is not logged below, please +0ms
ring-mqtt carefully check the Ring app for any hubs or smart lighting devices +0ms
ring-mqtt that are in offline state and either remove them from the location or +1ms
ring-mqtt bring them back online prior to restarting ring-mqtt. +0ms
ring-mqtt +0ms
ring-mqtt If desired, the "location_ids" config option can be used to restrict +0ms
ring-mqtt discovery to specific locations. See the documentation for details. +0ms
ring-mqtt +0ms
ring-mqtt ------------------------------------------------------------------------------------------ +1ms
ring-mqtt Starting Device Discovery... +0ms
ring-mqtt +0ms
ring-mqtt New location: Bar-le-Duc (205XXXXXXX51c) +0ms
ring-mqtt New device: Porte d'entrée (4c2XXXXX254) +6ms
ring-mqtt doorbell_v4 +0ms
ring-mqtt +0ms
ring-mqtt Device Discovery Complete! +0ms
ring-mqtt ------------------------------------------------------------------------------------------ +0ms
ring-mqtt Successfully saved updated state file: /home/ring-mqtt/ring-state.json +4s
ring-mqtt Detected 4 CPU cores, starting 3 live stream workers +0ms
ring-mqtt ERROR - Uncaught Exception +0ms
Error: spawn rtsp-simple-server ENOENT
at Process.ChildProcess._handle.onexit (node:internal/child_process:285:19)
at onErrorNT (node:internal/child_process:485:16)
at processTicksAndRejections (node:internal/process/task_queues:83:21) {
errno: -2,
code: 'ENOENT',
syscall: 'spawn rtsp-simple-server',
path: 'rtsp-simple-server',
spawnargs: [ '/home/ring-mqtt/lib/../config/rtsp-simple-server.yml' ]
}
ring-mqtt The ring-mqtt process is shutting down... +1s
ring-mqtt Setting all devices offline... +2ms
ring-mqtt Exit code: 2 +3s
redémarrer le service avec
pi@jeedomPi:/home/ring-mqtt $ systemctl start ring-mqtt
==== AUTHENTICATING FOR org.freedesktop.systemd1.manage-units ===
Authentification requise pour démarrer « ring-mqtt.service ».
Authenticating as: ,,, (pi)
Password:
==== AUTHENTICATION COMPLETE ===
pi@jeedomPi:/home/ring-mqtt $ systemctl status ring-mqtt
● ring-mqtt.service - ring-mqtt
Loaded: loaded (/lib/systemd/system/ring-mqtt.service; enabled; vendor preset: enabled)
Active: active (running) since Sun 2022-11-13 13:27:32 CET; 3s ago
Main PID: 1632 (node)
Tasks: 11 (limit: 3839)
CGroup: /system.slice/ring-mqtt.service
└─1632 node /home/ring-mqtt/ring-mqtt.js
nov. 13 13:27:32 jeedomPi systemd[1]: Started ring-mqtt.
Là c’est bon !
MAIS
dans MQTT Explorer, je ne vois pas RING mais homeassistant
Alors que mon config.json est paramétré comme suit :
{
"mqtt_url": "mqtt://127.0.0.1:1883",
"mqtt_options": "",
"livestream_user": "",
"livestream_pass": "",
"disarm_code": "",
"enable_cameras": true,
"enable_modes": false,
"enable_panic": false,
"hass_topic": "homeassistant/status",
"ring_token": "Mon token fraichement acquis avec plein de caractères",
"ring_topic": "ring",
"location_ids": [
""
]
}
et mon ring-state.json comme suit :
{"ring_token":"Mon token fraichement acquis avec plein de caractères","systemId":"fedXXX026a8ad9fae90649ed9f88b2576bac2adbfac87abc44d757562687f238","devices":{"4c2XXX97e254":{"snapshot":{"mode":"Auto","autoInterval":true,"interval":600},"event_select":{"state":"Motion 1"}}}}