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
Starting the Ring-Mqtt addon in Home Assistant, nothing is pushed to MQTT #330
Comments
If you are saying that it hangs at the spot of the log that you posted then it's likely that the Ring hub for that location is offline. During startup, any Ring hub (alarm or smart lighting bridge) at all monitored locations must be online, otherwise the addon waits forever for the hub to come online so that it can query for the available devices. |
It is online and responsive to the app. I'll try and restart it and see if that helps. |
Do you have multiple locations? I mean, the code in question is super simple and has not changed since the earliest days of this project, it's basically this snippet:
So, basically, it prints out "New location" with the location ID, sets a few properties used for internal state tracking, and then calls getDevices() for that location. This call has no timeout and thus will wait forever for all Ring base stations to come be online (this is the documented behavior of ring-client-api, see dgreif/ring#388). In the 3+ years of maintaining this project I've never seen a case of it hanging there unless there is some location with a hub that is offline. I suppose it's theoretically possible that something else is causing getDevices() to fail, but again, that code hasn't changed in years and is in use by thousands of users across various project that leverage ring-client-api so it's unlikely to be something there. |
I only have the one location. I stopped the add-on, restarted the alarm hub then after I was able to control it from the app again (also after confirming its working over WiFi and not cellular, in case that mattered), I started the add-on again. Its still stopping right as it discovers my alarm hub. Looking back at the issue templates, I should have opened this as a support request. I know its not anything with the add-on, because even if something had changed, I didn't make an update. I was really hoping you had seen this before and it would be a super simple silly mistake I made. Dang. |
Do you have any locations that are shared with you from another account? The code attempts to connect to all locations which the account has access to, this includes shared locations. For example, if my daughter shares her alarm with me so that I can see it in the Ring app, then her alarm must also be online. |
I do not. Looking in the app, from the hamburger menu in the top left, I only see my house as a location, then "Add a location" below it. |
And, just to be sure, no smart lighting, which also counts as a hub? |
Oh, good call on that. My lighting hub has been unplugged for some time since I was rearranging some stuff. I'll get that reconnected and see what that does. |
Good deal! That was the problem! Good to know that I can't unplug this silly thing haha. Thank you for that! |
Good to know that the rule still holds, it only hangs here if a hub is offline. I'm going to add some additional logging in 5.0.0 that will list all locations to which the account has access prior to processing the devices for each individual location. Then I'll also add a note that the device level processing will hang if any alarm or smart lighting hubs are offline. Maybe that will help people since this keeps coming up. I never realized how many people just live with the fact that something is offline. It would drive me nuts! |
Describe the bug
Following a (rather hard) reboot of my enviorment, the Ring-Mqtt addon seems to be acting funny. It seems to start and stay running, but looking at the logs in Supervisor, it gets to
ring-mqtt New location:
then stops. Nothing is published to MQTT, and nothing further happens.Describe your environment
I have Ring-Mqtt running as an Addon in a supervised Home Assistant VM, running on top of Ubuntu.
Describe your settings and what you've tried
None of the settings I have now are different from what I was using prior to the weird reboot. Only things I have changed from the defaults are my MQTT server location and login details.
I have tried fully uninstalling/reinstalling and re-logging in with the web portal. No dice.
Debug Logs
The text was updated successfully, but these errors were encountered: