home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
72.39k stars 30.29k forks source link

Reolink Duo 2 main stream not working #91279

Closed TheDK closed 1 year ago

TheDK commented 1 year ago

The problem

When clicking on the entity camera.garten_main_lens_0 the modal opens to show the stream, but flickers with an error message:

Error with media stream contents

Mode: RTSP Tested in Chrome and Firefox on Windows 11.

It does work in the iOS App.

If I change to RTMP it does not flicker, but the stream just wont start (same on Win / iOS).

In contrast to what the log states below, the sub stream works just fine.

All streams work fine in Blue Iris.

Camera has the newest firmware. All ports are open / activated for testing on the device.

What version of Home Assistant Core has the issue?

core-2023.4.2

What was the last working version of Home Assistant Core?

unknown

What type of installation are you running?

Home Assistant OS

Integration causing the issue

reolink

Link to integration documentation on our website

https://www.home-assistant.io/integrations/reolink/

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

2023-04-12 15:06:21.514 ERROR (stream_worker) [homeassistant.components.stream.stream.camera.garten_sub_lens_1] Error from stream worker: Error opening stream (HTTP_NOT_FOUND, Server returned 404 Not Found) rtsp://****:****@192.168.23.195:554/h264Preview_02_sub
2023-04-12 15:06:26.951 ERROR (MainThread) [reolink_aio.api] Host 192.168.23.195:443: command GetEnc response channel 0 does not equal requested channel 1
2023-04-12 15:06:35.517 ERROR (stream_worker) [homeassistant.components.stream.stream.camera.garten_main_lens_1] Error from stream worker: Error opening stream (HTTP_NOT_FOUND, Server returned 404 Not Found) rtsp://****:****@192.168.23.195:554/h265Preview_02_main

Additional information

No response

home-assistant[bot] commented 1 year ago

Hey there @starkillerog, mind taking a look at this issue as it has been labeled with an integration (reolink) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `reolink` can trigger bot actions by commenting: - `@home-assistant close` Closes the issue. - `@home-assistant rename Awesome new title` Renames the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign reolink` Removes the current integration label and assignees on the issue, add the integration domain after the command.

(message by CodeOwnersMention)


reolink documentation reolink source (message by IssueLinks)

starkillerOG commented 1 year ago

@TheDK the errors are related to the lens 1 stream, which is actually not available for the Duo 2 (has a single stream of stiched video of both lenses). I already fixed this bug in the upstream reolink-aio library and this will soon be available in HomeAssistant. The lens 1 stream will be removed leaving only a single main/sub/snapshots stream for the DUO 2.

Do I understand correctly that the camera.garten_main_lens_0 stream is working in the IOS HomeAssistant companion app and not working when reaching HA through chrome/firefox on windows? This might be because chrome/firefox is not capable of handeling the h265 stream format of the DUO 2 for the main stream.

When you go to the IP adress of the DUO 2 in windows 11 firefox/chrome, you schould be able to log into the Reolink web-client. There you can also view the RTSP streams. Does the main stream work there? If not, it is most likely firefox/chrome not capable yet of handeling the 4K h265 stream.

starkillerOG commented 1 year ago

If you appreciate the reolink integration and want to support its development, please consider sponsering the upstream library.

TheDK commented 1 year ago

@TheDK the errors are related to the lens 1 stream, which is actually not available for the Duo 2 (has a single stream of stiched video of both lenses). I already fixed this bug in the upstream reolink-aio library and this will soon be available in HomeAssistant. The lens 1 stream will be removed leaving only a single main/sub/snapshots stream for the DUO 2.

OK, thanks for the info, I thought so.

Do I understand correctly that the camera.garten_main_lens_0 stream is working in the IOS HomeAssistant companion app and not working when reaching HA through chrome/firefox on windows? This might be because chrome/firefox is not capable of handeling the h265 stream format of the DUO 2 for the main stream.

When you go to the IP adress of the DUO 2 in windows 11 firefox/chrome, you schould be able to log into the Reolink web-client. There you can also view the RTSP streams. Does the main stream work there? If not, it is most likely firefox/chrome not capable yet of handeling the 4K h265 stream.

Damn, you're right! I haven't noticed because in Windows I was only viewing through Blue Iris which works just fine in Chrome in 8K (and does not seem to do Transcoding as the server load does not imply that at all). I will look into finding a way of doing this on Win11 / any Browser.

Thanks for the quick reply!

starkillerOG commented 1 year ago

Thanks for confirming!

I will close this issue now, since there is nothing HomeAssistant can do about this, the browser schould be updated to support such stream formats or Reolink needs to implement a diffrent format in their firmware.

You should be able to view the lower resolution sub stream in windows firefox/chrome since that is h264 encoded.

starkillerOG commented 1 year ago

@home-assistant close