tsightler / ring-mqtt

Ring devices to MQTT Bridge
MIT License
556 stars 100 forks source link

Ring intercom does not update ding binary sensor #868

Closed haurok closed 4 days ago

haurok commented 3 weeks ago

Describe the Bug

The ding binary_sensor is not updaring when someone rings the intercom, it stays off all the time. Everything else is working ok. This happens since the last upade.

Steps to Reproduce

Tried ringing the intercom, I get the notification on the oficial app but nothing on home assistant

Expected Behavior

The binary sensor must turn on

Log Output

By mail

Screenshots

No response

Config File

{
    "mqtt_url": "",
    "mqtt_options": "",
    "livestream_user": "",
    "livestream_pass": "",
    "disarm_code": "",
    "enable_cameras": true,
    "enable_modes": false,
    "enable_panic": false,
    "hass_topic": "homeassistant/status",
    "ring_topic": "ring",
    "location_ids": []
}

Install Type

Docker

Version

V5.6.7

Operating System

Raspbian

Architecture

arm

Machine Details

Raspi4

tsightler commented 3 weeks ago

Ring is in the process of migrating from legacy GCM/FCM APIs to FCMv1 (as is required for all companies as the legacy APIs are deprecated and shut down soon). This includes a new FCM format that we don't currently have any examples of. A few weeks ago I had asked in the discussion forums for anyone with an Intercom that was willing to test, as I don't personally own an intercom, but received no replies.

If you are able and willing to test with the dev branch and provide logs, it would be greatly appreciated. Unfortunately, I'm out travelling this week, but if we can get some examples of the new notification format, I'm confident we can get Intercoms working again and get out a new version fully based on the new APIs, which is important since the old ones will start shutting down later this month.

haurok commented 2 weeks ago

Hi, I'm sorry I haven't noticed your message in the discussion forums. I can provide the logs we need. If you can tell me how to install the develop branch, preferably in Docker, and how to get the logs I'll be more than happy to help you.


From: tsightler @.> Sent: Monday, July 8, 2024 5:45:28 PM To: tsightler/ring-mqtt @.> Cc: haurok @.>; Author @.> Subject: Re: [tsightler/ring-mqtt] Ring intercom does not update ding binary sensor (Issue #868)

Ring is in the process of migrating from legacy GCM/FCM APIs to FCMv1 (as is required for all companies as the legacy APIs are deprecated and shut down soon). This includes a new FCM format that we don't currently have any examples of. A few weeks ago I had asked in the discussion forums for anyone with an Intercom that was willing to test, as I don't personally own an intercom, but received no replies.

If you are able and willing to test with the dev branch and provide logs, it would be greatly appreciated. Unfortunately, I'm out travelling this week, but if we can get some examples of the new notification format, I'm confident we can get Intercoms working again and get out a new version fully based on the new APIs, which is important since the old ones will start shutting down later this month.

— Reply to this email directly, view it on GitHubhttps://github.com/tsightler/ring-mqtt/issues/868#issuecomment-2214483249, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AKXVCLZRT2H5DWAR3JPP4V3ZLKXZRAVCNFSM6AAAAABKPDNGWSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMJUGQ4DGMRUHE. You are receiving this because you authored the thread.Message ID: @.***>

buschtoens commented 2 weeks ago

Linking the discussion referred to above: https://github.com/tsightler/ring-mqtt/discussions/865

tsightler commented 2 weeks ago

Sorry for the slow response, I've been travelling for the last week so very little time. Testing the dev branch is easy, just setting the BRANCH config option to "dev" and restarting is all that is required. The container will pull down the latest dev branch when it is restarted. For the addon just set the "branch" config option to "dev" and restart.

I do probably need to double check to make sure the logging needed is enabled, I'll try to do that early this week.

tsightler commented 4 days ago

It seems we've been able to get the data we need and, theoretically, the current development version should work. If anyone with an intercom could please test the dev version using the instructions above and report success/failure, it would be much appreciated. In the end, I will likely release 5.7.0 as soon as ring-client-api v13 has a non-beta release regardless, but it would be really good to know if the problem is resolved before release.

buschtoens commented 4 days ago

Thanks! Thats great to read.

I just gave it a try: restarted, pulled the latest dev, didn't seem to work though. So I forced re-authentication: still no ding event in the log :/

The rest of the ring add on continues to work as expected.

Let me know, if there's any additional data I can provide to help debugging this.

tsightler commented 4 days ago

Can you please clarify what other Ring devices you have, specifically, do you have cameras? Also, how exactly did you force re-authentication?

tsightler commented 4 days ago

Also, can you please set debug config option to "ring" (not "ring-") and restart. This will cause debug messages from ring-client-api to be logged. Then press the intercom button and post any messages about unsupported push notifications, they should look something like:

ring Received push notification in unknown format +23s
ring {"data":{"gcmData":"{\"aps\":{\"alert\":\"Ring Alarm in Sightler Acres changed to Home and Armed at 07/24/24 08:40 PM from App by Tom Sightler\"},\"action\":\"com.ring.push.HANDLE_NEW_SECURITY_PANEL_MODE_SOME_NOTICE\",\"alarm_meta\":{\"location_id\":\"a9ce28cb-fafb-421c-4508-29d54f48cbd3\"}}"},"from":"876313859327","priority":"normal","fcmMessageId":"a057d0c7-5e0a-4257-b5c7-fe929aa43a56"} +0ms

That example is of course from the alarm, but we're looking for anything from Intercom. Thanks.

buschtoens commented 4 days ago

I have two Ring Intercoms bound to my account, no other devices unfortunately. By "rest of the addon working as expected" I meant, that I can use the open door action and see diagnostic data, such as battery level.

I forced re-authentication in the addon's web UI.

I've changed the debug level from ring-* to ring* now. I'll report back with logs in ~10 hours, as it's currently night time here and I don't want to wake up the house. 😅

Thanks so much for your fast support though! I really appreciate it. 🫶

tsightler commented 4 days ago

Thanks, that's why I asked, reforcing authentication does force a new refresh token, however, it's not enough to completely force a new registration with the FCM service. To do this you need to stop the addon, remove ring-mqtt from authorized devices in Ring Command Center, then restart the addon and re-authenticate. This will force a completely new registration of ring-mqtt with the Ring API, including generating an entirely new FCM registration. This might be required in a few cases due to the migration to the new FCM APIs.

buschtoens commented 4 days ago

After I removed the addon's authenticated client device from the Control Center in the Ring app, restarted the addon and re-authenticated in the addon's web UI, the ding events are back again! 🥳

Thank you! My automations immediately worked, too, not requiring me to re-configure devices or anything else. ✨

tsightler commented 4 days ago

Great, hopefully with the migration to the new FCMv1 push API these issues are behind us now. Thanks for testing.