Giter Club home page Giter Club logo

Comments (13)

Morac2 avatar Morac2 commented on June 20, 2024

I found an easier work around. I delete the cameras from the cache in the HomeBridge settings. Once I do that, the camera updates. I did that this morning when the cameras were 16 hours out of date and weren’t updating.

from ring.

Morac2 avatar Morac2 commented on June 20, 2024

I want to also mention that when the snapshots stop updating, live camera also stops working. It just spins forever. The fact that clearing the cache fixes this seems to indicate a problem on the HomeBridge/plugin side rather than the HomeKit side.

I also have Blink cameras and while they don’t support live view in HomeBridge, they do support snapshots which work flawlessly. As such that would appear to eliminate HomeBridge as a problem which leaves the Ring plugin.

Another thing I’ve noticed is that the last snapshot time differs on different devices. As such it doesn’t seem like the cache is providing images.

from ring.

dgreif avatar dgreif commented on June 20, 2024

@Morac2 thanks for the updated info! This definitely sounds like a HomeKit issue, and not something we can fix at the homebridge/plugin level. Glad you got it working! I don't think there is anything else for us to look into at the point.

from ring.

Morac2 avatar Morac2 commented on June 20, 2024

@dgreif I’m not sure how this is a HomeKit issue when clearing the cache fixes it temporarily and it only affects Ring cameras and not Blink cameras (different plugin).

from ring.

tsightler avatar tsightler commented on June 20, 2024

@Morac2 You didn't provide any logs, do they happen to show anything interesting, for example, when it's working vs not and when you delete the cache? There's not much to go on with just an open issue.

I took a quick look at the Blink plugin vs this one and there's not much difference here. It appears that there's a call to handleSnapshotRequest() in both cases, and they simply return a snapshot via the appropriate API.

I wonder if perhaps the cameras are going offline or maybe a request is getting stuck since you say that streaming is also not working, and maybe removing them from the cache somehow refreshes them. But logs might tell something. If not, it's really very difficult to know what to do here.

from ring.

Morac2 avatar Morac2 commented on June 20, 2024

There are no logs at all when it stops working. If I reboot homebridge there’s logs saying the camera was read from the cache but that’s it. When it works I see a lot of stuff in the logs. Next time it happens I’ll grab them.

One other thing to mention is that the mDNS for HomeBridge changes periodically from http://homebridge.local to http://homebridge-2.local/ until I restart the Avahi service. I don’t know if the plug-in uses that or not, but that’s usually when I also notice the Ring cameras stop updating.

from ring.

Morac2 avatar Morac2 commented on June 20, 2024

Correction. There’s only log data when viewing a ring camera live. There’s no log data when the snapshot updates.

from ring.

Morac2 avatar Morac2 commented on June 20, 2024

@tsightler so I checked and the Ring plug-in never logs anything whether or not the snapshots update. When I open a view with a Ring camera the last update time displays until the time when the snapshot updates and then it changes to 0 seconds.

In comparison, the Blink plug-in immediately updates the “update time” in Home (goes back to 0 seconds) when I go to a view with a Blink camera and then the log shows “refreshing snapshot”.

As such the reason I didn’t include any logs is that the Ring plugin doesn’t log anything for refreshing snapshots. The only time the plug-in logs anything is on HomeBridge boot up and if I open a live view of a Ring camera.

from ring.

Morac2 avatar Morac2 commented on June 20, 2024

So I noticed in the code that logging is only done in debug mode so I enabled that. And this is what shows up when it works. I’ll need to wait for it to break again.

It does seem to load the snapshot a lot. This was just one time opening the Home app.

[02/08/2023, 20:06:50] [homebridge-ring] No snapshot cached for Garage
[02/08/2023, 20:06:50] [homebridge-ring] Loading new snapshot into cache for Garage
[02/08/2023, 20:06:50] [homebridge-ring] No snapshot cached for Front Door
[02/08/2023, 20:06:50] [homebridge-ring] Loading new snapshot into cache for Front Door
[02/08/2023, 20:06:51] [homebridge-ring] Snapshot cached for Front Door (0.49s)
[02/08/2023, 20:06:51] [homebridge-ring] Snapshot cached for Garage (0.64s)
[02/08/2023, 20:06:55] [homebridge-ring] Used cached snapshot for Garage
[02/08/2023, 20:06:55] [homebridge-ring] Loading new snapshot into cache for Garage
[02/08/2023, 20:06:55] [homebridge-ring] Used cached snapshot for Front Door
[02/08/2023, 20:06:55] [homebridge-ring] Loading new snapshot into cache for Front Door
[02/08/2023, 20:06:56] [homebridge-ring] Snapshot cached for Garage (0.404s)
[02/08/2023, 20:06:56] [homebridge-ring] Snapshot cached for Front Door (0.466s)
[02/08/2023, 20:07:07] [homebridge-ring] Used cached snapshot for Garage
[02/08/2023, 20:07:07] [homebridge-ring] Loading new snapshot into cache for Garage
[02/08/2023, 20:07:07] [homebridge-ring] Used cached snapshot for Front Door
[02/08/2023, 20:07:07] [homebridge-ring] Loading new snapshot into cache for Front Door
[02/08/2023, 20:07:10] [homebridge-ring] Snapshot cached for Garage (3.272s)
[02/08/2023, 20:07:12] [homebridge-ring] Snapshot cached for Front Door (5.138s)

from ring.

tsightler avatar tsightler commented on June 20, 2024

That seems about right, it should settle in to about once every 10s or so for each camera, which it seemed to do.

from ring.

Morac2 avatar Morac2 commented on June 20, 2024

I think this is a combination HomeKit, HomeBridge problem. Today I noticed the Ring cameras weren't updating, but only on my iPad and iPhone. The cameras worked on my Apple TV and Mac, which I hadn't used to access them previously. I noticed this when someone Rang my doorbell.

I checked HomeBridge and the mDNS name had changed again from homebridge.local to homebridge-2.local. Restarting the avahi-daemon server fixed that, but when that happens my iPhone and iPad no longer trigger requests to the Ring cameras. I tried turning Wifi off and on, but that didn't fix it. I had to restart the iOS devices to get them to work with the Ring cameras (Blink still works fine), so something must be caching on the Apple side.

I have a feeling if I could solve the problem with the homebridge switching mDNS names that would solve the Ring plugin problem. I tried setting a CRON job to restart the avahi-daemon nightly, but that didn't help.

from ring.

tsightler avatar tsightler commented on June 20, 2024

I think I might have seen this in my environment as well. My wife's iPad would stop refreshing snapshots unless I performed some manual action to get it going again (usually I could just swipe down from the top to force a refresh and it would come back, but sometimes not even that). It seems like switching from Bonjour-HAP to Ciao for the mDNS Advertiser may have resolved it for me, at least, it hasn't reproduced since then.

It still sometimes takes 15-20 seconds for that first snapshot to refresh when I open the Home app, but it eventually picks up on its own, whereas before it wouldn't refresh no matter how long it was left there. I saw some other reports for other camera platforms and similar recommendations, so maybe worth a shot if you are still seeing this.

from ring.

dgreif avatar dgreif commented on June 20, 2024

It's also worth reading through https://github.com/dgreif/ring/wiki/Snapshot-Limitations if you haven't already. TL;DR - there are a lot of compromises and caching that we do for snapshot due to limitations both by Ring and homebridge/HomeKit. It's entirely possible there is a bug in there somewhere, but in general it's never going to perform perfectly.

from ring.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.