Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Audio from/through Homekit app to Ring Doorbell not working #1238

Closed
1 task done
michalw2-alt opened this issue Jun 9, 2023 · 4 comments
Closed
1 task done

Audio from/through Homekit app to Ring Doorbell not working #1238

michalw2-alt opened this issue Jun 9, 2023 · 4 comments
Labels
bug Something isn't working

Comments

@michalw2-alt
Copy link

michalw2-alt commented Jun 9, 2023

Is there an existing issue for this?

  • I have searched the existing issues

Describe The Bug

Hello,

I'm running Homebridge as an Addon (docker container) for HomeAssistant OS.

I have Ring 1nd generation (hard wired) and I can hear all the sounds from the doorbell in HomeKit app but after enabling 2 way audio I cannot get the mic function working to talk back thought HomeKit (no incoming sound from HomeKit app).
I'm running latest Ring plugin.

When checked traffic from my iPhone device (HomeKit app) I can see large UDP packets coming from home bridge (that must be sounds data packets but only very small size packets from iPhone to HomeBridge after enabling 2 way audio which cannot be sound data).
Therefore from perspective of packet captures issue appears to be related with client (HomeKit app) not sending sound data packets to HB - but I've tried on multiple devices (including in Home app on MacBook pro) - and issue is the same.

It would be best to have working scenario saved to pcap capture file in order to compare with non-working but I would expect large data sound packets to be transmitted from iPhone (my voice) after activating 2 way stream.
Two way audio functionality has never worked (currently I'm running 16.5 iOS).

Please refer to example below (192.168.1.136 is client iPhone-HomeKit, 192.168.1.14 - HomeBridge).
Large sound packets (Len=1224) are only send in this direction - from HB to client: 192.168.1.14 → 192.168.1.136 (not 192.168.1.136 → 192.168.1.14).

 3005  19.158888 192.168.1.14 → 192.168.1.136 UDP 1272 33758 → 57625 Len=1224
 3006  19.171710 192.168.1.14 → 192.168.1.136 UDP 1272 33758 → 57625 Len=1224
 3007  19.178507 192.168.1.14 → 192.168.1.136 UDP 1272 33758 → 57625 Len=1224
 3008  19.188202 192.168.1.14 → 192.168.1.136 UDP 1272 33758 → 57625 Len=1224
 3009  19.196240 192.168.1.136 → 192.168.1.14 UDP 226 51605 → 47709 Len=178
 3010  19.203557 192.168.1.14 → 192.168.1.136 UDP 1272 33758 → 57625 Len=1224
 3011  19.216028 192.168.1.136 → 192.168.1.14 UDP 219 51605 → 47709 Len=171
 3012  19.217578 192.168.1.14 → 192.168.1.136 UDP 73 33758 → 57625 Len=25
 3013  19.220137 192.168.1.14 → 192.168.1.136 UDP 1272 33758 → 57625 Len=1224
 3014  19.222672 192.168.1.14 → 192.168.1.136 UDP 1272 33758 → 57625 Len=1224
 3015  19.224067 192.168.1.14 → 192.168.1.136 UDP 170 47709 → 51605 Len=122
 3016  19.225400 192.168.1.14 → 192.168.1.136 UDP 173 47709 → 51605 Len=125

I don't think there is any issue in the logs:

[6/9/2023, 1:58:33 PM] [Ring] Activating Session
[6/9/2023, 1:58:33 PM] [Ring] Streaming active for Front Door 2 (1.583s)
[6/9/2023, 1:58:33 PM] [Ring] iceConnectionStateChange: new
[6/9/2023, 1:58:33 PM] [Ring] iceConnectionStateChange: connected
[6/9/2023, 1:58:33 PM] [Ring] connectionStateChange: connected
[6/9/2023, 1:58:33 PM] [Ring] Received stream data from Front Door 2 (1.981s)
[6/9/2023, 1:58:33 PM] [Ring] received first video packet
[6/9/2023, 1:58:34 PM] [Ring] received first audio packet
[6/9/2023, 1:58:34 PM] [Ring] From Ring (Front Door 2): Input #0, sdp, from 'pipe:':
  Duration: N/A, start: 0.000000, bitrate: N/A
  Stream #0:0: Audio: opus, 48000 Hz, stereo, s16
Stream mapping:
  Stream #0:0 -> #0:0 (opus (libopus) -> aac (libfdk_aac))
Output #0, rtp, to 'rtp://127.0.0.1:46398?pkt_size=188':
  Metadata:
    encoder         : Lavf59.16.100
  Stream #0:0: Audio: aac (ELD), 16000 Hz, mono, s16, 24 kb/s
    Metadata:
      encoder         : Lavc59.18.100 libfdk_aac
size=       0kB time=00:00:00.00 bitrate=N/A speed=   0x    
[6/9/2023, 1:58:35 PM] [Ring] From Ring (Front Door 2): size=       5kB time=00:00:01.49 bitrate=  29.7kbits/s speed=2.79x    
[6/9/2023, 1:58:35 PM] [Ring] From Ring (Front Door 2): size=       7kB time=00:00:02.00 bitrate=  29.3kbits/s speed=1.93x    
[6/9/2023, 1:58:36 PM] [Ring] From Ring (Front Door 2): size=       9kB time=00:00:02.51 bitrate=  29.0kbits/s speed=1.61x    
[6/9/2023, 1:58:36 PM] [Ring] From Ring (Front Door 2): size=      11kB time=00:00:03.03 bitrate=  28.8kbits/s speed=1.46x    
[6/9/2023, 1:58:37 PM] [Ring] From Ring (Front Door 2): size=      13kB time=00:00:03.57 bitrate=  28.7kbits/s speed=1.38x    
[6/9/2023, 1:58:37 PM] [Ring] Return Audio (Front Door 2): Input #0, sdp, from 'pipe:':
  Metadata:
    title           : Talk
  Duration: N/A, start: 0.000000, bitrate: N/A
  Stream #0:0: Audio: aac, 16000 Hz, mono, s16
Stream mapping:
  Stream #0:0 -> #0:0 (aac (libfdk_aac) -> opus (libopus))

[6/9/2023, 1:58:37 PM] [Ring] From Ring (Front Door 2): size=      14kB time=00:00:04.05 bitrate=  28.6kbits/s speed=1.31x    
[6/9/2023, 1:58:37 PM] [Ring] Return Audio (Front Door 2): [libopus @ 0x55b28abd2cc0] No bit rate set. Defaulting to 96000 bps.
Output #0, rtp, to 'rtp://127.0.0.1:34765':
  Metadata:
    title           : Talk
    encoder         : Lavf59.16.100
  Stream #0:0: Audio: opus, 48000 Hz, stereo, s16, 96 kb/s
    Metadata:
      encoder         : Lavc59.18.100 libopus

[6/9/2023, 1:58:37 PM] [Ring] Return Audio (Front Door 2): size=       0kB time=00:00:00.01 bitrate= 306.8kbits/s speed=5.75e+03x    
[6/9/2023, 1:58:38 PM] [Ring] From Ring (Front Door 2): size=      16kB time=00:00:04.56 bitrate=  28.6kbits/s speed=1.25x    
[6/9/2023, 1:58:38 PM] [Ring] Return Audio (Front Door 2): size=       8kB time=00:00:00.57 bitrate= 117.5kbits/s speed=1.03x    
[6/9/2023, 1:58:38 PM] [Ring] From Ring (Front Door 2): size=      18kB time=00:00:05.14 bitrate=  28.5kbits/s speed=1.23x    
[6/9/2023, 1:58:38 PM] [Ring] Return Audio (Front Door 2): size=      14kB time=00:00:01.11 bitrate= 103.7kbits/s speed=1.03x    
[6/9/2023, 1:58:39 PM] [Ring] From Ring (Front Door 2): size=      20kB time=00:00:05.65 bitrate=  28.4kbits/s speed= 1.2x    
[6/9/2023, 1:58:39 PM] [Ring] Return Audio (Front Door 2): size=      20kB time=00:00:01.66 bitrate=  99.2kbits/s speed=1.03x    
[6/9/2023, 1:58:39 PM] [Ring] From Ring (Front Door 2): size=      21kB time=00:00:06.16 bitrate=  28.4kbits/s speed=1.18x    
[6/9/2023, 1:58:39 PM] [Ring] Return Audio (Front Door 2): size=      26kB time=00:00:02.16 bitrate=  96.8kbits/s speed=1.02x    
[6/9/2023, 1:58:40 PM] [Ring] From Ring (Front Door 2): size=      23kB time=00:00:06.67 bitrate=  28.4kbits/s speed=1.17x    
[6/9/2023, 1:58:40 PM] [Ring] Return Audio (Front Door 2): size=      31kB time=00:00:02.67 bitrate=  94.1kbits/s speed=1.01x    
[6/9/2023, 1:58:40 PM] [Ring] From Ring (Front Door 2): size=      25kB time=00:00:07.19 bitrate=  28.4kbits/s speed=1.15x    
[6/9/2023, 1:58:40 PM] [Ring] Return Audio (Front Door 2): size=      36kB time=00:00:03.21 bitrate=  91.4kbits/s speed=1.01x    
[6/9/2023, 1:58:41 PM] [Ring] From Ring (Front Door 2): size=      27kB time=00:00:07.70 bitrate=  28.3kbits/s speed=1.14x    
[6/9/2023, 1:58:41 PM] [Ring] Return Audio (Front Door 2): size=      40kB time=00:00:03.76 bitrate=  87.9kbits/s speed=1.01x    

Issue is very similar to: #431

Thanks a lot in advance for any help.

To Reproduce

No response

Expected behavior

2 way communication between Home app and Ring device.

Relevant log output

No response

Screenshots

No response

Homebridge Ring Config

{
            "refreshToken": "xxx",
            "hideCameraMotionSensor": false,
            "debug": true,
            "platform": "Ring"
        },

Additional context

No response

OS

Linux

Node.js Version

N/A

NPM Version

N/A

Homebridge/HOOBs Version

v1.6.1

Homebridge Ring Plugin Version

homebridge-ring v11.8.0

Operating System

Docker

@michalw2-alt michalw2-alt added the bug Something isn't working label Jun 9, 2023
@michalw2-alt
Copy link
Author

michalw2-alt commented Jul 31, 2023

Hello, just wondering if I have made any mistake in this bug report that could explain lack of any activity for so many months?

@tsightler
Copy link
Collaborator

tsightler commented Jul 31, 2023

I'm sure it's just a matter of not having time to work on this. These types of issues take tons of time to track down and recently, what limited time is available has been spent just keeping basic things working due to all of the API changes with Ring. Two-way audio is a nice feature, but is not critical for automations and it has never worked perfectly, see #984 for an example that's far older than this issue.

Of course, if someone has time to investigate and submit a PR, I'm sure that would be welcomed, but for now the only suggestion is to use the Ring app.

@dgreif
Copy link
Owner

dgreif commented Jul 31, 2023

Totally agree with what @tsightler said above. I did test this a little bit over the weekend and was able to confirm that my 2-way audio is no longer working on my cameras via Homebridge, so I should be able to debug it. We are also working on some changes to how we connect to the streaming servers, so it's possible those changes will help correct this issue once they land. If they don't, I'll try to spend some time digging into it. As @tsightler said, 2-way audio is nice, but it's never been the primary focus of this project 😄

@dgreif dgreif mentioned this issue Aug 1, 2023
1 task
@dgreif
Copy link
Owner

dgreif commented Aug 20, 2023

This is fixed in v12

@dgreif dgreif closed this as completed Aug 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants