cgtobi / netatmo_custom

This repo is a custom component from the beta version of the official HA netatmo component
MIT License
13 stars 6 forks source link

Camera stream failing on doorbell #4

Closed confucius78 closed 2 years ago

confucius78 commented 2 years ago

HA version: 2022.02.9

Issue: Opening camera stream of the doorbell fails (get error message on-screen). Subsequently, the state of the camera entity becomes "Unavailable". When the instance is initialised, the camera entity shows as "Idle" (which I think is normal behavior), and the actual still preview does seem correct.

Log (redacted ip to xxx.xxx.xxx.xxx): 2022-03-04 11:39:16 WARNING (stream_worker) [libav.http] HTTP error 404 Not Found 2022-03-04 11:39:16 ERROR (stream_worker) [homeassistant.components.stream.stream.camera.netatmo_netatmo_doorbell_g7c7520] Error from stream worker: Error opening stream (HTTP_NOT_FOUND, Server returned 404 Not Found) http://xxx.xxx.xxx.xxx/2289badb6716942407f35251287f2254/live/files/high/index.m3u8 2022-03-04 11:39:18 ERROR (MainThread) [homeassistant.components.analytics] Error sending analytics to https://analytics-api.home-assistant.io/v1: ClientConnectorError(ConnectionKey(host='analytics-api.home-assistant.io', port=443, is_ssl=True, ssl=None, proxy=None, proxy_auth=None, proxy_headers_hash=-8920893537776734647), ConnectionRefusedError(111, "Connect call failed ('::', 443, 0, 0)")) 2022-03-04 11:40:00 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved

confucius78 commented 2 years ago

Ok, so I have tested per the current release on 6-Mar, findings:

Test steps:

Log messages: No log messages until the last testing step, at which point it seems to spit out the following error every ... seconds: Error from stream worker: Error opening stream (HTTP_NOT_FOUND, Server returned 404 Not Found) https://prodvpn-eu-11.netatmo.net/restricted/10.255.2.226/2***REDACTED***,,/live/files/high/index.m3u8

confucius78 commented 2 years ago

So as discussed on discord: I did some additional testing after discovering the doorbell stream went unavailable altogether:

  1. restart HA -> no success, when checking a picture element in lovelace, blank grey screen and status 'Unavailable'

  2. uninstall, restart, re-install, restart: again no image, but with the difference the entity has state 'Idle', which changes to 'Unavailable' after a few minutes

Logs:

Logger: homeassistant.components.stream.stream.camera.netatmo_netatmo_doorbell_g7c7520 Source: components/stream/init.py:340 Integration: Stream (documentation, issues) First occurred: 8:48:59 PM (4 occurrences) Last logged: 8:50:30 PM

Error from stream worker: Error opening stream (HTTP_NOT_FOUND, Server returned 404 Not Found) https://prodvpn-eu-9.netatmo.net/restricted/10.255.56.98/2289badb6716942407f35251287f2254/***REDACTED***,,/live/files/high/index.m3u8
Error from stream worker: Error opening stream (ERRORTYPE_5, I/O error) https://prodvpn-eu-9.netatmo.net/restricted/10.255.56.98/2289badb6716942407f35251287f2254/***REDACTED***,,/live/files/high/index.m3u8

It seems exactly like the previous behavior after clicking, as the attributes are also changing to different values. To be clear: I didn't click on the card to open the stream

confucius78 commented 2 years ago

Idea...I just noticed the stream on the actual Netatmo app is black. Could it be that by handling the camera as an actual camera, all but one instance are blocked access?

That could explain why you were getting a working image, but it was failing for me...

This was not the case when I started testing this btw, so the last code update initiated this behavior

cgtobi commented 2 years ago

Currently the video stream is not publicly available. Therefore we'll stick with the snapshots for now.