ring icon indicating copy to clipboard operation
ring copied to clipboard

"this Plugin slows down Homebridge"

Open NickRivait opened this issue 5 months ago • 8 comments

Is there an existing issue for this?

  • [x] I have searched the existing issues

Describe The Bug

Hello, Live view doesn't work and Homebridge says this:

[05/06/2025, 23:51:37] [homebridge-ring] Activating stream for Front Door (5.437s) [05/06/2025, 23:51:46] [homebridge-ring] This plugin slows down Homebridge. The write handler for the characteristic 'Selected RTP Stream Configuration' on the accessory 'Front Door 6C3E' didn't respond at all!. Please check that you properly call the callback! See https://homebridge.io/w/JtMGR for more info.

To Reproduce

attempting live view

Expected behavior

live view should play fine

Relevant log output


Screenshots

No response

Homebridge Ring Config

"hideLightGroups": true,
    "hideDoorbellSwitch": true,
    "hideCameraMotionSensor": false,
    "hideCameraSirenSwitch": true,
    "hideDeviceIds": [
        "0ec53af8-8bcd-4618-85d4-1289ce05364c",
        "ea03feb8-3ed5-468c-845a-46c8d2fa831f",
        "3a5e4647-25bd-4d2d-9daa-fed3f71fa4b2"
    ],
    "_bridge": {
        "username": "0E:C0:6E:C9:8C:53",
        "port": 59287
    },
    "platform": "Ring"

Additional context

No response

OS

Raspberry Pi

Node.js Version

v22.16.0

NPM Version

v4.75.0

Homebridge/HOOBs Version

v4.75.0

Homebridge Ring Plugin Version

v14.0.0

Operating System

Rasperry PI

NickRivait avatar Jun 06 '25 03:06 NickRivait

That message basically just means the camera stream took a long time to start, which, based on the log before, seems to be true since it says it to >5 seconds. This is likely too long for it to have any chance of working. My guess is an old doorbell with relatively weak 2.4Ghz wifi connection. In the end, you'll have to figure out why it's taking so long for the stream to start, it should generally be 2-3 seconds. Anything longer than 5 seconds will likely cause Homekit to timeout. A few more logs might help, but in general, we can't do anything in the code to improve the time and Homekit is more sensitive to stream startup time than, for example, the Ring app, which uses WebRTC.

Alternatively, it could be lack of open ports on the Homebridge host or somewhere else in the chain.

tsightler avatar Jun 06 '25 04:06 tsightler

It's a brand new 2K camera.

It's happening to all the cameras.

Just started within 48 hours.

Not sure what the last portion of your message means haha.

NickRivait avatar Jun 06 '25 08:06 NickRivait

Also getting this, any ideas?

[05/06/2025, 23:46:22] [Homebridge UI] [homebridge-ring] failed to check registry.npmjs.org for updates (see https://homebridge.io/w/JJSz6 for help) as timeout of 10000ms exceeded.

NickRivait avatar Jun 06 '25 08:06 NickRivait

[07/06/2025, 08:02:19] [homebridge-ring] Retry #8 failed to reach Ring server at https://oauth.ring.com/oauth/token. Error: fetch failed, Cause: getaddrinfo ENOTFOUND oauth.ring.com, Code: ENOTFOUND. Trying again in 5 seconds... [07/06/2025, 08:02:

NickRivait avatar Jun 07 '25 12:06 NickRivait

Everything you have posted indicates network issues, cameras take a long time for the stream to start, timeouts reaching update servers, timeouts reaching auth servers. These are all unrelated code except for the fact that it uses the same network. Have you changed anything about your network recently? New firewall, wifi, adblock, VPN, whatever. These are the things you should be looking for as the logs are only showing that the code is attempting to make requests and it can't.

For example, the above error "ENOTFOUND" indicates that the host could not even resolve the IP address of oauth.ring.com. That's not going to be a code problem, those are low-level functions handled by the OS.

tsightler avatar Jun 07 '25 14:06 tsightler

Thanks for responding. Nothing on my end. Eero had an update but not happening at my other home.

I turned off ipv6 for raspberry Pi, worked for a day. Now turned it off for entire network, didn't help. Turned off UPP, now it's working and Homebridge did an update.

Not sure what's going on.

NickRivait avatar Jun 07 '25 14:06 NickRivait

Unfortunately, there's not much we can do with network issues from a plugin/code perspective. The code in ring-client-api isn't doing anything special, it uses native NodeJS functions to make web requests and open websockets, that's about it. Do you have any other plugins installed, especially older ones? Are you running as a child bridge?

The reality is, other than removing support for bridge cameras, the camera streaming code hasn't changed in quite a while, the logic is well known and used across projects that support 10's of thousands of users with very few reported issues. It's unlikely to be a code problem, especially if it was just working fine and now doesn't.

Of course, I can't be 100% of that, but the fact that you are having low level DNS failures, and at least some of the logs you are posting are not even from this plugin, but failures in other functions, I would have to say you need to figure out what is going on with the network.

tsightler avatar Jun 07 '25 15:06 tsightler

Thanks! Any ideas on how I can check the network haha this is above my knowledge

NickRivait avatar Jun 07 '25 15:06 NickRivait