AlexxIT / go2rtc

Ultimate camera streaming application with support RTSP, RTMP, HTTP-FLV, WebRTC, MSE, HLS, MP4, MJPEG, HomeKit, FFmpeg, etc.
https://github.com/AlexxIT/Blog
MIT License
5.09k stars 406 forks source link

Even though HKSV is enabled, no recording is being saved #684

Open bgoncal opened 1 year ago

bgoncal commented 1 year ago

I have my Aqara G4 doorbell in Apple Home through go2rtc, I have enabled recording on any movement (in HomeKit secure video), but nothing was recorded till now (a few hours using).

Is HKSV really supported?

AlexxIT commented 1 year ago

Proxy logic fixed in latest master version. I'm not using HKSV, so can't test it.

brb408wpb commented 1 year ago

I am having a similar problem. I haven't "fully" installed the device yet, because I want to make sure it is working or I will send it back. From the troubleshooting tips I have found, such as removing the doorbell from the Aqara and HK app, it still won't stream and record. 2TB iCloud plan 128gb SD card, no batteries, wired to a 12v source, firmware current at 4.0.4, HK either on a current HomePod mini or AppleTV. Activity history either off or One Month. If I don't get this working soon, I will send it back. I know HKSV works for me because I can do it from a Wyze camera streamed through Scrypted.

bgoncal commented 1 year ago

Proxy logic fixed in latest master version. I'm not using HKSV, so can't test it.

Until this moment, nothing recorded

AlexxIT commented 1 year ago

I don't understand if problem solved or not

heroash88 commented 12 months ago

First, THANK YOU Alex!! The proxy feature is AMAZING.

Second, I am having the same problem. I tested on multiple cameras: 2 Aqara G3s, Aqara G2H, Aqara G2H Pro, and an Ecobee Camera.

Happy to help test if you decided to work on a fix.

bgoncal commented 12 months ago

I don't understand if problem solved or not

The problem was not solved, I still don't see recordings in Apple Home app, neither on Aqara G4 or G3

AlexxIT commented 12 months ago

Unfortunately I can't pay for iCloud even for a test. Payment systems are blocked in the country.

bgoncal commented 12 months ago

Unfortunately I can't pay for iCloud even for a test. Payment systems are blocked in the country.

Is there anything that I or @heroash88 could help as a user?

AlexxIT commented 12 months ago

I guess I need to see live how the data is transferred to understand the problem. As I know, HKSV can be enabled only for paid accounts.

AbsolutJohan commented 11 months ago

I've got the same situation with my cameras. Can't get any of them (proxied Eve cameras and Reolink cameras) to record anything after adding them in Apple Home. Get the option when adding them to record and have enabled it but there's no recording being saved on Apples servers. The only time it's working is if I'm adding the HomeKit cameras directly to Apple Home but I really wanna get them in Home Assistant and Go2RTC. Recordings working through other HKSV application, for example Scrypted.

Has anyone got the recordings working on Go2RTC? Also, awesome job

AlexxIT commented 11 months ago

@AbsolutJohan you got not same situation. Go2rtc doesn't support HKSV for 3rd party cameras. This issue about HomeKit cameras.

AbsolutJohan commented 11 months ago

@AbsolutJohan you got not same situation. Go2rtc doesn't support HKSV for 3rd party cameras. This issue about HomeKit cameras.

Im sorry, then I understand why some doesn’t work but the Eve indoor and outdoor cameras that I have has native support for HKSV. So I suppose the idea is that they are supposed to work as proxied HomeKit cameras with HKSV in Go2RTC

AlexxIT commented 11 months ago

Ok. Looks like HKSV proxy has some problems. I can't check them because I don't have an iCloud subscription.

consolecwby commented 10 months ago

Any idea what the secret sauce koush/scrypted is using to get 3rd party cameras to work on HKSV? AlexxIT sorry you cant test it this is such a great bit of code you made here though, keep up the good work.

AlexxIT commented 10 months ago

No any magic there. Just support motion sensor and additional HomeKit services.

filikun commented 10 months ago

No any magic there. Just support motion sensor and additional HomeKit services.

I'm currently using Scrypted only to get HKSV on my Tapo cameras. I was hoping the Homekit support in Go2rtc would work similar. Is it by any chance features coming? I've tried using both rtsp, onvif and the tapo source but non seem to give HKSV the motion sensor it needs (Scrypted is using onvif for that feature what I can tell)

wbln commented 8 months ago

@AlexxIT могу предоставить возможность либо удаленного подключения к своему серверу для проверки работы камер (aqara g2h или g2h pro) либо могу помочь с оплатой подписки, там для 1 камеры достаточно минимального тарифа. было бы очень здорово, если бы ты починилподдержку hksv.

mtthidoteu commented 8 months ago

Any update on this? Workaround? I need the doorbell (Aqara G4) on frigate so I've put it through go2rtc and then the transparent proxy to HomeKit, but the timeline recordings feature doesn't work.

DrPain911 commented 8 months ago

Yes, I’d be interested in that as well as I have the same problem. Also, is it possible to duplicate the stream that go2rtc creates? My camera only has one stream and then it shows up as in use through HomeKit.

wbln commented 7 months ago

Any update on this? Workaround? I need the doorbell (Aqara G4) on frigate so I've put it through go2rtc and then the transparent proxy to HomeKit, but the timeline recordings feature doesn't work.

as a workaround, i use the Scrypted service with motion detection plugin.

mtthidoteu commented 7 months ago

Could you describe what you are doing? Does it work with the doorbell ring and two way audio?On 14 Mar 2024, at 06:29, N. Moiseenko @.***> wrote:

Any update on this? Workaround? I need the doorbell (Aqara G4) on frigate so I've put it through go2rtc and then the transparent proxy to HomeKit, but the timeline recordings feature doesn't work.

as a workaround, i use the Scrypted service with motion detection plugin.

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: @.***>

wbln commented 7 months ago

Could you describe what you are doing? Does it work with the doorbell ring and two way audio?

i mean, as a workaround, recording video in HCSV requires that the camera transmit status from a motion sensor that go2rtc does not currently transmit. And to do that, I use the Scrypted service, where I programmatically recognize movement and transmit that information to HomeKit

mtthidoteu commented 7 months ago

Could you describe what you are doing? Does it work with the doorbell ring and two way audio?

i mean, as a workaround, recording video in HCSV requires that the camera transmit status from a motion sensor that go2rtc does not currently transmit. And to do that, I use the Scrypted service, where I programmatically recognize movement and transmit that information to HomeKit

I see! And are you using it with a doorbell or just a camera? If a doorbell, does the two way audio work? And the 'Someone has rang the doorbell' homekit notification work?

wbln commented 7 months ago

Camera only, unidirectional audio.

DrPain911 commented 7 months ago

For me everything works (2w-audio, ring notification), even the motion sensor appears and registers motion. But it doesn’t trigger a HKSV recording, even though it is enabled in the camera settings.

bebaton14 commented 7 months ago

Alex! go2RTC is a very cool program. I have 4 cameras connected and broadcast to homekit and Alice. But the no video recording in homekit forces me to give up for a while. The wife says it is not convenient)). I think many will agree. Thank you!

wbln commented 7 months ago

@AlexxIT ожидаются ли какие-то подвижки в сторону починки hksv прокси?

AlexxIT commented 6 months ago

Suddenly, I have a wife, too. And she has plans for my free time, too :)

DrPain911 commented 6 months ago

Congrats, I know the feeling 😉

SashaBusinaro commented 6 months ago

I am having the same problem, when motion is detected and it is supposed to trigger recording on hksv it generates this error: [homekit] unknown host: NULL

AlexxIT commented 6 months ago

"unknown host" means you trying to get homekit stream with non Apple device. Maybe some open source. Because almost all open source don't implement protocol correctly.

SashaBusinaro commented 6 months ago

I have tried both configuring it directly with homekit and importing it from homeassistant and the problem remains, motion is detected, but no recordings happen. The error ([homekit] unknown host: NULL) only occurs when the camera detects motion so when it should trigger the hksv recording.

AlexxIT commented 6 months ago

Interesting. What you using as Apple home center?

Can you enable trace logs for API module and show the error moment?

SashaBusinaro commented 6 months ago
10:26:06.095 TRC [api] GET /log.html 172.30.32.2:41534
10:26:06.111 TRC [api] GET /main.js 172.30.32.2:41534
10:26:06.169 TRC [api] GET /api/log 172.30.32.2:41534
10:26:11.214 TRC [api] GET /api/log 172.30.32.2:41534
10:26:12.612 TRC [api] GET /api/log 172.30.32.2:41534
10:26:14.259 TRC [api] DELETE /api/log 172.30.32.2:41534
10:26:14.286 TRC [api] GET /api/log 172.30.32.2:41534
10:26:17.956 TRC [api] GET /api/log 172.30.32.2:41534
10:26:18.651 TRC [api] POST /pair-verify 192.168.178.27:50092
10:26:18.651 ERR [homekit] unknown host: NULL
10:26:18.669 TRC [api] POST /pair-verify 192.168.178.27:50093
10:26:18.692 TRC [homekit] 192.168.178.27:50093: get pair id=CE605236-A9AA-490D-95D3-DCEAA19853E0
10:26:22.956 TRC [api] GET /api/log 172.30.32.2:41534
10:26:23.734 TRC [api] POST /pair-verify 192.168.178.24:49866
10:26:23.735 ERR [homekit] unknown host: NULL
10:26:23.751 TRC [api] POST /pair-verify 192.168.178.24:49867
10:26:23.771 TRC [homekit] 192.168.178.24:49867: get pair id=CE605236-A9AA-490D-95D3-DCEAA19853E0
10:26:27.643 TRC [api] POST /pair-verify 192.168.178.27:50094
10:26:27.643 ERR [homekit] unknown host: NULL
10:26:27.661 TRC [api] POST /pair-verify 192.168.178.27:50095
10:26:27.683 TRC [homekit] 192.168.178.27:50095: get pair id=CE605236-A9AA-490D-95D3-DCEAA19853E0
10:26:27.957 TRC [api] GET /api/log 172.30.32.2:41534
10:26:28.830 TRC [api] POST /pair-verify 192.168.178.22:50745
10:26:28.830 ERR [homekit] unknown host: NULL
10:26:28.848 TRC [api] GET /api/log 172.30.32.2:41534
10:26:28.850 TRC [api] POST /pair-verify 192.168.178.22:50746
10:26:28.867 TRC [homekit] 192.168.178.22:50746: get pair id=CE605236-A9AA-490D-95D3-DCEAA19853E0
10:26:32.736 TRC [api] POST /pair-verify 192.168.178.24:49868
10:26:32.736 ERR [homekit] unknown host: NULL
10:26:32.769 TRC [api] POST /pair-verify 192.168.178.24:49869
10:26:32.786 TRC [homekit] 192.168.178.24:49869: get pair id=CE605236-A9AA-490D-95D3-DCEAA19853E0
10:26:32.960 TRC [api] GET /api/log 172.30.32.2:41534
10:26:35.681 TRC [api] GET /api/log 172.30.32.2:41534
10:26:37.778 TRC [api] POST /pair-verify 192.168.178.22:50747
10:26:37.779 ERR [homekit] unknown host: NULL
10:26:37.795 TRC [api] POST /pair-verify 192.168.178.22:50748
10:26:37.815 TRC [homekit] 192.168.178.22:50748: get pair id=CE605236-A9AA-490D-95D3-DCEAA19853E0
10:26:37.956 TRC [api] GET /api/log 172.30.32.2:41534
10:26:40.751 TRC [api] GET /api/log 172.30.32.2:41534

When you see the error: ERR [homekit] unknown host: NULL it corresponds to the exact moment when I moved in front of the camera

AlexxIT commented 6 months ago

Who is 192.168.178.27 / 192.168.178.22 / 192.168.178.24 ?

SashaBusinaro commented 6 months ago

They are homepod mini and apple tv. I have rebooted all of them (including the cameras), but the error persist and no recordings.

10:59:35.943 TRC [api] GET /api/log 172.30.32.2:54876
10:59:36.447 TRC [api] POST /pair-verify 192.168.178.24:49191
10:59:36.447 ERR [homekit] unknown host: NULL
10:59:36.468 TRC [api] POST /pair-verify 192.168.178.24:49192
10:59:36.497 TRC [homekit] 192.168.178.24:49192: get pair id=CE605236-A9AA-490D-95D3-DCEAA19853E0
10:59:37.122 TRC [api] GET /api/log 172.30.32.2:54876
10:59:40.947 TRC [api] GET /api/log 172.30.32.2:54876
10:59:41.506 TRC [api] POST /pair-verify 192.168.178.22:49197
10:59:41.506 ERR [homekit] unknown host: NULL
10:59:41.523 TRC [api] POST /pair-verify 192.168.178.22:49198
10:59:41.555 TRC [homekit] 192.168.178.22:49198: get pair id=CE605236-A9AA-490D-95D3-DCEAA19853E0
10:59:42.781 TRC [api] GET /api/log 172.30.32.2:54876
10:59:45.950 TRC [api] GET /api/log 172.30.32.2:54876
10:59:46.747 TRC [api] POST /pair-verify 192.168.178.24:49193
10:59:46.747 ERR [homekit] unknown host: NULL
10:59:46.765 TRC [api] POST /pair-verify 192.168.178.24:49194
10:59:46.792 TRC [homekit] 192.168.178.24:49194: get pair id=CE605236-A9AA-490D-95D3-DCEAA19853E0
10:59:50.947 TRC [api] GET /api/log 172.30.32.2:54876
10:59:51.083 TRC [api] GET /api/log 172.30.32.2:54876
10:59:51.838 TRC [api] POST /pair-verify 192.168.178.22:49199
10:59:51.838 ERR [homekit] unknown host: NULL
10:59:51.858 TRC [api] POST /pair-verify 192.168.178.22:49200
10:59:51.882 TRC [homekit] 192.168.178.22:49200: get pair id=CE605236-A9AA-490D-95D3-DCEAA19853E0
sylwester- commented 3 months ago

Hi there,

First of all, superb work on this! Very easy to setup and everything* works correctly. I have it running with k3s. HomeKit cameras are recognized, I can pair them with go2rtc, I can add them to the HomeKit, 2 way audio works great, Motion is detected with no problems.

* However, even though all is setup correctly for hksv, nothing is being recorded. I have Aqara G2H Pro. Also configured Eufy IndoorCam 2k and the result is the same.

juliannojungle commented 1 month ago

Go2rtc is great, but having same issue here (no recordings on hksv).

Saw a comment from Koushd (scrypted dev) saying that to enable recording on hksv you need a motion sensor. Maybe #812 will solve this.

AlexxIT commented 4 weeks ago
  1. Problem not only with motion sensor. The developer should implement a lot of additional APIs for video recording.
  2. Not everyone has a motion sensor for their camera. If they do, it's hidden behind a bunch of different protocols. And if it does not exist - it is necessary to implement motion recognition in the frame, which usually loads CPU server very much.