dgreif / ring

Unofficial packages for Ring Doorbells, Cameras, Alarm System, and Smart Lighting
MIT License
1.23k stars 162 forks source link

Camera Live Feed #35

Closed dgreif closed 5 years ago

dgreif commented 5 years ago

The cameras provided by the homebridge plugin currently support snapshots, but not a live feed. This is because the protocol for starting the live feed is complicated, and there are not any great npm packages for sip/rtp (that I can find) which make this easy to do. I am happy to work with anyone experienced in sip/rtp to make live streams happen, but I don't have more time to personally work on it at this point.

For anyone looking to mess around with live streams, each camera has a getSipConnectionDetails method which returns an on-demand ding with sip details. The sip_to property in the response should be all that you need to get connected with a good sip client. More details can be found in the following links:

ifeign commented 5 years ago

It seems that every time a new preview is loaded, homebridge crashes then immediately reboots. This happens as soon as I click on the thumbnail.

[6/22/2019, 12:21:01 AM] TypeError: Cannot read property 'type' of undefined
    at StreamController._generateSetupResponse (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/StreamController.js:658:20)
    at /usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/StreamController.js:541:12
    at CameraSource.prepareStream (/homebridge/node_modules/homebridge-ring-alarm/homebridge/camera-source.js:71:9)
    at StreamController._handleSetupWrite (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/StreamController.js:540:23)
    at Characteristic.SetupEndpoints.<anonymous> (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/StreamController.js:271:12)
    at Characteristic.SetupEndpoints.emit (events.js:189:13)
    at Characteristic.SetupEndpoints.Characteristic.setValue (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Characteristic.js:321:10)
    at Accessory.<anonymous> (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Accessory.js:882:22)
    at Array.forEach (<anonymous>)
    at Accessory._handleSetCharacteristics (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Accessory.js:822:8)
[6/22/2019, 12:21:01 AM] Got SIGTERM, shutting down Homebridge...
[6/22/2019, 12:21:11 AM] Loaded config.json with 0 accessories and 6 platforms.
[6/22/2019, 12:21:11 AM] ---
ifeign commented 5 years ago

I also noticed that the camera needs to be added manually from the code shown in the Homebridge log. You should probably update the readme to include this. If I have time later today I can create a pull request.

dgreif commented 5 years ago

I already wrote about the setup in the readme: https://github.com/dgreif/ring-alarm/tree/master/homebridge#camera-setup. Let me know if you think it needs more detail.

As for the error, you are correct that it's bombing out. @smockle has already tracked it down, see #37 for further discussion.

ifeign commented 5 years ago

You're right, I missed that part, sorry about that!

On Fri, Jun 21, 2019 at 6:53 PM Dusty Greif notifications@github.com wrote:

I already wrote about the setup in the readme: https://github.com/dgreif/ring-alarm/tree/master/homebridge#camera-setup. Let me know if you think it needs more detail.

As for the error, you are correct that it's bombing out. @smockle https://github.com/smockle has already tracked it down, see #37 https://github.com/dgreif/ring-alarm/pull/37 for further discussion.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/dgreif/ring-alarm/issues/35?email_source=notifications&email_token=AHWLHYF7U7L5F6QRLFH4MVLP3WAXXA5CNFSM4H2VOWM2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODYJ5R7Y#issuecomment-504617215, or mute the thread https://github.com/notifications/unsubscribe-auth/AHWLHYCODONH3EK6KVBLK73P3WAXXANCNFSM4H2VOWMQ .

donavanbecker commented 5 years ago

@dgreif So when using the snapshot feature, I am able to see the small snapshot on the notification but when force touching it, it says camera is not responding. Is that because live feed isn't implemented yet or is that an error I'm experience? if it is because live feed isn't implemented, is there anyway to use that snapshot to show as the camera until live feed is implemented so that you can see notifications at a larger view when force touching?

dgreif commented 5 years ago

@d0n4v4nb3ck3r that message is definitely from the lack of live feed. On my iPhone, force touching into the notification only shows the snapshot without trying to show the live feed. Not sure when it decides one way or another. One thing I did to minimize that "no response" notification is to not return a live feed, which usually gives you ~20 seconds while it waits for the feed before it shows that message. The best solution would be to get live feed, but I'm not sure when that will happen. I could look into using the image as a live feed, but I probably won't focus on it any time soon as the snapshots seem to fulfill a huge part of the functionality for the plugin. Happy to take PRs if someone else has time to look into either approach

wondergit113 commented 5 years ago

I’m having some issues getting the snapshot to appear in the motion detection notification. I have other cameras in HomeKit that may be causing a problem. Thoughts on troubleshooting? I can start by removing/adding them back.

On Jun 25, 2019, at 10:46 AM, Dusty Greif notifications@github.com wrote:

@d0n4v4nb3ck3r that message is definitely from the lack of live feed. On my iPhone, force touching into the notification only shows the snapshot without trying to show the live feed. Not sure when it decides one way or another. One thing I did to minimize that "no response" notification is to not return a live feed, which usually gives you ~20 seconds while it waits for the feed before it shows that message. The best solution would be to get live feed, but I'm not sure when that will happen. I could look into using the image as a live feed, but I probably won't focus on it any time soon as the snapshots seem to fulfill a huge part of the functionality for the plugin. Happy to take PRs if someone else has time to look into either approach

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

dgreif commented 5 years ago

@jamesg311 make sure that the camera and motion detector are in the same "room" in the Home app. I don't think it's possible to separate them since they are a single homebridge device, but that would be one possible cause. What value do you see in the Model section for the camera in homebridge?

malmentm commented 5 years ago

I have noticed that camera snapshot does not show on the Apple Watch

ifeign commented 5 years ago

It works on my Apple watch. Just press the camera tile and let it refresh.

On Thu, Jul 4, 2019 at 11:47 AM malmentm notifications@github.com wrote:

I have noticed that camera snapshot does not show on the Apple Watch

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/dgreif/ring-alarm/issues/35?email_source=notifications&email_token=AHWLHYCN4SAKQLSGJGHI7S3P5ZATNA5CNFSM4H2VOWM2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZH7HJY#issuecomment-508556199, or mute the thread https://github.com/notifications/unsubscribe-auth/AHWLHYGN3WOIBRWAZMYYYJDP5ZATNANCNFSM4H2VOWMQ .

malmentm commented 5 years ago

That worked :)

malmentm commented 5 years ago

Would be nice if it’s possible to use the snapshot as a stream or something to avoid the error messages

ZoneMR commented 5 years ago

Ideally we could have a low-FPS steam be generated by polling for snapshots...

dgreif commented 5 years ago

See #63 for discussion on snapshot stream

omerdn1 commented 5 years ago

@dgreif I'd like to join in on this endeavour. can you share your Ring app SSL interception set up? a while back I tried to intercept the SSL traffic using Charles proxy with their SSL certificate but after a short while Ring seemed to have blocked any custom certificate, not letting me perform any request to the API.

anyways, getting into what has to be done - when I was investigating the possibility of getting access to the live view I came to realize that the Ring uses SIP video initiated from the doorbell itself, so I would imagine that in order to intercept it you'd have to host your own DNS server that redirects the domain name to a server that you control, that answers the SIP call and answers correctly with their own proprietary SIP extensions to keep the call running. you said you were able to pick up some of the audio using an SIP client, which is interesting so maybe there's a way around this.

I'd like to jump back into this as this is a very important feature for my use-case. we'll have more relevant insights once we start tackling it. let's combine our efforts, this is a tough one..

it's sad that Ring's business model is all about locking in the user to their limited and closed system.. up until now they've been seeing projects like yours as a threat instead of seeing them as a proof that many of their customers are interested in more open-ended functionality. I hope they change their attitude about this seeing it is and will always be a cat and mouse game and they can only benefit by opening things up in a rational and secure way.

dgreif commented 5 years ago

@omerdn1 for SSL MITM, I had to root an android device, install XPOSED and install the SSL Unpinning 2.0 module. Then you can install the custom certs from a mitm proxy like charles and it will be accepted by the Ring app. I had some really odd behavior between the unpinning module and the Ring app where the app knew something was wrong. I had to restart the tablet, then enable ssl unpinning on the Ring app (the module only lets you unpin one app at a time), then proxy through the mitm server (or something along those lines). Otherwise the ring app would go into a spiral where it kept redirecting to the login page endlessly. Let me know if you have any questions about the setup (as long as it isn't related to installing any of those things, it's a pain in the 🦋but google will get you through it).

If you want to avoid setting up all of that, here are some links to others who have already done some of the reverse engineering for us 😄: https://web.archive.org/web/20180403003637/http://www.kidder.io/2017/07/04/ring-doorbell-api/ https://dojo.bullguard.com/dojo-by-bullguard/blog/ring/ https://github.com/skidder/skidder.github.io/blob/master/_posts/2017-07-04-ring-doorbell-api.md https://github.com/tchellomello/python-ring-doorbell/issues/23#issuecomment-307687571 https://github.com/tchellomello/python-ring-doorbell/issues/23#issuecomment-326811495

As for the sip setup, I can try to clean up what I have and push a branch up tomorrow. I'm not sure if I will have much time to work on it again until next week unfortunately.

dgreif commented 5 years ago

@omerdn1 I made some really good progress today! I am successfully negotiating the SIP setup at this point (pro tip, Ring requires User-Agent be set to Device or Blink 3.2.0 (Windows). Otherwise you get a 480 Temporarily Unavailable response no matter what other config you have in your sip invite).

I've moved on to actually setting up the RTP stream between the Ring servers and homebridge. I think I'm really starting to understand how they want it set up, but unfortunately the stream is immediately stopped by homekit after I set it up. Need to do some deep debugging in the HAP node code, but I am out of time today. Will probably pick up where I left off next week. Have a great weekend everyone!

omerdn1 commented 5 years ago

@dgreif that's awesome news! please push your code to a new branch so I can play with it as well.

dgreif commented 5 years ago

@omerdn1 I pushed up my current work to the live-stream branch. You can pull the branch, npm i, and then npm run test-homebridge to start up the plugin on your dev machine. You need to have homebridge config set up in ~/.homebridge/config.json with your Ring platform config in place.

As for the code, it is negotiating the sip connection just fine now, and I added srtp since it appears that is a hard requirement by homekit. It gets through the prepareStream method just fine, and then gets into handleStreamRequest with a start request. The current problem, I think, is that HomeKit is trying to use the AAC-eld audio codec. Ring appears to only support PCMU. I have been trying very hard to avoid using ffmpeg to convert the stream, but I think we might have to 😞.

bugs181 commented 5 years ago

@dgreif excellent work! Anxiously following along on the progress.

Correct me if I'm wrong, it sounds like you're using Homebridge to set up a SIP server and then proxying that to Ring's servers. Because I have such a low bandwidth internet connection, I'm hoping this will be the solution to avoid using Ring's servers et all. The recordings are often out of sync, very choppy and generally unintelligible. If I could use Homebridge as a direct connection to the doorbell locally, then the recordings could be saved to my NAS with near-perfect quality.

Edit: Just re-read some of the comments, it actually looks like you're just writing a SIP client for Homebridge to connect to Ring's servers. Bummer.

Edit 2: Anyone willing to pool funds toward a SIP proxy implementation that can MITM the video and store that locally? Personally willing to put $200 toward this.

dgreif commented 5 years ago

image

It's happening!! I successfully got a live stream all the way into the Home app 🎉 🚀 ✨. I have a lot of clean up and testing to do before it's released, but the big thing is that I have all the base functionality working. Thank you all for you patience and support while I took a deep dive into SIP/RTP. I should have a release out by the weekend.

@bugs181 I am currently going through the Ring servers for SIP. It may be possible to use SIP directly with the camera, but I haven't looked into that at all. I might give it a try in the coming weeks but can't make any promises. For now I am focused on just getting the live stream to work period.

BradMcGonigle commented 5 years ago

It's happening!! I successfully got a live stream all the way into the Home app 🎉 🚀 ✨. I have a lot of clean up and testing to do before it's released, but the big thing is that I have all the base functionality working. Thank you all for you patience and support while I took a deep dive into SIP/RTP. I should have a release out by the weekend.

Wow. This is HUGE news and will be a real game changer for HomeKit Ring users. I've love to help test it out if you need any help. I currently only have a Doorbell Pro but have debated buying some stick-up cams (but was waiting for HomeKit support).

ifeign commented 5 years ago

You are a gentleman and a scholar. This is a game changer not only for Homebridge users but other platforms like Home Assistant with Ring integration. People have been trying to do this for years!

On Thu, Jul 25, 2019 at 9:52 AM Dusty Greif notifications@github.com wrote:

[image: image] https://user-images.githubusercontent.com/3026298/61892015-c34b7680-aebf-11e9-9f73-1e2504e632b1.png

It's happening!! I successfully got a live stream all the way into the Home app 🎉 🚀 ✨. I have a lot of clean up and testing to do before it's released, but the big thing is that I have all the base functionality working. Thank you all for you patience and support while I took a deep dive into SIP/RTP. I should have a release out by the weekend.

@bugs181 https://github.com/bugs181 I am currently going through the Ring servers for SIP. It may be possible to use SIP directly with the camera, but I haven't looked into that at all. I might give it a try in the coming weeks but can't make any promises. For now I am focused on just getting the live stream to work period.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/dgreif/ring/issues/35?email_source=notifications&email_token=AHWLHYH3TX2QAU7TEH2K6YLQBHK3HA5CNFSM4H2VOWM2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD22CCXI#issuecomment-515121501, or mute the thread https://github.com/notifications/unsubscribe-auth/AHWLHYFVWFWFSGZMNVDYJVDQBHK3HANCNFSM4H2VOWMQ .

malmentm commented 5 years ago

Just Amazing!

jfbeaumont commented 5 years ago

Congratulations on your progress @dgreif, I own a lpd_v2 and 2 hp_cam_v1. I'm also willing to help out with testing.

mrose17 commented 5 years ago

Wonderful!!!

dgreif commented 5 years ago

The long wait is over...v4.3.0 has the first working version of live streams 📹. I put a ton of work into this over the last week and what I have is functional, but still needs some refinement. I have tested it with Doorbell Pro and Floodlight Cam, but would love feedback on how it is working with other cameras (particularly cameras with batteries). As for bugs, I'll start a list 😄

I know it's not perfect, but I wanted to get something released for all of you who have been waiting so long! Hope you all enjoy 🙇. I will be radio silent for a while as I catch up on sleep 💤

ifeign commented 5 years ago

Omg I'm updating right now!

Update: It works, but it takes multiple tries. I think it's more an issue with my doorbell than the plugin because it almost never connects on the first try with the official Ring app even though it has perfect reception...

On Fri, Jul 26, 2019 at 12:57 AM Dusty Greif notifications@github.com wrote:

The long wait is over...v4.3.0 has the first working version of live streams 📹. I put a ton of work into this over the last week and what I have is functional, but still needs some refinement. I have tested it with Doorbell Pro and Floodlight Cam, but would love feedback on how it is working with other cameras (particularly cameras with batteries). As for bugs, I'll start a list 😄

  • No sound - I may be able to get sound working, but it comes down to what codecs are supported by Ring and HomeKit. Need more time to play around and find the right configuration (if there is one).
  • Video stops after ~30 seconds - I have an idea of how Ring is doing keep-alives, but the SIP library I am using doesn't currently support it. I'll find a way to get past this soon.
  • Playback quality - My video playback is a little choppy and I have great internet/wifi. I think there are a number of tweaks that I can make to the video stream to make it flow better.
  • EADDRINUSE error crashing homebridge - This is a race condition that I've seen happen when switching between cameras quickly. It has to do with how I am selecting port numbers and shouldn't be hard to solve.

I know it's not perfect, but I wanted to get something released for all of you who have been waiting so long! Hope you all enjoy 🙇. I will be radio silent for a while as I catch up on sleep 💤

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/dgreif/ring/issues/35?email_source=notifications&email_token=AHWLHYDCJRXJWCV67OQHYI3QBKU5PA5CNFSM4H2VOWM2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD232CNQ#issuecomment-515350838, or mute the thread https://github.com/notifications/unsubscribe-auth/AHWLHYEF5BFFUEVVVSOH7HDQBKU5PANCNFSM4H2VOWMQ .

malmentm commented 5 years ago

Seems to work with my Doorview Camera which is battery powered. Image quality is great. Running on a Raspberry Pi 3b

benfysh commented 5 years ago

Hi, firstly thanks for the plugin and even snapshots was way more than I ever thought we would get in HomeKit!

I am getting the EADDRINUSE issue mentioned above (snippet from the logs below) however that only seems to be happening every time with my floodlight cameras (all 3) and for my Doorbell Pro I just get "Camera not responding" after around 10 seconds. No error shows in the logs.

[2019-7-26 09:09:29] [Ring] Snapshot Requested for Back Door [2019-7-26 09:09:35] [Ring] Preparing Live Stream for Rear [2019-7-26 09:09:35] Error: bind EADDRINUSE 0.0.0.0:10000 at _handle.lookup (dgram.js:266:18) at _combinedTickCallback (internal/process/next_tick.js:142:11) at process._tickCallback (internal/process/next_tick.js:181:9) [2019-7-26 09:09:35] Error: bind EADDRINUSE 0.0.0.0:10001 at _handle.lookup (dgram.js:266:18) at _combinedTickCallback (internal/process/next_tick.js:142:11) at Immediate._tickCallback [as _onImmediate] (internal/process/next_tick.js:181:9) at runCallback (timers.js:810:20) at tryOnImmediate (timers.js:768:5) at processImmediate [as _immediateCallback] (timers.js:745:5) [2019-7-26 09:09:35] Error: bind EADDRINUSE 0.0.0.0:10002 at _handle.lookup (dgram.js:266:18) at _combinedTickCallback (internal/process/next_tick.js:142:11) at process._tickCallback (internal/process/next_tick.js:181:9) [2019-7-26 09:09:35] Got SIGTERM, shutting down Homebridge... [2019-7-26 09:09:35] Error: bind EADDRINUSE 0.0.0.0:10003 at _handle.lookup (dgram.js:266:18) at _combinedTickCallback (internal/process/next_tick.js:142:11) at process._tickCallback (internal/process/next_tick.js:181:9)

schmupu commented 5 years ago

How I get the Livestream and in which format? Do I need the ring cloud for this feature?

EarthRise626 commented 5 years ago

I am on iOS 13 on both my iPad and iPhone. The streaming works perfectly in the Home app on my iPad, but times out to “Camera Not Responding” every time I request the live feed on my iPhone. Strange!

BradMcGonigle commented 5 years ago

I had to remove the camera from HomeKit and re-add it before it could get the live feed working. Update: I should also mention that I'm on iOS 13 Beta 4

Once I did that, it’s working great for me running homebridge in my raspberry pi 3b+.

Amazing work as always. I’d love to donate something for you work on this if you are accepting anything.

EarthRise626 commented 5 years ago

Working perfectly for me now on all devices once I removed the cameras and reconfigured them in HomeKit.

BradMcGonigle commented 5 years ago

If anyone has a wired and/or battery stickup cam, I'd love to know if they are working as well as the Doorbell cams are working now.

I'll probably wait for Amazon to put them on sale again but I'd like to start swapping out some of my Wyzecams.

dgreif commented 5 years ago

@benfysh I'll try to get a fix out for the EADDRINUSE error in the next few days. I know what the problem is but it was happening rarely for me so I didn't tackle it yet.

@schmupu live streams are mainly set up for use with the homebridge-ring plugin, but they can theoretically be used with any RTP client. You can use camera.createSipSession() and pass it details on where the the RTP data should flow. I don't have it documented, but there are TypeScript types on the method that should give you and idea of what you need to pass to it. I haven't tested without a Ring subscription, but I do think it is required to get the SIP/RTP connections.

@BradMcGonigle donations are welcome 😄. There is a Sponsor button at the top of the GitHub page which links to my paypal. As for battery cameras, @malmentm said his Doorview was working so I see no reason why other battery cameras wouldn't work as well.

benfysh commented 5 years ago

Excellent thanks. I’ll keep an eye out for it let me know if need any help testing seems to happen pretty consistently for me. I assume it’s because I have a few devices.

jahnkenneth commented 5 years ago

After a restart of all my devices (Iphones, iPads, HomePods snd ATV, it works! 😀 A donation is coming your way! Great work!

Klathmon commented 5 years ago

@dgreif I'm coming from the python-ring-doorbell library you pinged, but a few things I learned while looking into this a while back:

Good luck!

dgreif commented 5 years ago

@benfysh v4.3.1 has a lot better logic for choosing ports. Shouldn't have any further issues with EADDRINUSE. Let me know how it works for you!

@Klathmon I really appreciate all the info! The main use case that we are all using it for is live video in HomeKit. These are typically short-lived sessions where the user is either following up on a motion/ding notification, or just checking in on the camera. I don't think people will leave the streams connected 24/7, but I can't speak for everyone. The main reason I want keep-alives is so that I can view the stream for a couple minutes if needed, rather than it cutting out after ~30s. I'll mess around with a possible solution but if it doesn't work then users should be ok with 30 seconds at a time. From what I have seen on the python thread, it seems like Home Assistant might be capable of other big things like video storage, where 24/7 would be much more useful.

As for security, I am actually more impressed than I thought I would be. The SIP messages can be sent with TLS and the RTP packages are all being sent using SRTP which encrypts the main body of each UDP packet. Interesting fact, HomeKit actually won't work with RTP, only SRTP 🏆 🔒

EarthRise626 commented 5 years ago

@dgreif Installed 4.3.1. I am now receiving the following when trying to start a live stream:

[7/26/2019, 8:09:26 PM] [Ring] Failed to prepare stream for Backyard Floodlight [7/26/2019, 8:09:26 PM] [Ring] Error: Couldn't find your IP at socketQuery.then (/usr/local/lib/node_modules/homebridge-ring/node_modules/public-ip/index.js:50:10)

Jborn4christ commented 5 years ago

Incredible work!! Working for my floodlight wired ring and my ring doorbell cam. Had to remove accessories a couple times and re-add but all si working. Sent you a few bucks. Really appreciate the work!

wondergit113 commented 5 years ago

Deleted my previous comments—a reboot of my iMac and everything works great. Local and remote.

Ring Doorbell 2 and Spotlight Cams work great!!!

benfysh commented 5 years ago

@dgreif I installed 4.3.1 and it seems to have resolved the EADDRINUSE Issue. However, I am getting the same error as @EarthRise626 every time I request a live view now.

Jul 27 12:24:46 raspberrypi homebridge[21997]: [2019-7-27 12:24:46] [Ring] Preparing Live Stream for Front Door Jul 27 12:24:46 raspberrypi homebridge[21997]: [2019-7-27 12:24:46] [Ring] Failed to prepare stream for Front Door Jul 27 12:24:46 raspberrypi homebridge[21997]: [2019-7-27 12:24:46] [Ring] Error: Couldn't find your IP Jul 27 12:24:46 raspberrypi homebridge[21997]: at socketQuery.then (/usr/lib/node_modules/homebridge-ring/node_modules/public-ip/index.js:50:10) Jul 27 12:24:46 raspberrypi homebridge[21997]: at <anonymous> Jul 27 12:25:00 raspberrypi homebridge[21997]: [2019-7-27 12:25:00] [Ring] Snapshot Requested for Front Door

dgreif commented 5 years ago

@EarthRise626 @benfysh try v4.3.2. In 4.3.1 I changed the way I was retrieving your public ip address to a much faster approach (public-ip package), but apparently it does not work for everyone. In 4.3.2 I added my original approach as a fallback if public-ip fails.

benfysh commented 5 years ago

@dgreif on 4.4.0 I still seem to be having IP issues albeit different ones

27 18:47:07 raspberrypi homebridge[1040]: [2019-7-27 18:47:07] [Ring] Preparing Live Stream for Rear Jul 27 18:48:10 raspberrypi homebridge[1040]: [2019-7-27 18:48:10] [Ring] Failed to prepare stream for Rear Jul 27 18:48:10 raspberrypi homebridge[1040]: [2019-7-27 18:48:10] [Ring] Error: Failed to retrieve public ip address Jul 27 18:48:10 raspberrypi homebridge[1040]: at Object.<anonymous> (/usr/lib/node_modules/homebridge-ring/lib/homebridge/rtp-utils.js:36:23) Jul 27 18:48:10 raspberrypi homebridge[1040]: at Generator.throw (<anonymous>) Jul 27 18:48:10 raspberrypi homebridge[1040]: at rejected (/usr/lib/node_modules/homebridge-ring/lib/homebridge/rtp-utils.js:5:65) Jul 27 18:48:10 raspberrypi homebridge[1040]: at <anonymous> Jul 27 18:48:10 raspberrypi homebridge[1040]: at process._tickCallback (internal/process/next_tick.js:189:7)

EarthRise626 commented 5 years ago

@dgreif 4.4.0 resolved the issue for me! Live streams are now working great and pull up very quickly.

Frederik840 commented 5 years ago

@dgreif thanx for the incredible work! However i’m Experiencing the issue that the camera loads in about 10 seconds and then immediately prompts non-responding. Same on iPad and iPhone on iOS 12 and 13. Homebridge log is showing: [2019-7-28 14:09:02] [Ring] Preparing Live Stream for Voordeur [2019-7-28 14:09:03] [Ring] Waiting for stream data from Voordeur [2019-7-28 14:09:13] [Ring] Stopped Live Stream for Voordeur

Jborn4christ commented 5 years ago

Try removing the cameras, closing homebridge, relaunching, and then re-add them. That worked for me after I upgraded the plugin.

On Sun, Jul 28, 2019 at 8:15 AM Frederik840 notifications@github.com wrote:

@dgreif https://github.com/dgreif thanx for the incredible work! However i’m Experiencing the issue that the camera loads in about 10 seconds and then immediately prompts non-responding. Same on iPad and iPhone on iOS 12 and 13.

Frederik840 commented 5 years ago

Try removing the cameras, closing homebridge, relaunching, and then re-add them. That worked for me after I upgraded the plugin.

No luck unfortunately. Also rebooted the homekit bridges and reinstalled homebridge. Any other tricks?