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
218 stars 32 forks source link

Attempt to watch recordings in media player ends up with 401 #93

Closed KarolKsionek closed 5 months ago

KarolKsionek commented 2 years ago

Hey! First of all - great work with all of this!

Now to the issue. When I open the media player, choose yi-hack source, I can see directories that are created, I can see listed items, but thumbnails fail to load, so does the actual video loading (401 Not Authorized error in browser) My camera is password protected, which might cause the issue. Probably we should pass somehow credentials for camera along with MediaSourceItem.

On the other hand in logs I get the following entries:

Logger: homeassistant.helpers.frame
Source: helpers/frame.py:77
First occurred: 16:12:12 (1 occurrences)
Last logged: 16:12:12

Detected integration that calls media_source.async_resolve_media without passing an entity_id. Please report issue for media_source using this method at homeassistant/components/media_source/__init__.py, line 138: report("calls media_source.async_resolve_media without passing an entity_id")
2022-08-30 16:29:51.047 WARNING (MainThread) [homeassistant.helpers.frame] Detected integration that uses deprecated `async_get_registry` to access device registry, use async_get instead. Please report issue to the custom integration author for yi_hack using this method at custom_components/yi_hack/media_source.py, line 73: device_registry = await self.hass.helpers.device_registry.async_get_registry()
2022-08-30 16:31:14.595 DEBUG (MainThread) [custom_components.yi_hack.views] Stream error for /api/yi-hack/yi_hack_a2_210f2e/2022Y08M30D16H/27M00S60.jpg?authSig=<sig>: Response payload is not completed

Any ideas how to fix it?

KarolKsionek commented 2 years ago

Self fix here ;) https://github.com/roleoroleo/yi-hack_ha_integration/pull/94

roleoroleo commented 2 years ago

You are right, I didn't test Media Player with authentication. Il will check your PR.

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.