Is it possible to get access to "LiveView" from the API?
Opened this issue · 27 comments
Doubt this is possible but it would be really nice if we can.
I haven't tried, I think you have to start an event and then get the feed from it. Let me snoop around and see how they are handling that.
thanks,
if it helps I found this blog entry http://www.prism19.com/doorbot/ which describes how they "Did" it before. in doorbot.. it indicates that the video stream is SIP initiated..
My usecase is to grab a live image from the ring bell.. I have this crazy idea of running it through facial recognition (openCV) to augment the notification which "who" is at the door :-)
Interesting, looks like you can just get the URL from the ring.ding()
api callback (which will be SIP) and then answer it. I'm not sure how that will work as it may interfere with the actual "ring" the mobile apps get. You may be able to just listen on the "motion" event and then initiate them with SIP to get the images. Then it won't interfere with an actual "ring" and you can still use your doorbell.
On the other hand, you may be able to get the history ID from the ring.ding
callback and then use the ring.recording
to fetch the video file and then process it.
thanks Davglass,
Ive finally got my ring doorbell back up and working so I'll try this out....
Here is another project where the owner has gotten access to stream...
Looks like you and him should compare notes. And he is using a SIP client to do his testing.
Anyone know of any sip client written in node? Everything I've found is websockets/WebRTC.
SIP is the bottleneck here.
Looks like there is a whole slew of node SIP code.
Getting access to the live video would be the killer function for me. I want to do my own video recording, and not rely on rings (paid) recording service. Also I would like to make jpg snapshots, eg on motion.
Any news on how to do this with the api?
jlippold, I think this might help you!
https://github.com/davehorton/drachtio
I sold my ring device, the api is too closed sourced for me
@davglass - i stumbled across this -- https://github.com/jimhigson/ring-api/blob/daca9ce21059c1c4c06ebabec2466057cc7b2de8/api-urls.js#L53 -- i'm not sure if that helps...
That will only return the URL of the SIP stream. You still need to do the SIP song and dance which I haven't bothered to try to do.
understood. i hope to try that this weekend!
i've submitted a PR -- #31 -- what will trigger the next ding poll to get an entry for the liveview. the next step is to construct the SIP dialog to get the parameters. i'm looking at that now...
any luck @mrose17 ?
So, did anyone actually managed to create a SIP session to a ring doorbell outside of the Ring app?
I am trying to write an app that will show a ring, and a BIG button, and a click will get you the video feed.
No real way to do it thus far unfortunately.
the folks at the ring have done a good job of locking down the protocol, so the SIP interaction isn't understood (yet).
@mrave I was able to make several connections to the doorbell when I was experimenting with this a while ago.
The problem is that I could only get about 10-30 seconds of video before it would drop due to not implementing the proprietary SIP extensions that Ring is using. (and it all had to be done over an unencrypted network, and all of the data went through Ring's servers).
Short of MITM-ing the device itself to have another device on your network act as "Ring servers", or Ring opening up the API at some point, I don't think this is going to be possible to pull live video directly from the device.
And to be honest, even if we found a way, the cameras aren't designed to be uploading for long periods of time. They overheat after like 10 minutes in my experience, even when using the official apps and continually starting a live view up.
@Klathmon , can you kindly share the code on how you did that? , as for my application, I only need the live feed for when the bell rings or motion is detected so 30 seconds would be ok
@Klathmon - very interesting! from the homekit perspective, i think there are really two "asks":
first, when a motion event occurs, the home app likes to include a snapshot.
second, the 30sec video capability would be great!
@bluetiger30 It was mostly exploratory research using random tools that got me to that point, but it did show that at least in 2017 it was possible.
See the thread here for the whole saga of research, setbacks, and ultimately me giving up. It's a python library trying to do similar stuff as this one, but the basics are the same.
@mrose17 I think that's already doable with their offical API, but their systems aren't very robust or fast.
When a "ding" happens, you should be able to get an s3 url to the video file that you can use as you want. I don't really have any more specifics (again, see the python-ring-doorbell library, they have that implemented, and looking at this lib again I think this library does too, just access the most recent event and grab the URL from that json I think).
That being said, in my experience that URL is unreliable, slow to load, often choppy, and sometimes doesn't update at all for some motion alerts or dings. I actually gave up on using it as well.
@Klathmon thanks for the response.
I have a very simple problem, unfortunately no easy solution, maybe you guys have a bright idea:
I want to have a tablet at home, so when a ring comes from the gate, the tablet shows/sounds a chime and the user can approach the tablet and press a (big) button to open a video feed.
There is no way to do it, since I can either:
a) have the Ring App always in foreground, and live view splashes on when a ring comes, which is bad since if there's no one home, it just consume the ring battery...
b) don't have the Ring App on, so a Ring notification chines in, but if the user nisses it he has no easy way to get to live view..
So, I thought of writing something myself, based on your wonderful work. But if actual video chat is not possible, that's too bad :(
Still no live video support but I have implemented live snapshot support in another library: python-ring-doorbell/python-ring-doorbell#108
is there still no progress on this? can you forward me to a good article that might help me figure out how to implement the live view using the SIP URLs provided by Ring?