tsightler / ring-mqtt

Ring devices to MQTT Bridge
MIT License
570 stars 103 forks source link

No motion and no Bell #881

Closed mrahmadt closed 3 weeks ago

mrahmadt commented 1 month ago

Describe the Bug

Snapshot & live streaming are working fine, Siren also working fine, but no motion sensor nor bell ring sensor are working, iOS push notification is enabled and working in Ring App

Steps to Reproduce

Fresh installation, nothing special

Expected Behavior

update sensors for motion detection and bell

Log Output

Devices:
Doorbell 2 (Battery)
Indoor Cam (2nd Gen) wired

Deleted from Ring App, reauth RingMQTT, restarted HA, nothing changed

Log file attached

Screenshots

Screenshot 2024-07-30 at 23 54 18 home-assistant_mqtt_2024-07-30T20-46-36.543Z.log Screenshot 2024-07-31 at 00 01 15 config_entry-mqtt-01J41XBAY05MEQ27XV4D8A7H9G.json

Screenshot 2024-07-31 at 00 00 44

Config File

Attached

Install Type

HA Supervisor

Version

Current version: 5.6.7

Operating System

Ubuntu 22.04.4 LTS

Architecture

x86_64

Machine Details

Physical 86

tsightler commented 1 month ago

Firebase push notifications are undergoing a major refactor due to the migration from legacy FCM API to the new FCM v1 APIs. Tons of work has been done over the last two months to try to get ready for this as it required changes in the registration methods to be implemented in upstream packages (push-receiver), reverse engineering the required registration parameters from the Ring Andriod app, fixing some registration bugs in those upstream packages, and refactoring ring-client-api (another upstream package on which ring-mqtt depends) as well as modifying ring-mqtt to deal with the new push notification format.

All of this work is in the dev branch, so you can try setting the branch option to dev and restarting. Theoretically it should "just work", but you may need to repeat the "stop ring-mqtt, delete from Ring control center, start ring-mqtt, re-authenticate" steps.

mrahmadt commented 1 month ago

Thanks @tsightler for the clarification

tsightler commented 1 month ago

Unfortuantely, it appears that, in some cases, Ring is sending the new style push notifications even to the older versions. It's possible that new accounts, or perhaps account shared with devices that have the lastest Ring app update, are now defaulting to this new format. The legacy FCP APIs started the decommissioning process last week, so it's not 100% surprising. Fortunately, the dev work is largely complete, I've been running the dev branch of ring-mqtt which is built with the beta ring-client-api for the last 3 weeks in my production, with zero issues. Mostly just waiting on the final ring-client-api to leave beta state, which should happen this week, then I can push an updated ring-mqtt.

donagrejja commented 3 weeks ago

I have the same issue after updating to latest version (today). I can see the event in the logs but it doesn't update the motions sensor in HA.

jackyaz commented 3 weeks ago

+1 from me. if i can do anything to help troubleshoot happy to do so

tsightler commented 3 weeks ago

@donagrejja @jackyaz Did you follow the steps in the release notes to reset the push notification registration?

@donagrejja What logs are you referring to as you did not post any logs. Do you mean the ring-mqtt logs or something else?

jackyaz commented 3 weeks ago

Ah i missed that, let me try now. Thanks!

donagrejja commented 3 weeks ago

Removing the old connected device and then re-registering worked. Thanks =)

On Wed, 14 Aug 2024 at 16:57, Jack @.***> wrote:

Ah i missed that, let me try now. Thanks!

— Reply to this email directly, view it on GitHub https://github.com/tsightler/ring-mqtt/issues/881#issuecomment-2289046079, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADQ5Y3A7JICQICKO623UH4DZRNV4HAVCNFSM6AAAAABLXEYUROVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEOBZGA2DMMBXHE . You are receiving this because you were mentioned.Message ID: @.***>

tsightler commented 3 weeks ago

I'm going to go ahead and close this for now. If anyone has a case where upgrading to version 5.7.0 (or newer) doesn't fix the issue, the we can revisit but we have spent tons of effort over the last months getting these new APIs ironed out and so far, this has always fixed the issue and, hopefully, it will not re-occur now that we are using the modern FCM APIs for device registration.

jackyaz commented 3 weeks ago

I had to remove the device and re-auth twice but all seems OK now. Great work!

jackyaz commented 3 weeks ago

It was working but it's stopped again. Do I try removing and re-adding again?

Edit: this fixed it but I will see if it stops again in a couple of days

tsightler commented 3 weeks ago

@jackyaz The first thing I would always do is just restart the addon, having to remove the device from control center and re-register should be a rare occurrence. It only happens because Ring does not allow updating the FCM token for a device once it has been initially set, or at least only allows it after a period of time. However, if for any reason, the GCM registration, which is saved as part of updated refresh tokens, stops working, the only way get push notifications to the new FCM token is to remove the device from the Ring side.

Moving to the new FCM APIs required ring-mqtt to acquire a new FCM token, so if Ring refuses the update, the only fix is to remove the old device and re-register. However, once this happens, it shouldn't be an issue again.

One thing to note, you haven't shared any details of your install type, but if you happened to be on Home Assistant OS 13, which was released about a week ago, it has a major network issue when HA running on a VM, most notably when running on Proxmox or likely any other KVM/QEMU based virtualazation. This can all kinds of issues, including loss of push notifications. I had to upgrade to HA OS 13.1 development version, which should be released to stable channel in the coming days, to address this issue for my prod instance.

jackyaz commented 3 weeks ago

I run on Home Assistant Supervised on Debian. I'll try restarting the addon if the issue happens again and report back

JHarding86 commented 1 week ago

I am running into this issue.

I only first started using this add-on about a week ago. It worked great for about a day, then stopped.

I have followed all of the trouble shooting steps including removing all of the devices from the authorized client list in the Ring Control Center and ultimately uninstalling the add-on completely and I still am not being notified of motion or rings.

I am running Home Assistant OS 13.1 on Proxmox. I just updated to 13.1 today because of the comment above by @tsightler. Not sure what else to try...