fwestenberg / reolink_dev

Home Assistant Reolink addon
MIT License
550 stars 101 forks source link

Reolink RLC-811a video feed not working (timeout) #496

Open TASSDevon opened 2 years ago

TASSDevon commented 2 years ago

Describe the bug When adding a Reolink RLC-811a I get all entities, all seems to work, though for the camera feed itself, I see the thumbnail when I add the camera to an entities card, but when I click on it to see the actual feed I just get a white screen, no video is loading.

To Reproduce Try playing a live video feed, nothing is loading

Expected behavior Video feed should play

Screenshots

Screenshot 2022-05-07 at 14 10 16

Environment: Please provide useful information about your environment, like:

Other stuff:

Running HA in a docker container

theklunky commented 2 years ago

Hi, I'm having the exact same issue with a RLC-820A that I just installed. My RLC-4205MP that it replaced worked properly before that. Diving into the logs produced this.

2022-05-09 15:32:33 ERROR (MainThread) [custom_components.reolink_dev.base] Host 10.1.1.22 error renewing the Reolink subscription 2022-05-09 15:32:48 ERROR (stream_worker) [libav.rtmp] Cannot read RTMP handshake response 2022-05-09 15:32:48 ERROR (stream_worker) [homeassistant.components.stream.stream.camera.front] Error from stream worker: Error opening stream (ERRORTYPE_104, Connection reset by peer) rtmp://:@ss 2022-05-09 15:33:11 ERROR (MainThread) [homeassistant.config_entries] Error unloading entry Front-Right for reolink_dev Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/config_entries.py", line 474, in async_unload result = await component.async_unload_entry(hass, self) File "/config/custom_components/reolink_dev/init.py", line 182, in async_unload_entry hass.data[DOMAIN].pop(base.push_manager) KeyError: 'push_manager-ec71dba882f8' 2022-05-09 15:33:29 ERROR (MainThread) [homeassistant.config_entries] Error unloading entry Front-Right for reolink_dev Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/config_entries.py", line 474, in async_unload result = await component.async_unload_entry(hass, self) File "/config/custom_components/reolink_dev/init.py", line 182, in async_unload_entry hass.data[DOMAIN].pop(base.push_manager) KeyError: 'push_manager-ec71dba882f8' 2022-05-09 15:34:07 ERROR (MainThread) [custom_components.reolink_dev.base] Host 10.1.1.22 subscription failed to its webhook, base object state will be set to NotAvailable 2022-05-09 15:34:07 ERROR (MainThread) [custom_components.reolink_dev.base] Host 10.1.1.22 error renewing the Reolink subscription 2022-05-09 15:34:25 ERROR (stream_worker) [libav.rtmp] Cannot read RTMP handshake response 2022-05-09 15:34:25 ERROR (stream_worker) [homeassistant.components.stream.stream.camera.front] Error from stream worker: Error opening stream (EOF, End of file) rtmp://:@ss 2022-05-09 15:34:35 ERROR (stream_worker) [libav.rtmp] Cannot read RTMP handshake response 2022-05-09 15:34:35 ERROR (stream_worker) [homeassistant.components.stream.stream.camera.front] Error from stream worker: Error opening stream (ERRORTYPE_104, Connection reset by peer) rtmp://:@ss 2022-05-09 15:34:48 ERROR (stream_worker) [libav.rtmp] Cannot read RTMP handshake response 2022-05-09 15:34:48 ERROR (stream_worker) [homeassistant.components.stream.stream.camera.front] Error from stream worker: Error opening stream (EOF, End of file) rtmp://:@ss 2022-05-09 15:34:55 ERROR (stream_worker) [libav.rtmp] Cannot read RTMP handshake response 2022-05-09 15:34:55 ERROR (stream_worker) [homeassistant.components.stream.stream.camera.front] Error from stream worker: Error opening stream (ERRORTYPE_104, Connection reset by peer) rtmp://:@ss 2022-05-09 15:35:07 ERROR (MainThread) [custom_components.reolink_dev.base] Host 10.1.1.22 error renewing the Reolink subscription 2022-05-09 15:35:22 ERROR (stream_worker) [libav.rtmp] Cannot read RTMP handshake response 2022-05-09 15:35:22 ERROR (stream_worker) [homeassistant.components.stream.stream.camera.front] Error from stream worker: Error opening stream (EOF, End of file) rtmp://:@ss 2022-05-09 15:35:25 ERROR (stream_worker) [libav.rtmp] Cannot read RTMP handshake response 2022-05-09 15:35:25 ERROR (stream_worker) [homeassistant.components.stream.stream.camera.front] Error from stream worker: Error opening stream (ERRORTYPE_104, Connection reset by peer) rtmp://:@ss 2022-05-09 15:36:05 ERROR (stream_worker) [libav.rtmp] Cannot read RTMP handshake response

Environment:

TASSDevon commented 2 years ago

I got the low res substream working, but only using webrtc and local lan IP. I would really like to be able to access the sub or main stream while "away" as weell. I have a foscam which can do this without problems so it's not a config issue (NAT, routing etc).

theklunky commented 2 years ago

I got the low res substream working, but only using webrtc and local lan IP. I would really like to be able to access the sub or main stream while "away" as weell. I have a foscam which can do this without problems so it's not a config issue (NAT, routing etc).

What steps did you take to get that working? I tried the simple streaming integration as well as the ONVIF integration and neither worked.

TASSDevon commented 2 years ago

I got the low res substream working, but only using webrtc and local lan IP. I would really like to be able to access the sub or main stream while "away" as weell. I have a foscam which can do this without problems so it's not a config issue (NAT, routing etc).

What steps did you take to get that working? I tried the simple streaming integration as well as the ONVIF integration and neither worked.

Use the following card (webrtc custom one):

type: custom:webrtc-camera
url: rtsp://USER:PASSWORD@CAM_LAN_IP_ADDRESS:554/h264Preview_01_sub

Note that this only works on local lan, not when you are connected on some other network.

theklunky commented 2 years ago

I tried installing the WebRTC Camera integration via HACS - it worked - but when I try to add the integration to home assistant, it doesn't show up in the drop down list even after I cleared the cache. I guess I'm out of luck on that one too.

theklunky commented 2 years ago

Alright, I figured out a way but it involves decreasing the resolution of the camera. If you don't go full 4K, the resolution below (2560x1440) will provide a H264 stream and not H265. This will then display in home assistant properly.

TASSDevon commented 2 years ago

Could you explain what you did? Settings etc? Are you using the Reolink integration?

reepje123 commented 2 years ago

I'm having the same issue with my RLC-811A too. Apparantly the main stream isn't supported when using RTMP. Source: Reddit. No matter which protocol or stream I configure, whenever I open the stream (by clicking the card) it always tries to open the RTMP main URL which obviously doesn't work.

theklunky commented 2 years ago

Could you explain what you did? Settings etc? Are you using the Reolink integration?

Within the reolink app, set your stream's resolution to 2560x1440. This will also set your stream to h264. Then, in home assistant's reolink integration, you should be able to add your camera. I could only add it via http.

0dragosh commented 2 years ago

Is there any other way of getting the stream to work without downgrading the resolution?

ZachPL commented 2 years ago

I just came across the same problem, I just installed a reolink 811a and my live stream doesn't work with 4k res, im assuming because of h265.

For now I guess i'll just keep full res in the reolink app and using webrtc

rtsp://user:pass@ip:554/h264Preview_01_sub displays fine in a lower res without me having to change the res in the reolink app, not ideal but for my purposes will be fine until someone comes up with another solution hopefully

theklunky commented 2 years ago

Is there any other way of getting the stream to work without downgrading the resolution?

I couldn't find one. I agree, downgrading the resolution is a fix but not a solution. I bought a 4K camera to use it and it pretty frustrating that I can't.

For now I guess i'll just keep full res in the reolink app and using webrtc

I was unable to get the webrtc integration working in my home assistant instance. I installed it through HACS without errors but it just never showed up when I tried adding it in HA...