Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JSON API to get a screenshot and/or current dominant color. #602

Closed
Cheerpipe opened this issue Jul 18, 2023 · 3 comments · Fixed by #611
Closed

JSON API to get a screenshot and/or current dominant color. #602

Cheerpipe opened this issue Jul 18, 2023 · 3 comments · Fixed by #611
Assignees

Comments

@Cheerpipe
Copy link

Feature request

What problem does this feature solve?

I am trying to get and download a screen capture of what is processed by hyperHDR. I want this to create a dominant color sensor on Home Assistant.

Another aproach could be get an JSON API to expose the current dominant color value.

What does the proposed API look like?

What i am looking for is an JSON API that return the the current image being processed by HyperHDR (Like the Live "Screenshot" feature of the GUI.)

How should this be implemented in your opinion?

n/a

Are you willing to work on this yourself?

Should learn C/C++.

@awawa-dev
Copy link
Owner

Hi
How often do you plan to execute it? I'm afraid this is the perfect backdoor to kill HyperHDR/RPi with overload as such a potential command is not guarded and averaging over the whole image (or returning the image as a string/base64 encoded in the JSON result) is very time consuming? Alternatively, the average color of the LEDs for the selected instance?

@Cheerpipe
Copy link
Author

Cheerpipe commented Jul 18, 2023

Hi Awawa, thanks for your fast response.

I want to execute this just on certain media_player state changes (Ex: to playing, to pause and track changed) using the built in home assistant color quantizer.

Also like the idea of get the average color of leds for a specific instance instance. It should works well and it is cheaper for the cpu cause i may create a instance with just a few leds to make the math easier.

@awawa-dev
Copy link
Owner

Implemented in #611

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants