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

Adds support for Abode IOTA via HomeKit #1429

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

los93sol
Copy link

@los93sol los93sol commented Nov 2, 2024

Fixes #1295

This adds the ability to discover the Abode IOTA and pair it over HomeKit. It also fixes the TLV8 parsing that would make this particular camera fail to playback due to it producing 0xff, 0x00 in between it's TLV's. I updated the TLV8 parsing to handle scenarios like this generically because in this case 0xff is type 255 with length 0 so you can just handle them like normal 0 length TLV's and move on.

@AlexxIT AlexxIT self-assigned this Nov 2, 2024
@AlexxIT
Copy link
Owner

AlexxIT commented Nov 2, 2024

I'm not sure your TLV changes don't break anything.

@los93sol
Copy link
Author

los93sol commented Nov 2, 2024

I’m not either lol but I did run through pairing which has TLVs larger than 255 bytes and that worked fine and I’m pretty familiar with HAP as I originally patched the PDU fragmentation issue that prevented certain BLE devices from functioning properly with the lib so I am fairly confident this change is solid.

@AlexxIT
Copy link
Owner

AlexxIT commented Nov 2, 2024

Oh, great. I wrote that code completely blind. Just on a guess as to how it should work.

@los93sol
Copy link
Author

los93sol commented Nov 5, 2024

@AlexxIT I'm looking more into the HomeKit side and wanted to get your thoughts on some things.

My camera has two instances of the CameraRTPStreamManagement service and there actually is a difference in the video and audio formats offered on them. My thought is it would be nice to be able to specify the iid in the configuration to force it to use the specific service as their streaming statuses do appear to accurately reflect which one is in use.

The other thing I was looking at is allowing the user to specify the max width and max height to try to cap out the highest negotiated resolution. The idea with this would be for use with Frigate where I may want one stream to be lower resolution for detect and a higher resolution for record.

The last thing I was looking at is two way audio to the homekit device. It looks like there's a handful of scenarios to differentiate around it

  1. Proxying a HomeKit device to HomeKit. I tested this and it worked fine with Apple Home.
  2. Proxying any other device to HomeKit. I have not tested this, but I do have some onvif cameras that I have two way audio working with already so I am able to test it.
  3. Two-way audio between go2rtc, frigate, home assistant, etc. to the HomeKit device. I found that frigate's UI is looking specifically for recvonly to display the speaker button to listen to the camera, and sendonly to display the microphone to at least start the enablement of two way audio. I also am able to conditionally add the sendonly media based on the presence of the speaker service on the camera. I'm a bit confused here though as it seems like the direction should be DirectionSendRecv in this case as the audio codec is the same in both directions so trying to understand if frigate's logic should account for DirectionSendRecv as well or if I should actually add the same media twice.

@seydx
Copy link

seydx commented Nov 5, 2024

@los93sol

I'm also interested in two-way audio. I haven't tested it yet, but do native homekit cameras with two-way audio proxied from go2rtc to homekit still have a working talkback button?

In the case of non-native homekit cameras with two-way audio, like a tapo camera, there is no talkback button, right?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Info] go2rtc works with the security video cameras from Abode, which utilize an AWS Kinesis stream.
3 participants