Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RIng MQTT has stopped working not sure where problem lies #450

Closed
gdg316 opened this issue Sep 4, 2022 · 43 comments
Closed

RIng MQTT has stopped working not sure where problem lies #450

gdg316 opened this issue Sep 4, 2022 · 43 comments
Assignees
Labels
support Help needed solving a problem

Comments

@gdg316
Copy link

gdg316 commented Sep 4, 2022

2022-09-04T00:04:20.333Z ring-mqtt Attempting to reconnect to MQTT broker...
2022-09-04T00:04:20.339Z ring-mqtt Unable to connect to MQTT broker Connection refused: Not authorized
2022-09-04T00:04:21.341Z ring-mqtt Attempting to reconnect to MQTT broker...
2022-09-04T00:04:21.347Z ring-mqtt Unable to connect to MQTT broker Connection refused: Not authorized
2022-09-04T00:04:22.351Z ring-mqtt Attempting to reconnect to MQTT broker...
2022-09-04T00:04:22.357Z ring-mqtt Unable to connect to MQTT broker Connection refused: Not authorized
2022-09-04T00:04:23.360Z ring-mqtt Attempting to reconnect to MQTT broker...
2022-09-04T00:04:23.366Z ring-mqtt Unable to connect to MQTT broker Connection refused: Not authorized
2022-09-04T00:04:24.369Z ring-mqtt Attempting to reconnect to MQTT broker...
2022-09-04T00:04:24.376Z ring-mqtt Unable to connect to MQTT broker Connection refused: Not authorized
2022-09-04T00:04:25.379Z ring-mqtt Attempting to reconnect to MQTT broker...
2022-09-04T00:04:25.386Z ring-mqtt Unable to connect to MQTT broker Connection refused: Not authorized
2022-09-04T00:04:26.388Z ring-mqtt Attempting to reconnect to MQTT broker...
2022-09-04T00:04:26.395Z ring-mqtt Unable to connect to MQTT broker Connection refused: Not authorized
2022-09-04T00:04:27.399Z ring-mqtt Attempting to reconnect to MQTT broker...
2022-09-04T00:04:27.406Z ring-mqtt Unable to connect to MQTT broker Connection refused: Not authorized
2022-09-04T00:04:28.409Z ring-mqtt Attempting to reconnect to MQTT broker...
2022-09-04T00:04:28.419Z ring-mqtt Unable to connect to MQTT broker Connection refused: Not authorized
2022-09-04T00:04:29.422Z ring-mqtt Attempting to reconnect to MQTT broker...
2022-09-04T00:04:29.429Z ring-mqtt Unable to connect to MQTT broker Connection refused: Not authorized
2022-09-04T00:04:30.433Z ring-mqtt Attempting to reconnect to MQTT broker...
2022-09-04T00:04:30.440Z ring-mqtt Unable to connect to MQTT broker Connection refused: Not authorized
2022-09-04T00:04:31.443Z ring-mqtt Attempting to reconnect to MQTT broker...
2022-09-04T00:04:31.453Z ring-mqtt Unable to connect to MQTT broker Connection refused: Not authorized
2022-09-04T00:04:32.458Z ring-mqtt Attempting to reconnect to MQTT broker...
2022-09-04T00:04:32.467Z ring-mqtt Unable to connect to MQTT broker Connection refused: Not authorized
2022-09-04T00:04:33.469Z ring-mqtt Attempting to reconnect to MQTT broker...
2022-09-04T00:04:33.478Z ring-mqtt Unable to connect to MQTT broker Connection refused: Not authorized
2022-09-04T00:04:34.481Z ring-mqtt Attempting to reconnect to MQTT broker...
2022-09-04T00:04:34.487Z ring-mqtt Unable to connect to MQTT broker Connection refused: Not authorized
2022-09-04T00:04:35.490Z ring-mqtt Attempting to reconnect to MQTT broker...
2022-09-04T00:04:35.497Z ring-mqtt Unable to connect to MQTT broker Connection refused: Not authorized
2022-09-04T00:04:36.500Z ring-mqtt Attempting to reconnect to MQTT broker...
2022-09-04T00:04:36.508Z ring-mqtt Unable to connect to MQTT broker Connection refused: Not authorized
2022-09-04T00:04:37.511Z ring-mqtt Attempting to reconnect to MQTT broker...
2022-09-04T00:04:37.519Z ring-mqtt Unable to connect to MQTT broker Connection refused: Not authorized
2022-09-04T00:04:38.521Z ring-mqtt Attempting to reconnect to MQTT broker...
2022-09-04T00:04:38.530Z ring-mqtt Unable to connect to MQTT broker Connection refused: Not authorized

@gdg316 gdg316 added the support Help needed solving a problem label Sep 4, 2022
@gdg316
Copy link
Author

gdg316 commented Sep 4, 2022

I fixed issue logs show problem lied with Mosquito Broker
6-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 |
| Addon for Home Assistant |
| |
| 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

@hdprice
Copy link

hdprice commented Sep 4, 2022

I fixed issue logs show problem lied with Mosquito Broker

6-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 |

| Addon for Home Assistant |
| |
| 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

I'm having the same problem. What was the fix?

Thanks!

H

@gdg316
Copy link
Author

gdg316 commented Sep 4, 2022

Mosquito Broker says there is supposed to be a Username Configured under user names

Home Assistant Add-on: Mosquitto broker
Installation

Follow these steps to get the add-on installed on your system:

Navigate in your Home Assistant frontend to Supervisor -> Add-on Store.
Find the "Mosquitto broker" add-on and click it.
Click on the "INSTALL" button.

How to use

The add-on has a couple of options available. To get the add-on running:

Start the add-on.
Have some patience and wait a couple of minutes.
Check the add-on log output to see the result.

Create a new user for MQTT via your Home Assistant's frontend Configuration -> Users (manage users) , (i.e. not on Mosquitto's Configuration tab). Notes:

This name cannot be homeassistant or addon, those are reserved usernames.
If you do not see the option to create a new user, ensure that Advanced Mode is enabled in your Home Assistant profile.

To use the Mosquitto as a broker, go to the integration page and install the configuration with one click:

Navigate in your Home Assistant frontend to Configuration -> Integrations.
MQTT should appear as a discovered integration at the top of the page
Select it and check the box to enable MQTT discovery if desired, and hit submit.

If you have old MQTT settings available, remove this old integration and restart Home Assistant to see the new one.
Configuration

@tsightler
Copy link
Owner

Just for clarity I would like to point out that, when using standard Home Assistant addons for MQTT, it should not be required to manually create users for ring-mqtt to operate as Home Assistant should automatically create the "addons" user, and ring-mqtt uses the Home Assistant API to detect this user and automatically get the password. Of course this only works when using the addon versions of Mosquitto and ring-mqtt, as well as a properly configured Home Assistant Mosquitto integration. This is why the "addon" username cannot be used for manual user configuration.

While I've personally never had a single issue with the automatic configuration, some people do and it's difficult to troubleshoot, so I understand why people might choose to manually create users using the instructions above, and of course if you are not using the addons then manual configuration is generally required.

@hdprice
Copy link

hdprice commented Sep 4, 2022

Just for clarity I would like to point out that, when using standard Home Assistant addons for MQTT, it should not be required to manually create users for ring-mqtt to operate as Home Assistant should automatically create the "addons" user, and ring-mqtt uses the Home Assistant API to detect this user and automatically get the password.

This is interesting. I'm using the addon version of both Mosquito and Ring-MQTT. HA has not created an "addons" user. Should I create one?

When I look at the Mosquitto integration config, this is how it's configured, with a user of Homeassistant, not addons. That's not something I did...

Screenshot 2022-09-04 at 9 01 11 AM

I read in the Mosquitto docs that the user Homeassistant shouldn't be used as it's a reserved uid. Should I change this to another uid?

Another thing to note is that all this was working perfectly for well over 2 years, then mid to late last week Mosquitto got updated and it hasn't worked since. Were there changes to the authentication system?

Thanks in advance for all your help. It really is very much appreciated.

Best

H

@tsightler
Copy link
Owner

HA has not created an "addons" user.

What do you mean by this? This user isn't visible anywhere in the UI that I'm aware of, it's just behind the scenes, which is why it's reserved.

Your config looks correct to me, have you fully restarted Home Assistant since the Mosquitto update (I mean a full host reboot, not the restart in the UI, which only restarts the supervisor). Everything still works for me so I assume nothing has changed.

Basically, the way it works is that, during the startup of the Mosquitto addon the first time it generates the homeassistant user and the addon user with a random password and stores those values in /data/system_user.json. For future starts of the addon, the values are read from this file instead.

These values are automatically pushed to /etc/mosquitto/pw and /etx/mosqutto/acl during startup of the Mosquitto addon container. You can see the process in the startup script for the addon:

https://github.com/home-assistant/addons/blob/master/mosquitto/rootfs/etc/cont-init.d/mosquitto.sh

These are then sent to Home Assistant via the service discovery API so that other addons can use this API. You can see this in the discovery script of the Mosqutto addon:

https://github.com/home-assistant/addons/blob/master/mosquitto/rootfs/etc/services.d/mosquitto/discovery

Basically, it should never be required for an addon to require manual MQTT user configuration since the addon user can be discovered as part of the MQTT service discovery API, and this is exactly what ring-mqtt does.

Of course, if something is going wrong with this process, it's completely outside of ring-mqtt, all ring-mqtt does is use the API, via bashio, to get the username/password for the addon user which was automatically generated by the Mosquitto addon and pushed to the API. Other than via this services API, I don't believe the "addon" user is visible because it is not a Home Assistant user, it only exist within the Mosquitto addon.

@tsightler
Copy link
Owner

tsightler commented Sep 4, 2022

Interestingly, I found this issue:

home-assistant/addons#2618

Which also has a link to a similar, recent (in the last week) issue with unauthorized user from Zigbee2MQTT as well:

Koenkk/zigbee2mqtt#13001

Both which happened after recent Mosquitto addon update, however, that thread indicates that this can be solved by verifying that the supervisor engine is fully updated. The 2022.08.5 update for the supervisor was released like 2 weeks ago. Are you definitely running the latest supervisor update?

@tsightler
Copy link
Owner

Well, after reading a little more, it doesn't seem like supervisor 2022.8.5 is the full fix, but something is definitely not right, lots of people having issues. I'll assume they'll eventually get it fixed, but definitely outside of ring-mqtt itself so I'd follow that issue.

@hdprice
Copy link

hdprice commented Sep 4, 2022

Thanks for all this info. I didn't know the addons uid was hidden so that explains it not showing up in my users list. I also didn't know that doing a restart from the UI didn't fully restart HA. I tried cycling the VM that HA is running in. It came back up without any problems but the issue is still there. It's interesting to know that other MQTT add-ons are seeing this problem also. I'm wondering if there's a way to roll back the Mosquitto update to the previous version? It would be good to get ring-mitt running again as I have built lots of automations that rely on it reporting the state of ring contact sensors.

Thanks again for all your help.

@hdprice
Copy link

hdprice commented Sep 4, 2022

Found this in the Mosquitto Broker changelog..

6.1.0

Update mosquitto to 2.0.11
Remove mosquitto-auth-plug and replace with mosquitto-go-auth 1.8.2
Change base image from Alpine to Debian (required for mosquitto-go-auth)
Note: Mosquitto 2.0.0 did contain some breaking changes. We don't anticipate most users to be affected by them but if you have a heavily customized mosquitto config we would advise reviewing their changelog.

@tsightler
Copy link
Owner

Yes but only applies "if you have a heavily customized mosquitto config", which I'm assuming you do not, so unless you do, it's not likely to be the issue. Also, 6.1.0 was released in May, not really recently. The only recent update, on Aug 30th, was a very minor change in timestamp logging. I feel like that's unlikely to be the issue.

Note that you can always follow the instructions above to manually create a user and password and define that in the MQTT URL of ring-mqtt. As I said, there's nothing really wrong with that approach, it just shouldn't technically be required, but troubleshooting the automatic user creation and service discovery when it goes wrong seems to be difficult for most people, likely because there is very little public facing user information about it.

@tsightler
Copy link
Owner

I also didn't know that doing a restart from the UI didn't fully restart HA.

To be clear on this, it does restart HA itself, but what doesn't restart is all of the addons, because they are in their own containers. There is an option to reboot the host from the HA UI, but it's pretty well hidden and a lot of people don't know about it, under Settings...System...Hardware you can click the three dots and reboot host is there. Perhaps it's somewhere else that's more visible and I just don't know it.

@tsightler
Copy link
Owner

Can you verify you specific settings for Mosquitto addon and ring-mqtt addon, specifically, what are your settings for Start on Boot and Watchdog config options?

@hdprice
Copy link

hdprice commented Sep 4, 2022

I did customize the MQTT URL setting in ring-mqtt. I created a new user then substituted those credentials in place of auto_username and auto_password in the URL. That seems to be working now. ring-mqtt has enumerated my Ring devices. This is very odd as I tried this before first posting here and it did not work, but that was before I restarted the VM so maybe that indeed was the problem. The auto config still isn't working but at least I've found a work around with your help. I'm very, very grateful..

@tsightler
Copy link
Owner

tsightler commented Sep 4, 2022

Glad you got it working, even with a workaround. One of the "joys" of Home Assistant is that it constantly breaks. The recent update of ZwaveJS2Mqtt broke my Z-wave devices, not due to the MQTT side, but due to the update Z-wave driver because they moved from v6.15 to v7.0.0 while calling the addon only a minor bump. Fortunately I always make and keep backups so I was able to easily revert to the prior version and it worked again.

I'm honestly close to giving up on HA as these days I find I use it mostly begrudgingly as I just don't agree with much of the direction of the project, but I guess it's still the best open source/free home automation project at this time and I already have all of my automations there, but it breaks for me on average 3-4x times a year for no real benefit that I see and that's just annoying.

@hdprice
Copy link

hdprice commented Sep 4, 2022

Ha, I hear ya. I always read the breaking changes but things like this one fall through the cracks. Reminds me of the good old, bad old days of Windows, where you'd update a video driver and the network would stop working. So you'd update the network driver and lose your sound card. Ugh. Ive used several home automation systems over the years and Home Assistant is by far the most comprehensive and just over the last 3 years it's got so much easier to use. I'm going to stick with it but your comment about frequent backups is absolutely golden advice. Thanks again for all your help. It's really great when folks respond like this. Makes a huge difference.

@gdg316
Copy link
Author

gdg316 commented Sep 12, 2022

So my question is I have Homeassistant OS on Raspberry PI 4
And I followed directions for Mosquito Broker which said create a Username and Password in The Frontend under users and it does not need to be Administrator.
Then I reconfigured MQTT with those credentials and I had communication restored to Ring MQTT. It stated that username could not be Homeassistant or add on.
Should I reinstall MQTT Broker ??
And then reinstall Ring-MQTT ??
A new error says Client Unknown Closed it's Connection.And should Debugging be on for MQTT Broker ??
Ring-MQTT Configuration I never altered or made changes.
So I see auto username and auto password in ring MQTT URL
But Auto hostname ? And my too assume my local HTTP link from web browser?? Or from Hassio itself ?

@tsightler
Copy link
Owner

MQTT setup is pretty straightforward, so it's difficult to offer a lot of suggestions that aren't just a Google search away. When attempting to troubleshoot the issue you should look at the logs from both the client (ring-mqtt) and the server (mosquitto) and between those it should be pretty clear what the problem is.

As already mentioned in this thread, the auto_username and auto_password features seems to be having a problem for some users that appears to have been caused by some changes in Home Assistant, but I can't reproduce this issue. I only use automatic configuration with default addon options for both Mosquitto and ring-mqtt addons (Start on Boot, Watchdog disabled) and both my production and development instances still work just fine.

My gut says it's perhaps some other issue caused by other HACS components delaying startup, but, again, I'm not 100% sure since I can't reproduce it.

Regardless, if you manually set the username/password on the Mosquitto addon you must also replace the auto_username/auto_password options with that username/password. I wouldn't replace anything else in the URL.

The MQTT URL has nothing to do with HTTP or web browser, the URL defines how ring-mqtt should connect to the MQTT broker.

@gdg316
Copy link
Author

gdg316 commented Sep 12, 2022

Thank You I did that
MQTT Broker log I think is good.
I do not have debugging enabled on broker.

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/mosquitto.sh
[12:22:51] INFO: SSL is not enabled
cont-init: info: /etc/cont-init.d/mosquitto.sh exited 0
cont-init: info: running /etc/cont-init.d/nginx.sh
cont-init: info: /etc/cont-init.d/nginx.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 mosquitto (no readiness notification)
services-up: info: copying legacy longrun nginx (no readiness notification)
s6-rc: info: service legacy-services successfully started
[12:22:52] INFO: Starting NGINX for authentication handling...
[12:22:53] INFO: Starting mosquitto MQTT broker...
2022-09-12 12:22:53: Warning: Mosquitto should not be run as root/administrator.
[12:22:54] INFO: Successfully send discovery information to Home Assistant.
[12:22:55] INFO: Successfully send service information to the Supervisor.

@tsightler
Copy link
Owner

That log shows no clients even attempting a connection to the broker, you need to verify your MQTT settings and make sure the MQTT URL is correct.

@tsightler
Copy link
Owner

Perhaps more importantly, it doesn't even show Home Assistant connecting to the broker so it doesn't matter if ring-mqtt connects to the broker or not.

@gdg316
Copy link
Author

gdg316 commented Sep 12, 2022

I will have to T/S further when I get home possibly enable debugging on the Broker
![Uploading 189715598...]

@gdg316
Copy link
Author

gdg316 commented Sep 12, 2022

12:22:55] INFO: Successfully send service information to the Supervisor.
2022-09-12 12:22:53: mosquitto version 2.0.11 starting
2022-09-12 12:22:53: Config loaded from /etc/mosquitto/mosquitto.conf.
2022-09-12 12:22:53: Loading plugin: /usr/share/mosquitto/go-auth.so
2022-09-12 12:22:53: ├── Username/password checking enabled.
2022-09-12 12:22:53: ├── TLS-PSK checking enabled.
2022-09-12 12:22:53: └── Extended authentication not enabled.
2022-09-12 12:22:53: Opening ipv4 listen socket on port 1883.
2022-09-12 12:22:53: Opening ipv6 listen socket on port 1883.
2022-09-12 12:22:53: Opening websockets listen socket on port 1884.
2022-09-12 12:22:53: mosquitto version 2.0.11 running
2022-09-12 12:22:54: New connection from 127.0.0.1:49150 on port 1883.

@tsightler
Copy link
Owner

Broker debugging is rarely required to solve simple connection problems, this stuff is very, very basic. I noticed you keep editing logs and removing stuff, but that makes it almost impossible to help you troubleshoot, so, if you want help here, you'll need to post your logs.

I noticed that you had two clients:

2022-09-12 12:23:49: New connection from [172.30.32.1:41339](http://172.30.32.1:41339/) on port 1883.
2022-09-12 12:23:49: New client connected from [172.30.32.1:41339](http://172.30.32.1:41339/) as 5VbajCUW1VXqlOjYjSY8iR (p2, c1, k60, u'mqtt-0517').
2022-09-12 12:24:53: New connection from [172.30.33.3:34356](http://172.30.33.3:34356/) on port 1883.
2022-09-12 12:24:53: New client connected from [172.30.33.3:34356](http://172.30.33.3:34356/) as mqttjs_6d5a99c8 (p2, c1, k60, u'MQTT-0517').

It looks like the first client is the Home Assistant integration and the second clients is probably ring-mqtt (unless you have some other addon that also uses MQTT and uses the mqttjs library). It appears that you've configured a username, but are using uppercase in one place and lowercase in another, in general, usernames are case sensitive. Also, if you are using any special characters in the password that are valid in a URL, you will need to manually URL encode them.

@gdg316
Copy link
Author

gdg316 commented Sep 12, 2022

I corrected the username - it is same in both but this does not change

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/mosquitto.sh
[15:08:42] INFO: SSL is not enabled
cont-init: info: /etc/cont-init.d/mosquitto.sh exited 0
cont-init: info: running /etc/cont-init.d/nginx.sh
cont-init: info: /etc/cont-init.d/nginx.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 mosquitto (no readiness notification)
services-up: info: copying legacy longrun nginx (no readiness notification)
s6-rc: info: service legacy-services successfully started
[15:08:42] INFO: Starting NGINX for authentication handling...
[15:08:43] INFO: Starting mosquitto MQTT broker...
2022-09-12 15:08:43: Warning: Mosquitto should not be run as root/administrator.
[15:08:45] INFO: Successfully send discovery information to Home Assistant.
[15:08:45] INFO: Successfully send service information to the Supervisor.

@gdg316
Copy link
Author

gdg316 commented Sep 12, 2022

MQTT Broker
not sure if I need to put user and password here too

@gdg316
Copy link
Author

gdg316 commented Sep 13, 2022

2022-09-12T23:55:43.742Z ring-attr [Front Door] ring/89b81f0f-89e0-4256-be09-1dc90f5177fa/camera/78db2f0c1b96/battery/attributes {"batteryLevel":"99"}
2022-09-13T00:00:43.493Z ring-attr [Montgomery Bridge] ring/89b81f0f-89e0-4256-be09-1dc90f5177fa/alarm/abcfd1b9-72bf-40d2-bee8-38f028c3ea00/info/state {"commStatus":"ok","lastCommTime":"2022-09-12T23:53:27Z","lastUpdate":"2022-09-12T23:53:27Z","tamperStatus":"ok","wirelessSignal":-40}
2022-09-13T00:00:43.494Z ring-attr [Montgomery Bridge] ring/89b81f0f-89e0-4256-be09-1dc90f5177fa/alarm/abcfd1b9-72bf-40d2-bee8-38f028c3ea00/wireless/attributes {"wirelessSignal":-40}
2022-09-13T00:00:43.495Z ring-attr [Front] ring/89b81f0f-89e0-4256-be09-1dc90f5177fa/lighting/1d13ba34-5f6e-4a83-b7af-fe03d3ae31b4/info/state {"commStatus":"ok","lastCommTime":"2022-09-12T10:33:34Z","lastUpdate":"2022-09-12T10:33:34Z","tamperStatus":"ok"}
2022-09-13T00:00:43.498Z ring-attr [Front Solar Pathlight 6] ring/89b81f0f-89e0-4256-be09-1dc90f5177fa/lighting/2102dc2d-1214-45d2-be6b-2f258e622858/info/state {"batteryLevel":100,"batteryStatus":"charged","commStatus":"ok","firmwareStatus":"up-to-date","lastCommTime":"2022-09-12T23:44:36Z","lastUpdate":"2022-09-12T23:44:36Z","serialNumber":"RBPS12043BK001041","tamperStatus":"ok"}
2022-09-13T00:00:43.502Z ring-attr [Front Solar Pathlight 6] ring/89b81f0f-89e0-4256-be09-1dc90f5177fa/lighting/2102dc2d-1214-45d2-be6b-2f258e622858/battery/attributes {"batteryLevel":100,"batteryStatus":"charged"}
2022-09-13T00:00:43.503Z ring-attr [Front Solar Pathlight 2] ring/89b81f0f-89e0-4256-be09-1dc90f5177fa/lighting/08019c66-c703-49f9-9b4f-63c070e09fbb/info/state {"batteryLevel":100,"batteryStatus":"charged","commStatus":"ok","firmwareStatus":"up-to-date","lastCommTime":"2022-09-12T23:26:54Z","lastUpdate":"2022-09-12T23:26:54Z","serialNumber":"RBPS12115BK002612","tamperStatus":"ok"}
2022-09-13T00:00:43.504Z ring-attr [Front Solar Pathlight 2] ring/89b81f0f-89e0-4256-be09-1dc90f5177fa/lighting/08019c66-c703-49f9-9b4f-63c070e09fbb/battery/attributes {"batteryLevel":100,"batteryStatus":"charged"}
2022-09-13T00:00:43.505Z ring-attr [Front Solar Pathlight 3] ring/89b81f0f-89e0-4256-be09-1dc90f5177fa/lighting/c7925f3a-cabb-4f86-a25d-3221b4ebae58/info/state {"batteryLevel":76,"batteryStatus":"charged","commStatus":"ok","firmwareStatus":"up-to-date","lastCommTime":"2022-09-12T23:50:53Z","lastUpdate":"2022-09-12T23:50:53Z","serialNumber":"RBPS12113BK009173","tamperStatus":"ok"}
2022-09-13T00:00:43.506Z ring-attr [Front Solar Pathlight 3] ring/89b81f0f-89e0-4256-be09-1dc90f5177fa/lighting/c7925f3a-cabb-4f86-a25d-3221b4ebae58/battery/attributes {"batteryLevel":76,"batteryStatus":"charged"}
2022-09-13T00:00:43.507Z ring-attr [Front Solar Pathlight 4] ring/89b81f0f-89e0-4256-be09-1dc90f5177fa/lighting/d1895758-de1e-4987-8e45-942a26bfefa4/info/state {"batteryLevel":100,"batteryStatus":"charged","commStatus":"ok","firmwareStatus":"up-to-date","lastCommTime":"2022-09-12T23:38:35Z","lastUpdate":"2022-09-12T23:38:35Z","serialNumber":"RBPS12113BK001038","tamperStatus":"ok"}
2022-09-13T00:00:43.508Z ring-attr [Front Solar Pathlight 4] ring/89b81f0f-89e0-4256-be09-1dc90f5177fa/lighting/d1895758-de1e-4987-8e45-942a26bfefa4/battery/attributes {"batteryLevel":100,"batteryStatus":"charged"}
2022-09-13T00:00:43.509Z ring-attr [Front Solar Pathlight 5] ring/89b81f0f-89e0-4256-be09-1dc90f5177fa/lighting/876b4632-1846-42b3-add9-933ba676b4dc/info/state {"batteryLevel":100,"batteryStatus":"charged","commStatus":"ok","firmwareStatus":"up-to-date","lastCommTime":"2022-09-12T23:32:41Z","lastUpdate":"2022-09-12T23:32:41Z","serialNumber":"RBPS12117BK000431","tamperStatus":"ok"}
2022-09-13T00:00:43.510Z ring-attr [Front Solar Pathlight 5] ring/89b81f0f-89e0-4256-be09-1dc90f5177fa/lighting/876b4632-1846-42b3-add9-933ba676b4dc/battery/attributes {"batteryLevel":100,"batteryStatus":"charged"}
2022-09-13T00:00:43.511Z ring-attr [Montgomery Alarm] ring/89b81f0f-89e0-4256-be09-1dc90f5177fa/alarm/b7407958-f5b0-4a58-8dec-659c2b22d29b/info/state {"alarmState":"all-

@tsightler
Copy link
Owner

I'm not sure why you decided to post a random segment of the log, but it shows that ring-mqtt is working as expected.

@gdg316
Copy link
Author

gdg316 commented Sep 13, 2022

tried copying the whole ring-mqtt log - I am still trying to T/S Mqtt Broker - checking all logs I have Rebooted Host , I do not have any other mqtt things - I have Zwavejs with zigbi on the USB stick. I am wondering if I am having problems with those ports like 1883

@tsightler
Copy link
Owner

There's no problem with the ports as the logs you posted show a fully working ring-mqtt as it will not send data to the MQTT broker unless it has successfully made the connection to the broker, so it has clearly established the connection to MQTT. Of course that's only half of the requirement as the HA Mosquitto integration must also make a connection and read the data.

Unfortunately, I can't help you troubleshoot your MQTT issues beyond ring-mqtt, which the logs you posted clearly showed is working. You might consider uninstalling everything, removing the Mosquitto addon and HA integration, and reinstalling everything from scratch following the instructions and don't change any defaults, that should be all that is required.

@gdg316
Copy link
Author

gdg316 commented Sep 13, 2022

Ok thanks - I activated Debugging and now see

time="2022-09-12T20:40:56-04:00" level=debug msg="found in cache: mqtt-0517"
time="2022-09-12T20:40:56-04:00" level=debug msg="checking acl cache for mqtt-0517"
time="2022-09-12T20:40:56-04:00" level=debug msg="to auth record: [97 99 108 45 109 113 116 116 45 48 53 49 55 45 114 105 110 103 47 56 57 98 56 49 102 48 102 45 56 57 101 48 45 52 50 53 54 45 98 101 48 57 45 49 100 99 57 48 102 53 49 55 55 102 97 47 97 108 97 114 109 47 98 55 52 48 55 57 53 56 45 102 53 98 48 45 52 97 53 56 45 56 100 101 99 45 54 53 57 99 50 98 50 50 100 50 57 98 47 115 116 97 116 117 115 45 109 113 116 116 106 115 95 51 102 101 101 52 55 98 100 45 50 218 57 163 238 94 107 75 13 50 85 191 239 149 96 24 144 175 216 7 9]\n"
time="2022-09-12T20:40:56-04:00" level=debug msg="found in cache: mqtt-0517"
time="2022-09-12T20:40:56-04:00" level=debug msg="checking acl cache for mqtt-0517"
time="2022-09-12T20:40:56-04:00" level=debug msg="to auth record: [97 99 108 45 109 113 116 116 45 48 53 49 55 45 114 105 110 103 47 56 57 98 56 49 102 48 102 45 56 57 101 48 45 52 50 53 54 45 98 101 48 57 45 49 100 99 57 48 102 53 49 55 55 102 97 47 97 108 97 114 109 47 98 55 52 48 55 57 53 56 45 102 53 98 48 45 52 97 53 56 45 56 100 101 99 45 54 53 57 99 50 98 50 50 100 50 57 98 47 115 116 97 116 117 115 45 55 53 73 54 68 102 71 83 72 80 52 88 118 100 75 72 105 74 104 57 50 71 45 49 218 57 163 238 94 107 75 13 50 85 191 239 149 96 24 144 175 216 7 9]\n"
time="2022-09-12T20:40:56-04:00" level=debug msg="found in cache: mqtt-0517"
time="2022-09-12T20:40:56-04:00" level=debug msg="checking acl cache for mqtt-0517"
time="2022-09-12T20:40:56-04:00" level=debug msg="to auth record: [97 99 108 45 109 113 116 116 45 48 53 49 55 45 114 105 110 103 47 56 57 98 56 49 102 48 102 45 56 57 101 48 45 52 50 53 54 45 98 101 48 57 45 49 100 99 57 48 102 53 49 55 55 102 97 47 97 108 97 114 109 47 50 56 55 53 99 48 54 53 45 48 48 57 102 45 52 101 99 54 45 98 51 54 53 45 54 50 49 101 56 50 53 48 52 101 50 53 47 115 116 97 116 117 115 45 109 113 116 116 106 115 95 51 102 101 101 52 55 98 100 45 50 218 57 163 238 94 107 75 13 50 85 191 239 149 96 24 144 175 216 7 9]\n"
time="2022-09-12T20:40:56-04:00" level=debug msg="found in cache: mqtt-0517"
time="2022-09-12T20:40:56-04:00" level=debug msg="checking acl cache for mqtt-0517"
time="2022-09-12T20:40:56-04:00" level=debug msg="to auth record: [97 99 108 45 109 113 116 116 45 48 53 49 55 45 114 105 110 103 47 56 57 98 56 49 102 48 102 45 56 57 101 48 45 52 50 53 54 45 98 101 48 57 45 49 100 99 57 48 102 53 49 55 55 102 97 47 97 108 97 114 109 47 50 56 55 53 99 48 54 53 45 48 48 57 102 45 52 101 99 54 45 98 51 54 53 45 54 50 49 101 56 50 53 48 52 101 50 53 47 115 116 97 116 117 115 45 55 53 73 54 68 102 71 83 72 80 52 88 118 100 75 72 105 74 104 57 50 71 45 49 218 57 163 238 94 107 75 13 50 85 191 239 149 96 24 144 175 216 7 9]\n"
time="2022-09-12T20:40:56-04:00" level=debug msg="found in cache: mqtt-0517"
time="2022-09-12T20:40:56-04:00" level=debug msg="checking acl cache for mqtt-0517"
time="2022-09-12T20:40:56-04:00" level=debug msg="to auth record: [97 99 108 45 109 113 116 116 45 48 53 49 55 45 114 105 110 103 47 56 57 98 56 49 102 48 102 45 56 57 101 48 45 52 50 53 54 45 98 101 48 57 45 49 100 99 57 48 102 53 49 55 55 102 97 47 97 108 97 114 109 47 100 54 99 99 55 97 98 102 45 100 102 52 102 45 52 57 56 99 45 56 48 99 101 45 48 50 52 50 52 50 57 56 57 97 56 54 47 115 116 97 116 117 115 45 109 113 116 116 106 115 95 51 102 101 101 52 55 98 100 45 50 218 57 163 238 94 107 75 13 50 85 191 239 149 96 24 144 175 216 7 9]\n"

2022-09-12 20:41:59: Sending PUBLISH to 75I6DfGSHP4XvdKHiJh92G (d0, q0, r0, m0, 'ring/89b81f0f-89e0-4256-be09-1dc90f5177fa/camera/78db2f0c1b96/ding/attributes', ... (61 bytes))
2022-09-12 20:41:59: Sending PUBACK to mqttjs_3fee47bd (m27635, rc0)
2022-09-12 20:41:59: Received PUBLISH from mqttjs_3fee47bd (d0, q1, r0, m27636, 'ring/89b81f0f-89e0-4256-be09-1dc90f5177fa/camera/78db2f0c1b96/snapshot_mode/state', ... (8 bytes))
2022-09-12 20:41:59: Sending PUBLISH to 75I6DfGSHP4XvdKHiJh92G (d0, q0, r0, m0, 'ring/89b81f0f-89e0-4256-be09-1dc90f5177fa/camera/78db2f0c1b96/snapshot_mode/state', ... (8 bytes))
2022-09-12 20:41:59: Sending PUBACK to mqttjs_3fee47bd (m27636, rc0)
2022-09-12 20:41:59: Received PUBLISH from mqttjs_3fee47bd (d0, q1, r0, m27637, 'ring/89b81f0f-89e0-4256-be09-1dc90f5177fa/camera/78db2f0c1b96/snapshot/image', ... (16851 bytes))

@gdg316
Copy link
Author

gdg316 commented Sep 13, 2022

I will consider starting from scratch - Thank You very much

@tsightler
Copy link
Owner

tsightler commented Sep 13, 2022

The above clearly shows ring-mqtt working, which means the messages are not getting to HA for whatever reason. Good luck!

@hdprice
Copy link

hdprice commented Sep 13, 2022 via email

@gdg316
Copy link
Author

gdg316 commented Sep 13, 2022

Obvious question but they are often the hard ones to ask yourself. Have you installed the MQTT integration as well as the Moquitto add-on?

On Sep 12, 2022, at 5:47 PM, tsightler @.***> wrote: The above clearly shows ring-mqtt working, which means the messages are not getting to HA for whatever reason. — Reply to this email directly, view it on GitHub <#450 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADH477YRBWUGMZE3J4M6VYDV57FL3ANCNFSM6AAAAAAQEDA6MQ. You are receiving this because you commented.
-- All content is personal opinion. All content is copyright. All rights are reserved. No reproduction in any form is allowed without prior written permission

hdprice Under my intergrations I have only this and the ring

image
image

@gdg316
Copy link
Author

gdg316 commented Sep 13, 2022

Other question ? Does this need 1883 & 1884 (insecure)
Also saw 8883 and 8884 I believe

@tsightler
Copy link
Owner

Assuming you are using defaults (you appear to be) only 1883 is used, but none of that should matter since all of that is needed only locally on the host, nothing externally is needed. Also, the logs you've posted clearly show both the HA client and the ring-mqtt client connecting to the MQTT broker successfully.

Actually, your most recent screenshots appear to show a fully working setup, perhaps you should describe more clearly what exactly is not working. Even your screenshot above of the Mosquitto broker shows 21 devices.

@gdg316
Copy link
Author

gdg316 commented Sep 13, 2022

With the debugging of MQTT Mosquito Broker enabled there is communication with Broker to HA and ring-mqtt.
I created a support ticket for MQTT with attached logs from Mosquito Broker. I was starting to wonder if something was blocking connection like my Router. Homeassistant is installed on My Raspberry PI 4. I do not have Hacs but I have a couple of Custom Components like Alexa Media Player and Nws Weather Alerts. A Sun Card and Wind Direction Compass Card.

@gdg316
Copy link
Author

gdg316 commented Sep 15, 2022

Should I Have info in these boxes (This is default )
image

@gdg316
Copy link
Author

gdg316 commented Sep 15, 2022

Does anyone know if these are necessary steps in the configuration of Mosquitto Broker ??
image

@hdprice
Copy link

hdprice commented Sep 15, 2022 via email

@gdg316
Copy link
Author

gdg316 commented Sep 15, 2022

Thanks I turned debugging off and seems to be issue with the MQTT Plugin, created ticket under Add on's
To try and see where problem lyes

@tsightler
Copy link
Owner

They are not required, the vast majority of users leverage 100% defaults. The only thing I have different from defaults in my setup is that I use SSL/TLS to secure the connection to MQTT, but that's it. Everything in this addon is designed to work with just the default setup and thousands of users have managed to get it to work without issue. If you simply install everything with defaults it should work. If you do choose to use custom topic ACLs then you'll need to make sure that the accounts that you use have access to all topics, but since you can't even get the basic setup to work, I would strongly suggest not going down that path.

I am going to lock this issue. I've noticed that you've opened at least three issues on the HA github, mulitple issues here, one issue on the MQTT Github. This is not proper community behavior and I'm finding it impossible to help you, as are all of the people on the other issues that you've created because you fail to communicate with useful information, fail to follow advice people give you, fail to respond to questions being asked, etc. Rather, you just randomly open issues on various projects hoping people will help you.

If you truly want assistance to solve this issue, please open a new discussion thread (not an issue), communicate clearly what specifically is not working, what steps you've taken (did you reinstall all MQTT components using defaults as asked), and provide the logs and screenshots that people request to be able help you, and, most importantly, take the advice of the people who are attempting to help you and quit trying to do your own thing which clearly isn't working and is just wasting people's time.

Failure to adhere to this request will force me to consider banning you from this repository.

Repository owner locked as off-topic and limited conversation to collaborators Sep 15, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
support Help needed solving a problem
Projects
None yet
Development

No branches or pull requests

3 participants