tsightler / ring-mqtt

Ring devices to MQTT Bridge
MIT License
600 stars 106 forks source link

Attempting to reconnect to MQTT Broker Loop #802

Closed damilkmayne closed 8 months ago

damilkmayne commented 8 months ago

Describe the Issue

Attempting to reconnect to MQTT Broker Loop

Steps take so far

Reinstalled ring-mqtt container, restarted MQTT5 and ring-mqtt container, turned on allow anonymous for MQTT5 and removed password from ring-mqtt config.json.

Log Output

s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service fix-attrs successfully started
s6-rc: info: service legacy-cont-init: starting
cont-init: info: running /etc/cont-init.d/ring-mqtt.sh
-------------------------------------------------------
| Ring-MQTT with Video Streaming                      |
| Docker Edition                                      |
|                                                     |
| For support questions please visit:                 |
| https://github.com/tsightler/ring-mqtt/discussions  |
-------------------------------------------------------
cont-init: info: /etc/cont-init.d/ring-mqtt.sh exited 0
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service legacy-services: starting
services-up: info: copying legacy longrun ring-mqtt (no readiness notification)
s6-rc: info: service legacy-services successfully started
-------------------------------------------------------
ring-mqtt.js version: 5.6.3
Node version v18.17.1
NPM version 9.1.2
git version 2.38.5
-------------------------------------------------------
Running ring-mqtt...
2024-03-19T16:15:01.767Z ring-mqtt Detected runmode: docker
2024-03-19T16:15:01.778Z ring-mqtt Configuration file: /data/config.json
2024-03-19T16:15:08.376Z ring-mqtt Reading latest data from state file: /data/ring-state.json
2024-03-19T16:15:08.384Z ring-mqtt MQTT URL: mqtt://172.30.0.2:1883
2024-03-19T16:15:08.565Z ring-mqtt Attempting connection to Ring API using saved refresh token...
2024-03-19T16:15:11.425Z ring-mqtt Successfully established connection to Ring API using saved token
2024-03-19T16:15:11.448Z ring-mqtt Received updated refresh token
2024-03-19T16:15:11.460Z ring-mqtt Saving updated refresh token to state file
2024-03-19T16:15:12.489Z ring-mqtt Successfully saved updated state file: /data/ring-state.json
2024-03-19T16:15:13.427Z ring-mqtt Attempting connection to MQTT broker...
2024-03-19T16:15:44.562Z ring-mqtt Attempting to reconnect to MQTT broker...
2024-03-19T16:16:15.566Z ring-mqtt Attempting to reconnect to MQTT broker...
2024-03-19T16:16:46.571Z ring-mqtt Attempting to reconnect to MQTT broker...
2024-03-19T16:17:17.578Z ring-mqtt Attempting to reconnect to MQTT broker...
2024-03-19T16:17:48.584Z ring-mqtt Attempting to reconnect to MQTT broker...
2024-03-19T16:18:19.593Z ring-mqtt Attempting to reconnect to MQTT broker...
2024-03-19T16:18:50.601Z ring-mqtt Attempting to reconnect to MQTT broker...

Screenshots

No response

Config File

{
    "mqtt_url": "mqtt://172.30.0.2:1883",
    "mqtt_options": "",
    "livestream_user": "",
    "livestream_pass": "",
    "disarm_code": "",
    "enable_cameras": true,
    "enable_modes": false,
    "enable_panic": false,
    "hass_topic": "homeassistant/status",
    "ring_topic": "ring",
    "location_ids": []
}

Install Type

Docker

Version

v5.6.3

Operating System

Ubuntu

Architecture

x86_64

tsightler commented 8 months ago

Thank you for providing full logs. As you are manually specifying the MQTT broker settings you will need to make 100% sure they are correct. It seems likely the IP address used by your broker has changed as the IP of docker containers is not fixed after a restart. Regardless, this isn't a ring-mqtt issue, only an issue with you not knowing how to configure it, so I'm converting this to a discussion.