tsightler / ring-mqtt

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

Ring-mqtt I'm not able to set it #701

Closed Palmus84 closed 1 year ago

Palmus84 commented 1 year ago

Hi, I've HA core installed on Debian (Docker), and mqtt works normally. When I try to start container "ring-mqtt", always not work, finishing so:

Unable to connect to MQTT broker Connection refused: Not authorized

On config.json I tried to put in mqtt url "localhost:1883", "mylocalip:1883" , but both of them not working. Any solving? Thanks.

tsightler commented 1 year ago

The message is pretty clear, the MQTT client is not authorized. You will need to provide the username/password you have configured for your broker, or modify the broker to allow external connections. Unfortunately, I can't help you here. ring-mqtt is just doing what it is told, if you provide it the correct information with the correct broker IP, port, username and password, it will connect, but I can't possibly know what those values are for your environment.

One possibility, if you are using a password and it has any special characters that aren't valid in a URL, you will need to manually URL engcode them. Good luck!

Palmus84 commented 1 year ago

The message is pretty clear, the MQTT client is not authorized. You will need to provide the username/password you have configured for your broker, or modify the broker to allow external connections. Unfortunately, I can't help you here. ring-mqtt is just doing what it is told, if you provide it the correct information with the correct broker IP, port, username and password, it will connect, but I can't possibly know what those values are for your environment.

One possibility, if you are using a password and it has any special characters that aren't valid in a URL, you will need to manually URL engcode them. Good luck!

First of all, thank you for the answer. Could I ask to you how allow mqtt to external connection? Thanks a lot.

tsightler commented 1 year ago

I'm not sure I understand the question. There are no restrictions on what MQTT server you can use and it has to be external because there is no mqtt broker built into ring-mqtt. You just put in the username/password/ip/port into the MQTT URL, the documentation covers the format, but it's just standard MQTT URL format, nothing special.

Palmus84 commented 1 year ago

I'm trying many times, but not work for me. This is the last output of Docker Run:

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
/run/s6/basedir/scripts/rc.init: line 76: -p: not found
s6-rc: info: service legacy-services: stopping
s6-rc: info: service legacy-services successfully stopped
s6-rc: info: service legacy-cont-init: stopping
s6-rc: info: service legacy-cont-init successfully stopped
s6-rc: info: service fix-attrs: stopping
s6-rc: info: service fix-attrs successfully stopped
s6-rc: info: service s6rc-oneshot-runner: stopping
s6-rc: info: service s6rc-oneshot-runner successfully stopped
tsightler commented 1 year ago

Unfortunately, I just don't know how to help you. In general, I would suggest starting from scratch if you are having such basic issues even running the container.

tsightler commented 1 year ago

As this is clearly not an issue with ring-mqtt, I'm closing this for now. Unfortunately, I just don't have the time available to help users understand basic configuration tasks. If you have specific questions that aren't already covered in the documentation, then I can try to help, but generically asking how to setup things isn't going to get us anywhere because I will just end up reproducing the documentation here.