Comments (31)
@OABsoftware that is a really interesting issue! I assumed they were keeping every version up-to-date on firmware since they have so many for sale, but it makes sense that they would let the first gen slide a little. A couple things I need before I can implement a fix:
- Is this snapshot issue documented anywhere? I haven't seen anything about this in the existing ring codebases that I dug through while writing this one.
- I need to know the
kind
value for that older model. You can find this in theModel
field if you open the settings for the camera in theHome
app. - A screenshot of what it looks like when it stops responding, just so I can make sure it's different from the live stream not responding.
- What do you think we should do when it fails to fetch the new snapshot? Keep trying for 10 minutes, or just display the previous snapshot?
from ring.
To answer your questions:
-
I don't know if the max of 1 snapshot per 10 minutes is documented anywhere. What I do know is that I see the same behavior in the Ring app: it won't show a recent snapshot until the previous snapshot is at least 10 minutes old.
-
The
kind
value is "doorbell_v3". -
Hmm, I already made a number of modifications in the code, so taking a screenshot is a bit difficult now. But trust me, I understand the difficulty of converting a SIP stream to an RTSP one :-). We're talking about the snapshot here.
-
I changed the implementation of the
refreshSnapshot()
method to this:
const timeLatest = new Date().getTime() - 10 * 60 * 1000;
var timestamp = yield this.updateTimestamp();
var attempt = 0;
while(timestamp > 0 && timestamp < timeLatest && attempt <= 15)
{
attempt++;
yield util_1.delay(1000);
timestamp = yield this.updateTimestamp();
}
return timestamp;
from ring.
same here
from ring.
@OABsoftware I modified the refreshSnapshot
method to try for 10 minutes for doorbell_v3
devices. I debated for a while about going with the approach you have above and decided against it. My goal is to make sure that the timestamp you see in HomeKit is accurate to when the snapshot was taken so that users can be confident they are seeing an accurate image. If we simply return after 15 attempts without erroring, an outdated snapshot will be downloaded from Ring, but will be displayed as current in Home. With my approach, the snapshot will update when it is able and will always have an accurate time marker in HomeKit. I'm happy to discuss further if you think my approach is incorrect. Otherwise, please give v3.2.2
a try and see how it works for your device. Thanks for letting me know about this issue, and for the detail on what's causing it!
from ring.
@dgreif I agree it's better that the user sees a valid age of the snapshot in the Home app.
But in the current implementation (version 3.7.0) I only get a fresh snapshot in the Home app once every 30 minutes...
from ring.
from ring.
@OABsoftware @divemasterjm I really want to get you guys the best fix for this that I can. The camera itself is limiting how frequently new snapshots can be taken. Would you prefer I always hand you the latest snapshot, even though the timestamp in Home won't match when it was actually taken? I'm open to any other suggestions...
from ring.
from ring.
from ring.
@OABsoftware @divemasterjm give v3.7.1
a try. I have it set to try for 5 seconds to get a new snapshot, falling back on the stale snapshot if that times out. Sorry I don't have a better solution, but this is definitely a drawback of that particular camera model.
from ring.
It works!!!, now the user experience is much better, thanks for your help. I didn’t try rich notifications yet.
from ring.
@dgreif Yes, this works. But 5 seconds is a bit short, e.g. if you have a low bandwidth internet connection (like I do).
from ring.
from ring.
@OABsoftware I was fairly intentional about use 5 seconds because I wanted it to fail fast if there is no new snapshot. Every second that it waits for a new snapshot is another second that HomeKit waits to send out the notification for motion/doorbell press because it is waiting for the snapshot. I could have it wait 15 or 20 seconds, but that means your notifications will be delayed that long if there is no new snapshot available. Does that make sense, or do you think it would be worth it to wait a little longer in case it is in the process of uploading the snapshot? If we wait, how long is reasonable?
from ring.
@dgreif Well, as I wrote earlier, I'm on a rather low-bandwidth internet connection (8 mbps down, 800 kbps up).
Your (great) plugin hammers the Ring dings/active
service every 5 seconds to check if the doorbell was pressed (and indeed, that is the only way to find out).
If it was pressed, the plugin sends a request to the Ring servers to tell my doorbell to upload a snapshot.
In my situation the snapshots/timestamps
service gets called at least 5 times before a new snapshot is available (I modified your code so that the service is called once per 1000 milliseconds instead of 2000).
And than that snapshot is downloaded by the plugin and uploaded again to APNS.
So, before I see the snapshot in a notification on my phone, it is at least 10 seconds old.
In my opinion adding a few seconds more is not too much of a problem, because the snapshot is (too) old anyway.
I also see something else happen.
When the doorbell is pressed, I first receive a text-only notification from my Home app, and a couple of seconds later that notification is replaced by one that includes the snapshot.
You could add a optional configuration item in which the user can specify how long the plugin should try to get the snapshot.
from ring.
To be clear, this ‘10 minute snapshot’ issue, is only on the first generation Ring doorbell? I currently have the first generation, but want to receive snapshots on my iPhone when the actual Ring button is pushed.
from ring.
It’s an issue on all battery powered cameras (see #64 for more detail on that). I released an update last night that should cover all of them. It’s possible you are on one that wasn’t assuming slow snapshots for your model
from ring.
@OABsoftware I rewrote the logic around snapshot timing and it should work much better for your situation now. If the current snapshot is < 10 minutes old, it will be used immediately without waiting for a new one at all. If the current snapshot is > 10 minutes old it will wait ~30 seconds for the snapshot to update, falling back to the stale snapshot after that. Give it a try with v4.0.7
from ring.
Is this also the issue with newer Rings?
from ring.
@rgerr can you be more specific? The new Ring Door View Cam is battery powered, so it has 10 minute snapshot refreshes.
from ring.
I have the Ring doorbell, first Version (doorbell_v3) hardwired. So it is not on battery. How does the snapshot interval work in that case?
from ring.
@rgerr that is a great question! All of my cameras as wired only so I haven't been able to test it out. Could you try opening your Ring app periodically and seeing how frequently you can get snapshots from that camera? Just open the app and look at the camera photo, without going into live view. It will either be every 30 seconds that it refreshes or 10 minutes, so it should be pretty obvious.
from ring.
I will try this out later today, thanks for the tip. Another question, will the experience be better with a Ring 2 doorbell? Faster snapshots e.g.?
from ring.
The Ring Doorbell 2 has a battery as well, but can be hardwired. I'm guessing it will function the same as the regular Doorbell. I have a Doorbell Pro, which can only be hardwired, and it has 30 second snapshots. I am really interested to see what you find with the hardwired Doorbell, thanks for looking into it!
from ring.
Definitly not a 30 sec interval on the original Ring with snapshots. Checked it for over 15 minutes and it updates only once, after the suspected 10 minutes, unfortunatly.
from ring.
@OABsoftware @rgerr how have snapshots been on your battery cameras? If everything seems good we can get this issue closed
from ring.
As mentioned above, once every 10 minutes. Too bad. :(
from ring.
@rgerr unfortunately I can't make them refresh more frequently. My main question is whether or not the are showing up reliably (even if they are stale by a few minutes)
from ring.
No, not so much. Probaly 50% of the time I get a snapshot, and half of the time it is a old snapshot. The connection should not be a problem, i have 100/100 down/up and the Ring doorbell is 2m from the nearest access point. Also, I completely turned of the motion detection so that Ring will not update the snapshot when motion is detected. Therefor it should only update when the doorbell is pressed. But as I mentioned, snapshots hardly come through. And when they do, they’re not from when the actual doorbell was pressed.
from ring.
@rgerr give snapshots a try in v4.3.2
. They now return immediately for battery cameras so they will most likely always be stale, but they should show up 100% of the time. Let me know how it works for you.
from ring.
I think I have the snapshot logic as good as it can get for now. If anyone has spefic feedback, feel free to open a new GitHub issue. Thanks everyone who tested out my updates along the way!
from ring.
Related Issues (20)
- no detection events ring app stays in live view perpetually HOT 1
- "Video Doorbell 4" and "Spotlight Cam Plus" cameras showing "Unknown Model" HOT 1
- Ring Homebridge not working, getting 406 error HOT 3
- MyQ support? HOT 1
- Failed to reach Ring Server…timeout HOT 3
- API Issue HOT 1
- Snapshots in Home app not updating HOT 4
- Home Assistant HOT 1
- MyQ HOT 1
- Ring cameras not working with ExpressVPN (and other VPNs?) HOT 2
- Ring doorbell is being kept active, draining battery overnight HOT 2
- Ring Camera notifications HOT 24
- Ring plugin does not appear to install correctly HOT 4
- failed to reach ring server HOT 1
- Ring allows MyQ Garage Openers to be added on their Platform- Could We Control It From there? HOT 1
- Notifications issue HOT 5
- Can't get camera's to show up in home app HOT 3
- mp4 on Windows but not on Linux HOT 4
- When debug=true, show more details about refresh token failures HOT 2
- Toggle to always allow the bypass of sensors? HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ring.