ring icon indicating copy to clipboard operation
ring copied to clipboard

New issue with Ring homebridge plugin -- HomeKit control does not work for 30 mins

Open dbonyad opened this issue 7 months ago • 16 comments

Is there an existing issue for this?

  • [x] I have searched the existing issues

Describe The Bug

Hi. I'm having a weird bug with the Ring plugin.

It's been working great for about a year and I can control/view all my Ring devices in HomeKit. However, over the last couple of days I've had this persistent issue. Every time my Homebridge re-starts, my Ring plugin doesn't work for about 30 mins, then it starts working fine until the next restart. This never used to happen.

Due to other plugins I've got, I need to restart my Homebridge once a day, so it leaves me with 30 mins of downtime every day without Ring connection. It can lead to false alarms if I try to disarm the Ring alarm from within HomeKit as the disarm will not work.

I've checked the logs and I'm getting this error: [08/05/2025, 09:02:05] [homebridge-ring] Creating location socket.io connection - Warwick Register request has failed with Error=PHONE_REGISTRATION_ERROR Retry... 1

Weirdly it does start working after about 30 mins and then it seems to work consistently until the next restart.

Any help would be really appreciated!

To Reproduce

Re-start homebridge

Expected behavior

Ring works fine following a restart (after around 30 seconds initialisation)

Relevant log output

[08/05/2025, 09:02:05] [homebridge-ring] Creating location socket.io connection - Warwick
Register request has failed with Error=PHONE_REGISTRATION_ERROR
Retry... 1

Screenshots

No response

Homebridge Ring Config

{
    "refreshToken": "hidden",
    "showPanicButtons": true,
    "nightModeBypassFor": "some",
    "hideDeviceIds": [
        "31909"
    ],
    "_bridge": {
        "username": "hidden",
        "port": hidden
    },
    "platform": "Ring"
}

Additional context

No response

OS

Homebridge

Node.js Version

v20.11.0

NPM Version

v

Homebridge/HOOBs Version

v1.9.0

Homebridge Ring Plugin Version

v13.2.1

Operating System

Rasbperry Pi

dbonyad avatar May 08 '25 08:05 dbonyad

Please find below the full logs since restart

So in this case it took about an hour for the Ring connection to come back online

[08/05/2025, 08:51:04] [homebridge-ring] Found the following locations: [08/05/2025, 08:51:04] [homebridge-ring] locationId: 7d0a4581-36ca-4753-bb7a-b9748075c460 - Warwick [08/05/2025, 08:51:04] [homebridge-ring] Creating location socket.io connection - Warwick Register request has failed with Error=PHONE_REGISTRATION_ERROR Retry... 1 [08/05/2025, 08:54:10] [homebridge-ring] Ring connected to socket.io server [08/05/2025, 08:54:10] [homebridge-ring] Reconnecting location socket.io connection [08/05/2025, 08:54:11] [homebridge-ring] Creating location socket.io connection - Warwick [08/05/2025, 08:59:30] [homebridge-ring] Ring connected to socket.io server [08/05/2025, 08:59:30] [homebridge-ring] Reconnecting location socket.io connection [08/05/2025, 08:59:31] [homebridge-ring] Creating location socket.io connection - Warwick [08/05/2025, 09:01:59] [homebridge-ring] Launched child bridge with PID 10451 [08/05/2025, 09:02:04] [homebridge-ring] Loaded homebridge-ring v13.2.1 child bridge successfully [08/05/2025, 09:02:04] Loaded 13 cached accessories from cachedAccessories.0E903C69BC15. [08/05/2025, 09:02:04] [homebridge-ring] Configuring cached accessory 2bb815c0-8789-4824-9494-0ba35a985ff4 Alarm [08/05/2025, 09:02:04] [homebridge-ring] Configuring cached accessory a44160ae-1b54-4f71-ae6c-d08058af4f54 Base Station [08/05/2025, 09:02:04] [homebridge-ring] Configuring cached accessory ef3c7d17-f9c2-4a63-8d84-e798a37b8824 Front Door [08/05/2025, 09:02:04] [homebridge-ring] Configuring cached accessory 6416bcaa-2c52-432d-89ca-5bb38de86b38 Hallway [08/05/2025, 09:02:04] [homebridge-ring] Configuring cached accessory 8c73eae0-54de-4d2c-8eb9-f667f413080e French doors [08/05/2025, 09:02:04] [homebridge-ring] Configuring cached accessory 9f19a52a-804c-4f51-bfe5-95b7bf3c8740 Panic Buttons [08/05/2025, 09:02:04] [homebridge-ring] Configuring cached accessory 102e7568-57f6-42cd-a72e-e7e4e8d9def7 Utility door [08/05/2025, 09:02:04] [homebridge-ring] Configuring cached accessory d4c6c013-1873-4d0b-8107-e1b21ba905c3 Electricity meter door [08/05/2025, 09:02:04] [homebridge-ring] Configuring cached accessory 9be9228b-7e4a-48bb-a102-31e3f85238f1 Garage Door [08/05/2025, 09:02:04] [homebridge-ring] Configuring cached accessory 1caa41c7-e409-485a-9cf8-f0852de63746 Back door outside motion [08/05/2025, 09:02:04] [homebridge-ring] Configuring cached accessory d87a370a-4484-4ac6-8538-ca395bcbb5c4 Garden motion [08/05/2025, 09:02:04] [homebridge-ring] Configuring cached accessory 71955231-b09c-44b9-a2fb-759c00aa2a1e Garden driveway area [08/05/2025, 09:02:04] [homebridge-ring] Configuring cached accessory 79681acb-daf9-4947-8dcb-e5ac6f18c251 Front door area [08/05/2025, 09:02:04] Homebridge v1.9.0 (HAP v0.12.3) (homebridge-ring) is running on port 45709. [08/05/2025, 09:02:04]

NOTICE TO USERS AND PLUGIN DEVELOPERS

Homebridge 2.0 is on the way and brings some breaking changes to existing plugins. Please visit the following link to learn more about the changes and how to prepare: https://github.com/homebridge/homebridge/wiki/Updating-To-Homebridge-v2.0

[08/05/2025, 09:02:05] [homebridge-ring] Found the following locations: [08/05/2025, 09:02:05] [homebridge-ring] locationId: 7d0a4581-36ca-4753-bb7a-b9748075c460 - Warwick [08/05/2025, 09:02:05] [homebridge-ring] Creating location socket.io connection - Warwick Register request has failed with Error=PHONE_REGISTRATION_ERROR Retry... 1 [08/05/2025, 09:09:03] [homebridge-ring] Ring connected to socket.io server [08/05/2025, 09:09:03] [homebridge-ring] Reconnecting location socket.io connection [08/05/2025, 09:09:04] [homebridge-ring] Creating location socket.io connection - Warwick [08/05/2025, 09:14:05] [homebridge-ring] Ring connected to socket.io server [08/05/2025, 09:14:05] [homebridge-ring] Reconnecting location socket.io connection [08/05/2025, 09:14:06] [homebridge-ring] Creating location socket.io connection - Warwick [08/05/2025, 09:14:58] [homebridge-ring] Ring connected to socket.io server [08/05/2025, 09:14:58] [homebridge-ring] Reconnecting location socket.io connection [08/05/2025, 09:14:59] [homebridge-ring] Creating location socket.io connection - Warwick [08/05/2025, 09:17:06] [homebridge-ring] Ring connected to socket.io server [08/05/2025, 09:17:06] [homebridge-ring] Reconnecting location socket.io connection [08/05/2025, 09:17:07] [homebridge-ring] Creating location socket.io connection - Warwick [08/05/2025, 09:17:23] [homebridge-ring] Ring connected to socket.io server [08/05/2025, 09:17:23] [homebridge-ring] Reconnecting location socket.io connection [08/05/2025, 09:17:24] [homebridge-ring] Creating location socket.io connection - Warwick [08/05/2025, 09:20:48] [homebridge-ring] Ring connected to socket.io server [08/05/2025, 09:20:48] [homebridge-ring] Reconnecting location socket.io connection [08/05/2025, 09:20:49] [homebridge-ring] Creating location socket.io connection - Warwick [08/05/2025, 09:21:21] [homebridge-ring] Ring connected to socket.io server [08/05/2025, 09:21:21] [homebridge-ring] Reconnecting location socket.io connection [08/05/2025, 09:21:22] [homebridge-ring] Creating location socket.io connection - Warwick [08/05/2025, 09:21:53] [homebridge-ring] Ring connected to socket.io server [08/05/2025, 09:21:53] [homebridge-ring] Reconnecting location socket.io connection [08/05/2025, 09:21:54] [homebridge-ring] Creating location socket.io connection - Warwick [08/05/2025, 09:29:48] [homebridge-ring] Ring connected to socket.io server [08/05/2025, 09:29:48] [homebridge-ring] Reconnecting location socket.io connection [08/05/2025, 09:29:49] [homebridge-ring] Creating location socket.io connection - Warwick [08/05/2025, 09:30:40] [homebridge-ring] Ring connected to socket.io server [08/05/2025, 09:30:41] [homebridge-ring] Reconnecting location socket.io connection [08/05/2025, 09:30:42] [homebridge-ring] Creating location socket.io connection - Warwick [08/05/2025, 09:41:12] [homebridge-ring] Ring connected to socket.io server [08/05/2025, 09:41:12] [homebridge-ring] Reconnecting location socket.io connection [08/05/2025, 09:41:13] [homebridge-ring] Creating location socket.io connection - Warwick [08/05/2025, 09:45:54] [homebridge-ring] Ring connected to socket.io server [08/05/2025, 09:45:54] [homebridge-ring] Reconnecting location socket.io connection [08/05/2025, 09:45:55] [homebridge-ring] Creating location socket.io connection - Warwick [08/05/2025, 09:46:45] [homebridge-ring] Ring connected to socket.io server [08/05/2025, 09:46:45] [homebridge-ring] Reconnecting location socket.io connection [08/05/2025, 09:46:46] [homebridge-ring] Creating location socket.io connection - Warwick [08/05/2025, 09:47:56] [homebridge-ring] Ring connected to socket.io server [08/05/2025, 09:47:56] [homebridge-ring] Reconnecting location socket.io connection [08/05/2025, 09:47:57] [homebridge-ring] Creating location socket.io connection - Warwick [08/05/2025, 09:53:39] [homebridge-ring] Ring connected to socket.io server [08/05/2025, 09:53:39] [homebridge-ring] Reconnecting location socket.io connection [08/05/2025, 09:53:40] [homebridge-ring] Creating location socket.io connection - Warwick [08/05/2025, 09:56:27] [homebridge-ring] Ring connected to socket.io server [08/05/2025, 09:56:27] [homebridge-ring] Reconnecting location socket.io connection [08/05/2025, 09:56:28] [homebridge-ring] Creating location socket.io connection - Warwick [08/05/2025, 09:56:29] [homebridge-ring] Ring connected to socket.io server [08/05/2025, 09:56:30] [homebridge-ring] Configuring 0 cameras and 18 devices for location "Warwick" - locationId: 7d0a4581-36ca-4753-bb7a-b9748075c460 [08/05/2025, 09:56:30] [homebridge-ring] Hidden accessory 3a269a2c-4811-4d96-94da-c3915fd032c6 adapter.shadow Shadow Adapter [08/05/2025, 09:58:47] [homebridge-ring] Arming (Home) Alarm [08/05/2025, 09:58:50] [homebridge-ring] Disarming Alarm

dbonyad avatar May 08 '25 08:05 dbonyad

I just wanted to add that I'm experiencing a similar thing. I restarted on Sunday and there was no issue and then this morning restarted and Ring was not responding. After restating a couple of more times I came here and saw your post. I have the same series of log entries for Ring connecting to socket.io.server, reconnection and creating location, except after almost 2 hours my camera and devices are still not configured or working (i.e., I don't have the final log entry like you do).

millhoo avatar May 08 '25 14:05 millhoo

This is almost certainly just a duplicate of https://github.com/dgreif/ring/issues/1605, my guess is that maybe there is no stack trace because you are on a slightly older version of NodeJS that doesn't use undici for websocket connections.

tsightler avatar May 08 '25 14:05 tsightler

This is almost certainly just a duplicate of #1605, my guess is that maybe there is no stack trace because you are on a slightly older version of NodeJS that doesn't use undici for websocket connections.

Thank you for the info! It looks like you are working on a patch? Shall we wait for that or is there something else to do?

dbonyad avatar May 08 '25 14:05 dbonyad

I've updated to NodeJS v22.15.0, the latest, but still the issue is present.

Ring goes fully offline for a long time whenever I re-start Homebridge

dbonyad avatar May 08 '25 14:05 dbonyad

There's nothing else to do until the patch is created, currently no ETA as, unfortunately, I'm travelling this week and won't have any time to look at it until this weekend, but @dgreif seems to have nailed down the root cause, so hopefully soon.

tsightler avatar May 08 '25 14:05 tsightler

I've updated to NodeJS v22.15.0, the latest, but still the issue is present.

Ring goes fully offline for a long time whenever I re-start Homebridge

I'm not sure what you read, I never said updating to NodeJS would fix the issue, only that this is my guess as to why your logs didn't contain the same stack trace as the other bug. It's almost certainly the same issue overall. There's not fix except to wait for the library to be updated.

tsightler avatar May 08 '25 14:05 tsightler

OK thanks a lot for the information, I understand.

dbonyad avatar May 08 '25 14:05 dbonyad

I've released 14.0.0-beta.2 which has a fix for this issue. See the changelog for a full understanding of the breaking changes in this major release. It's still in beta, but I plan to cut a full release soon.

dgreif avatar May 08 '25 20:05 dgreif

Just installed the 14.0.0-beta.2 and it's working great, the issue is solved. Thanks so much.

dbonyad avatar May 08 '25 20:05 dbonyad

Hi @dgreif @tsightler Thanks a lot for releasing v14. Unfortunately the issue has come back today, even with v14.

I'm getting these errors and I can't change Ring alarm state from Homekit. Is this the same or something different?

[12/05/2025, 18:44:40] [homebridge-ring] Creating location socket.io connection - Warwick [12/05/2025, 18:44:43] [homebridge-ring] Ring connected to socket.io server [12/05/2025, 18:45:03] [homebridge-ring] Ring base_station_v1 81c7bd6d-2c95-4377-4297-9a32d61fa32b is offline or on cellular backup. Waiting for status to change

dbonyad avatar May 12 '25 17:05 dbonyad

@dbonyad As it is clear from the logs you posted that the websocket itself is working, then this is almost certainly an entirely different issue and you should verify that your Ring base station is fully online, just as the message says.

tsightler avatar May 12 '25 18:05 tsightler

OK thanks for confirming. It’s working again now and I didn’t do anything so i’ll just monitor it, thanks.

dbonyad avatar May 12 '25 18:05 dbonyad

Actually, looking at the original logs a bit more, and at the second behavior, I think it is clear that you are having some issues with your network connection, either firewall or something else. Both ring-client-api and the Ring alarm/smart lighting hubs require a persistent websocket connection, your original post shows a websocket that is constantly failing and reconnecting, however, your second post shows that the Ring hub was offline, which means it's websocket failed. This is more indicative of a networking issue, that the websocket crash address in 14.0.0 release since, whatever is happening, is also impacting your hub.

tsightler avatar May 13 '25 20:05 tsightler

OK. Would you be able to give some advice on how to fix this issue?

dbonyad avatar May 13 '25 20:05 dbonyad

Unfortunately not, network troubleshooting is certainly outside of the domain of this plugin, I can only tell you what the logs show and draw some conclusions based on that, adding in the experience of what I've seen over the years from 10's of thousands of users that leverage ring-client-api in various projects.

tsightler avatar May 13 '25 20:05 tsightler