You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm setting up ring-mqtt for the first time with my HA install. Everything runs inside their own Docker container. For the MQTT Broker, I'm using the "eclipse-mosquitto" docker image and configured it with a user/password. I tested by running the following commands:
The client was able to receive the "Hello World" message just fine.
I followed the instructions for setting up the "ring-mqtt" docker image and got it up and running. After adding the mqtt component to HA and restarting, I didn't see any of my Ring alarm sensors. I added the DEBUG option, started the "ring-mqtt" container, and then ran "docker-compse logs
ring-mqtt" and saw that the script was attempting to reconnect to the broker every second:
ring-mqtt | 2020-02-29T07:30:11.716Z ring-mqtt Configuration file read from: ./config
ring-mqtt | 2020-02-29T07:30:11.717Z ring-mqtt Configuration file not found, try environment variables!
ring-mqtt | 2020-02-29T07:30:13.293Z ring-mqtt Connection to Ring API successful
ring-mqtt | 2020-02-29T07:30:13.293Z ring-mqtt Starting connection to MQTT broker...
ring-mqtt | 2020-02-29T07:30:14.400Z ring-mqtt Attempting to reconnect to MQTT broker...
ring-mqtt | 2020-02-29T07:30:15.404Z ring-mqtt Attempting to reconnect to MQTT broker...
ring-mqtt | 2020-02-29T07:30:16.407Z ring-mqtt Attempting to reconnect to MQTT broker...
ring-mqtt | 2020-02-29T07:30:17.411Z ring-mqtt Attempting to reconnect to MQTT broker...
ring-mqtt | 2020-02-29T07:30:18.414Z ring-mqtt Attempting to reconnect to MQTT broker...
ring-mqtt | 2020-02-29T07:30:19.417Z ring-mqtt Attempting to reconnect to MQTT broker...
ring-mqtt | 2020-02-29T07:30:20.420Z ring-mqtt Attempting to reconnect to MQTT broker...
ring-mqtt | 2020-02-29T07:30:21.422Z ring-mqtt Attempting to reconnect to MQTT broker...
ring-mqtt | 2020-02-29T07:30:22.424Z ring-mqtt Attempting to reconnect to MQTT broker...
ring-mqtt | 2020-02-29T07:32:15.373Z ring-mqtt Exit code: SIGTERM
ring-mqtt | 2020-02-29T07:32:15.728Z ring-mqtt Attempting to reconnect to MQTT broker...
ring-mqtt | 2020-02-29T07:32:16.374Z ring-mqtt Exit code: 0
The last line is me stopping the container. Here is my docker compose entry:
The most likely issue is the attempted use of MQTTHOST=localhost when you're running both mosquitto and ring-mqtt in separate containers. If you are not using host network mode within Docker then you can't just use "localhost" to connect between Docker containers. With the current setup effectively ring-mqtt is attempting to connect to an MQTT broker within it's own container.
So you'll either need to change to using the IP address/hostname of the docker host itself instead of using localhost, or you'll need to add the appropriate "network_mode" to your docker compose. At least that's my guess based on what you've provided to this point.
Good catch! I had originally setup the container in network_mode = "host" but removed when I realized it didn't need any incoming networking. Changing MQTTHOST to the IP worked. Thanks!
I'm setting up ring-mqtt for the first time with my HA install. Everything runs inside their own Docker container. For the MQTT Broker, I'm using the "eclipse-mosquitto" docker image and configured it with a user/password. I tested by running the following commands:
The client was able to receive the "Hello World" message just fine.
I followed the instructions for setting up the "ring-mqtt" docker image and got it up and running. After adding the mqtt component to HA and restarting, I didn't see any of my Ring alarm sensors. I added the DEBUG option, started the "ring-mqtt" container, and then ran "docker-compse logs
ring-mqtt" and saw that the script was attempting to reconnect to the broker every second:
The last line is me stopping the container. Here is my docker compose entry:
Any ideas on what's going on? Thanks!
The text was updated successfully, but these errors were encountered: