sindrebroch / ha-magicmirror

Custom HomeAssistant-integration for MagicMirror
Apache License 2.0
14 stars 0 forks source link

Just tried the beta integration and your own fork of remote - still shows issues on 'screencast' on rasbperry pi buster #14

Closed fribse closed 8 months ago

fribse commented 2 years ago

Version of the custom_component

Integration: 1.5.0b2 sindrebroch fork of Remote Control

Configuration

Added via GUI

Describe the bug

When I uncomment the screencast integration from the config, the integration immediately goes on the fritz. Just wanted to test if the problem was solved.

Debug log


Denne fejl stammer fra en brugerdefineret integration.

Logger: custom_components.magicmirror
Source: custom_components/magicmirror/api.py:85
Integration: Magic Mirror (documentation, issues)
First occurred: 20.24.25 (1 occurrences)
Last logged: 20.24.25

Unexpected error fetching magicmirror data: Response not 200 OK <ClientResponse(http://10.11.12.17:8080/api/brightness) [400 Bad Request]> <CIMultiDictProxy('Access-Control-Allow-Origin': '*', 'X-DNS-Prefetch-Control': 'off', 'Expect-CT': 'max-age=0', 'X-Frame-Options': 'SAMEORIGIN', 'Strict-Transport-Security': 'max-age=15552000; includeSubDomains', 'X-Download-Options': 'noopen', 'X-Content-Type-Options': 'nosniff', 'X-Permitted-Cross-Domain-Policies': 'none', 'Referrer-Policy': 'no-referrer', 'X-XSS-Protection': '0', 'Content-Type': 'application/json; charset=utf-8', 'Content-Length': '166', 'Etag': 'W/"a6-7TFy9clM9rwQNiht2z4gvOP9Avg"', 'Date': 'Sat, 25 Jun 2022 18:24:25 GMT', 'Connection': 'keep-alive', 'Keep-Alive': 'timeout=5')>
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 191, in _async_refresh
    self.data = await self._async_update_data()
  File "/config/custom_components/magicmirror/coordinator.py", line 64, in _async_update_data
    brightness: QueryResponse = await self.api.get_brightness()
  File "/config/custom_components/magicmirror/api.py", line 212, in get_brightness
    return QueryResponse.from_dict(await self.get(API_BRIGHTNESS))
  File "/config/custom_components/magicmirror/api.py", line 108, in get
    return await self.handle_request(get)
  File "/config/custom_components/magicmirror/api.py", line 85, in handle_request
    raise Exception(f"Response not 200 OK {resp}")
Exception: Response not 200 OK <ClientResponse(http://10.11.12.17:8080/api/brightness) [400 Bad Request]>
<CIMultiDictProxy('Access-Control-Allow-Origin': '*', 'X-DNS-Prefetch-Control': 'off', 'Expect-CT': 'max-age=0', 'X-Frame-Options': 'SAMEORIGIN', 'Strict-Transport-Security': 'max-age=15552000; includeSubDomains', 'X-Download-Options': 'noopen', 'X-Content-Type-Options': 'nosniff', 'X-Permitted-Cross-Domain-Policies': 'none', 'Referrer-Policy': 'no-referrer', 'X-XSS-Protection': '0', 'Content-Type': 'application/json; charset=utf-8', 'Content-Length': '166', 'Etag': 'W/"a6-7TFy9clM9rwQNiht2z4gvOP9Avg"', 'Date': 'Sat, 25 Jun 2022 18:24:25 GMT', 'Connection': 'keep-alive', 'Keep-Alive': 'timeout=5')>
sindrebroch commented 2 years ago

Yeah I haven`t really done anything to address that. I have only added a few endpoints to expose more information to enable update-entities in HA.

It's not easy to fix your issue since I have no way to reproduce it, and have no idea what the problem is. Also the codebase is a bit complicated imo, so I don't think I'll invest a lot of time just looking around without knowing what to look for.

If you find any more information about your issue, feel free to post it here, and I can keep it in mind if something comes up.

Also, didn't recreating your mirror last time fix your issues?

fribse commented 2 years ago

I'll try and poke around. If I install with bullseye of raspberry pi os, it works, but then I can't rotate the screen. My monitor does not accept the refresh rate on the rotate screen, when it's done from the gui's screen configuration. I can't get it to rotate the screen in config.txt under bullseye.

sindrebroch commented 11 months ago

@fribse Have you tried the method of rotating the screen from the wiki?

I tried reinstalling on the lastest Raspberry Pi OS, with my raspberry pi 3b+, and that seemed to work. And also the wiki mentions something about a GL-driver making the rotation of the display not work. I think the @xrandr --output HDMI-1 --rotate right made it work for me.

fribse commented 11 months ago

I'll have a try, I've frozen the mirror on an old version, as that worked, but it would be lovely to have it updated, and have everything working, so I'll have a stab at it, I have an extra RPi I can test with...

fribse commented 8 months ago

I've gone to bullseye now, so this report is irrelevant, will test with screencast again...