roleoroleo / yi-hack_ha_integration

Home Assistant custom integration for Yi cameras: yi-hack-MStar, yi-hack-Allwinner, yi-hack-Allwinner-v2, yi-hack-v5 and sonoff-hack
GNU General Public License v3.0
219 stars 32 forks source link

Outdoor Camera - RTSP stream unavailable #115

Closed fibilt closed 5 months ago

fibilt commented 1 year ago

Firmware Version 0.2.6 Base Version 11.1.26.1_202301191526 Model Suffix h30ga

RTSP stream is very unreliable after updating to 0.2.6 and 11.1.26.1. I have noticed that very frequently, the camera gets unresponsive for some time when trying to stream video via RTSP, and then it recovers automatically from it.

Integration with home assistant does not work either after the update. When I try to stream video, I get the following error in HA:

2023-03-03 16:18:37.410 ERROR (SyncWorker_1) [custom_components.yi_hack.camera] Fetch snapshot image failed from yi_hack_a2_0efa89_cam, falling back to FFmpeg; HTTPConnectionPool(host='192.168.145.122', port=8080): Read timed out.

motion detection cam snapshot does not work either.

Is this a known bug of 0.2.6 version? Can someone with same camera confirm if they dont have any problem with 0.2.6 version please?

image
McGiverGim commented 1 year ago

It seems I've a similar problem. My camera does not work in Home Assistant, I'm not sure if the problem is the integration update or the Home Assistant update to 2023.3.

fibilt commented 1 year ago

My camera stopped working in home assistant when I updated the camera hack firmware (all winners v2) and camera base firmware. I have not updated to home assistant 2023.3 yet, HA update can’t be the problem.

Something interesting is that I can stream video with VLC for instance with no issues.

Something I noticed too is that high level resolution snapshot does not work either. I don’t know if the issue is related.

McGiverGim commented 1 year ago

In my case, both snapshots work.

McGiverGim commented 1 year ago

I can see this error in HA:

2023-03-04 08:52:32.002 ERROR (MainThread) [homeassistant.components.camera] Error requesting stream: Camera is off

but the camera is on, for sure, that is at least what appears in the camera web and the VLC can stream without problem. I have tried to enable de "RTSP alternative server", without luck. Remove and add again the integration to HA, without luck.

@roleoroleo some idea of what can be wrong?

McGiverGim commented 1 year ago

@fibilt this is very strange. If tried to add the camera as "onvif" camera, it works, and it ADDS the Onvif camera stream to the yi cam integration too. And it seems to work.

EDIT: it seems both integrations "generate" the same device. So when I press at any of them both navigate to the same device in HA, now with the entities of onvif + yi cam at the same time.

fibilt commented 1 year ago

Yes, I was able to add the camera as onvif too but tbh I did not find the streaming very reliable.

I also tried to add the camera using ffmpeg integration, and this integration works just fine. I wonder if the issue is caused by something added in the updated yihack integration version that is conflicting with the 0.26 hack or latest base firmware

@roleoroleo any thoughts?

majkers commented 1 year ago

I can see this error in HA:

2023-03-04 08:52:32.002 ERROR (MainThread) [homeassistant.components.camera] Error requesting stream: Camera is off

but the camera is on, for sure, that is at least what appears in the camera web and the VLC can stream without problem. I have tried to enable de "RTSP alternative server", without luck. Remove and add again the integration to HA, without luck.

@roleoroleo some idea of what can be wrong?

https://github.com/roleoroleo/yi-hack_ha_integration/issues/112

github-actions[bot] commented 6 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.