Open ScottRoach opened 3 years ago
I get the same screenshot when I click on the picture card.
Environment: Home Assistant version: 2021.7.4 Reolink camera model: RLC-511W Camera firmware number: v3.0.0.142_20121804 relink_dev component version: v0.18
here my log:
2021-07-26 09:41:01 ERROR (MainThread) [aiohttp.server] Error handling request Traceback (most recent call last): File "/home/ubuntu/homeassistant/lib/python3.8/site-packages/aiohttp/web_protocol.py", line 422, in _handle_request resp = await self._request_handler(request) File "/home/ubuntu/homeassistant/lib/python3.8/site-packages/aiohttp/web_app.py", line 499, in _handle resp = await handler(request) File "/home/ubuntu/homeassistant/lib/python3.8/site-packages/aiohttp/web_middlewares.py", line 119, in impl return await handler(request) File "/home/ubuntu/homeassistant/lib/python3.8/site-packages/homeassistant/components/http/security_filter.py", line 60, in security_filter_middleware return await handler(request) File "/home/ubuntu/homeassistant/lib/python3.8/site-packages/homeassistant/components/http/forwarded.py", line 77, in forwarded_middleware return await handler(request) File "/home/ubuntu/homeassistant/lib/python3.8/site-packages/homeassistant/components/http/request_context.py", line 24, in request_context_middleware return await handler(request) File "/home/ubuntu/homeassistant/lib/python3.8/site-packages/homeassistant/components/http/ban.py", line 78, in ban_middleware return await handler(request) File "/home/ubuntu/homeassistant/lib/python3.8/site-packages/homeassistant/components/http/auth.py", line 144, in auth_middleware return await handler(request) File "/home/ubuntu/homeassistant/lib/python3.8/site-packages/homeassistant/components/http/view.py", line 135, in handle result = await result File "/home/ubuntu/homeassistant/lib/python3.8/site-packages/homeassistant/components/camera/__init__.py", line 511, in get return await self.handle(request, camera) File "/home/ubuntu/homeassistant/lib/python3.8/site-packages/homeassistant/components/camera/__init__.py", line 546, in handle stream = await camera.handle_async_mjpeg_stream(request) File "/home/ubuntu/.homeassistant/custom_components/reolink_dev/camera.py", line 198, in handle_async_mjpeg_stream stream = CameraMjpeg(self._manager.binary) AttributeError: 'ReolinkCamera' object has no attribute '_manager'
Describe the bug Camera stream does not load. Instead it returns either a 504 Timeout error from the homeassistant proxy url or an empty text response.
To Reproduce
Expected behavior When viewing the stream version of the camera (as compared to the screen grab) it should show what the camera sees instead of a broken image.
Screenshots![Screen Shot 2021-01-17 at 1 55 56 PM](https://user-images.githubusercontent.com/970677/104857225-cdd7a800-58cb-11eb-9dac-fba8e43a3fc9.png)
Environment: Please provide useful information about your environment, like:
2021.1.4 (docker)
RLC-520A
v3.0.0.116_20102900
v0.13
Additional context I've tried the following things to troubleshoot:
homeassistant correct.camera.ipaddress.here:554 ESTABLISHED 15066/python3
Once the request times out the connection is no longerESTABLISHED
rtsp://username:password@correct.camera.ipaddress.here:554/h264Preview_01_main
ffmpeg
loaded in my configreolink_dev logs:
Core Issue I've narrowed the issue down to this recent change: https://github.com/fwestenberg/reolink_dev/commit/a8cecc255131607fa741b02781b8ce814619cc38#diff-5a5bfae2f3cd9b046addab6f73b4563d28118ab7ff0d899c52de60f5d2556c3aL128-L140 (camera.py L128-140) If I revert that bit of code then the stream works correctly. It seems that when
async_aiohttp_proxy_web
is used instead ofasync_aiohttp_proxy_stream
the request times out.