core icon indicating copy to clipboard operation
core copied to clipboard

Ring camera Motion sensor unavailable post upgrade to 2024.10.1

Open c3101 opened this issue 1 year ago • 35 comments

The problem

Post upgrade to 2024.10, the Ring camera Motion sensor reports to be "unavailable".

Automation using this sensor now fails.

Restored 2024.9 to test, and it works.

What version of Home Assistant Core has the issue?

core-2024.10.1

What was the last working version of Home Assistant Core?

core-2024.9.3

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Ring

Link to integration documentation on our website

https://www.home-assistant.io/integrations/ring

Diagnostics information

config_entry-ring-52a0293b8c16482691d13e80370ca92c.json

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

c3101 avatar Oct 07 '24 07:10 c3101

Hey there @sdb9696, mind taking a look at this issue as it has been labeled with an integration (ring) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of ring can trigger bot actions by commenting:

  • @home-assistant close Closes the issue.
  • @home-assistant rename Awesome new title Renames the issue.
  • @home-assistant reopen Reopen the issue.
  • @home-assistant unassign ring Removes the current integration label and assignees on the issue, add the integration domain after the command.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue.
  • @home-assistant remove-label needs-more-information Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


ring documentation ring source (message by IssueLinks)

home-assistant[bot] avatar Oct 07 '24 07:10 home-assistant[bot]

I'm seeing the same issue. Events Ding and Motion both show as Known on Core 2024.10.1.

There is also Sensors Ding and Motion but they never report anything except for "Clear" for me (I think those have been like that since before Core 2024.10.1).

DAS-Grim avatar Oct 07 '24 11:10 DAS-Grim

2024.10 has switched over to the ring realtime notification api. You may have issues with this due to too many authorised devices. Try the steps in the docs link provided and if you still have issues please upload some debug logs.

sdb9696 avatar Oct 07 '24 14:10 sdb9696

So there were many authorised devices, but I've cleared them all, and re-authenticated my Home Assistant 2024.10.1 installation.

However, the problem persists. I've enabled logging under the Ring integration, and restarted it. This is the log attached. As is some images from Home Assistant showing the "Motion" sensor to be unavailable.

It gets other camera information like battery level etc, so it has definitely authenticated with the ring.com service, and there isn't any connectivity issues.

Ring2

ring1

home-assistant_ring_2024-10-07T17-07-35.614Z.log

c3101 avatar Oct 07 '24 17:10 c3101

It looks like from the logs it could be having trouble resolving the address of firebaseinstallations.googleapis.com. If you try to ping that address what answer do you get back?

sdb9696 avatar Oct 07 '24 17:10 sdb9696

Seems my pi-hole was blocking that. I've whitelisted that, and now the sensors show up. Unfortunately the automation still doesn't work.

It seems that the integration knows when last there was motion, but the Motion Detected binary sensor always remains "Clear", despite "motion detected"-switch being enabled.

ring3 ring4 ring6

I've had a look in the logs, but it's pretty much empty now. No other blocked hosts. No weird error messages. Not sure how to continue.

c3101 avatar Oct 07 '24 18:10 c3101

What about the new Motion event entity? Is that firing?

sdb9696 avatar Oct 07 '24 18:10 sdb9696

no, it seems to perpetually stay in the "Unknown" state

ring7 ring8

c3101 avatar Oct 07 '24 18:10 c3101

The event listener will need to be able to connect outwards to port 5228, perhaps your pihole is blocking that? Otherwise please upload fresh logs and I'll have a look.

sdb9696 avatar Oct 08 '24 06:10 sdb9696

I have the exact same problem on my installation and colleagues.

maxipes99 avatar Oct 08 '24 08:10 maxipes99

I've checked on my pi-hole, no other DNS is blocked for my Home Assistant Host. Not sure which hostname it is connecting to on port 5228, but I confirmed is has such a connection.

From Home Assistant itself:

ha_conn

and through my firewall:

ring_connection

The Log shows nothing untoward, in fact, it doesn't show much at all :(

home-assistant_ring_2024-10-08T08-44-24.290Z.log

c3101 avatar Oct 08 '24 08:10 c3101

I'm having this issue as well. Attempted to use both the event sensors for motion and binary sensors for motion (old style) and nothing is getting logged as motion or detected.

michael-w-ha avatar Oct 08 '24 15:10 michael-w-ha

In the ring event history I see Person detcted wheras previously it was logging Motion detected. Has ring made a change recently? From the history in the Ring application history this appears to be the case.

WizGnome avatar Oct 08 '24 22:10 WizGnome

I'm having the same problem. events had an unknown status. They looked like this after updating to version 2024.10.1, I uninstalled and reinstalled the integration and it remains the same.

miguellandre avatar Oct 09 '24 05:10 miguellandre

Exactly the same problem here, I have checked AdGuard and its not being blocked, cleared any old authetnicated devices but no difference, I have rolled back for now.

tapnet88 avatar Oct 09 '24 08:10 tapnet88

Not sure which hostname it is connecting to on port 5228, but I confirmed is has such a connection.

@c3101 thanks for posting the netstat, so we can see it is connected. It could be that after the reauthentication it is still using the old credentials to access the realtime event service. Could you please try deleting the integration, then restarting home assistant, and then re-adding the integration. Your automations should continue to work after re-adding but you may need to re-assign devices to areas.

Also could you enable debug logging during startup by adding the following to your configuration.yaml:

logger:
  default: warning
  logs:
    homeassistant.components.ring: info
    ring_doorbell: debug

sdb9696 avatar Oct 09 '24 08:10 sdb9696

So I've removed Ring integration. Restarted Home Assistant Re-added Ring integration. The problem persists.

It seems to know when the last activity was: last_activity

But looking at the Motion Events timeline for the exact same time frame it know there was activity, it always reports "Unknown" unkown

I've then enabled logging in the configuration.yaml and restarted Home Assistant. I've triggered the camera again, here is the log. home-assistant.log Yes, the automations have "Unknown entity", because I've removed and re-added ring. Not it issue right now :)

c3101 avatar Oct 09 '24 14:10 c3101

I can't see anything in the log for the listener. Are you sure you did:

    ring_doorbell: debug

and not:

   ring_doorbell.ring: debug

Also could you add this to configuration.yaml and restart and upload a new log?

    firebase_messaging: debug

sdb9696 avatar Oct 09 '24 14:10 sdb9696

I copied and pasted from your comment, this is the current debug config now:

debug_config

and here is the latest log: home-assistant (2).log

c3101 avatar Oct 09 '24 14:10 c3101

Same issue as @c3101

Temporarily working around it by triggering based on the RING device last activity sensor updating.

All motion sensors within Ring devices showing unknown and unable to be used.

Jammyclam avatar Oct 09 '24 14:10 Jammyclam

Are you sure you deleted all the authorised devices from the ring.com control centre Authorised Client Devices? Including the ones named ring-doorbell:android.com.ringapp?

sdb9696 avatar Oct 09 '24 16:10 sdb9696

Confirmed, only my phone, my browser, and the last integration authorisation from Home Assistant is left.

c3101 avatar Oct 09 '24 19:10 c3101

This is strange as I’ve just gone through a full delete and re-add myself and all is ok. Do you get phone alerts in the android/iPhone app?

sdb9696 avatar Oct 09 '24 19:10 sdb9696

Yep, phone alerts work fine. Nothing has changed there. Also, Home Assistant now downloads the video of a motion alerts which it never used to do.

c3101 avatar Oct 09 '24 19:10 c3101

What do you mean by download? When you click on the camera it should show the last recording but it's always done that.

sdb9696 avatar Oct 10 '24 07:10 sdb9696

Perhaps that URL was always required and I didn't know, it's never worked for me before

c3101 avatar Oct 10 '24 07:10 c3101

With regard to fixing, I can see from the log that HA is connected to the ring event service and is receiving heartbeat pings. The only thing I can think off is that there is a residual issue due there having been previously too many authorised client devices. I have two suggestions:

  1. Delete the new authorised device entry for HA in the ring control centre. Wait for a couple of hours and then re-authorise.
  2. ~~This suggestion could make some of your other integrations need to be re-configured, including cloud and homekit - Delete the integration and stop HA. In your config directory there is a file .storage/core.uuid. Edit the uuid in that file slightly (change one of the numbers) and restart. This number is used to uniquely identify HA as device in the ring control centre so it should be seen as a brand new device.~~

If you're not comfortable with doing 2 I am planning to work on a fix to give more control over the device_id to the ring integration. We could connect on discord so I can walk you through how to install the fix to test it out.

EDIT: Actually thinking about this some more don't do 2. I'll pull together a PR that you can test out. My id on discord is sdb9696 but if you prefer we can keep the convo on here.

sdb9696 avatar Oct 10 '24 08:10 sdb9696

What's interesting is; I did another fresh install of it all (HA in its totality) this morning and was met with the same issue, started messing around with the individual device settings on ring.com and toggling motion warning has kicked motion events back into life via HA.

Jammyclam avatar Oct 10 '24 10:10 Jammyclam

What's interesting is; I did another fresh install of it all (HA in its totality) this morning and was met with the same issue, started messing around with the individual device settings on ring.com and toggling motion warning has kicked motion events back into life via HA.

The fresh install might have fixed it all by itself though as it would have created a brand new instance_id. Did you start with a brand new config directory?

sdb9696 avatar Oct 10 '24 10:10 sdb9696

Yeah I formatted the drive and started with a fresh HAOS install.

It was up and running for a good 2 hours before I started toggling options on ring.com, after toggling motion warning I started getting motion alerts being received into HA which have remained after toggling it back off.

Jammyclam avatar Oct 10 '24 11:10 Jammyclam