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

Automatic LED Power Off on Static Image for Extended Period #625

Open
gghisellini opened this issue Aug 17, 2023 · 1 comment
Open

Automatic LED Power Off on Static Image for Extended Period #625

gghisellini opened this issue Aug 17, 2023 · 1 comment

Comments

@gghisellini
Copy link

Feature request

What problem does this feature solve?

In scenarios where the content displayed remains static for an extended period (e.g., paused media, static screens, etc.), the LEDs continue to stay on, consuming power and possibly reducing the lifespan of the LEDs. Additionally, a constantly lit LED in such situations can be distracting for some users.

What does the proposed API look like?

An API endpoint or configuration option that allows:

  1. Setting a user-defined inactivity threshold (in minutes), after which the LEDs should turn off if the content remains static.
  2. An optional setting to define what "static" means (e.g., less than X% change in the overall picture for the set duration).
  3. A function to wake the LEDs once a significant change in the image occurs or when media playback continues.

How should this be implemented in your opinion?

  1. Content Monitoring: Utilize the existing image processing mechanism in HyperHDR to analyze the content being displayed frame by frame. Specifically, measure the delta or percentage change in RGB values between consecutive frames to determine if there's any significant content alteration.

  2. Inactivity Timer: Once the percentage change in content drops below a user-defined threshold (indicating that the screen is relatively "static"), initiate an inactivity timer. The user can set this threshold in the settings – for example, if they want to consider a change of less than 2% as "static", they can set the threshold to 2%.

  3. LED Power-Off Mechanism: When the inactivity timer reaches a user-defined duration (let's say 10 minutes of static content), the system should send a command to the LEDs to power them off. This helps save power and prevents any prolonged static lighting that could be distracting or unnecessary.

  4. Timer Reset Mechanism: Any significant change in content above the user-set static threshold should immediately reset the inactivity timer. This ensures that the LEDs won't stay off if there's a sudden change in media or if playback continues after being paused.

  5. UI Integration: Integrate this feature within the HyperHDR settings. This would involve adding a new section or tab where users can:

  • Toggle this feature on or off.
  • Set the 'static' content percentage threshold.
  • Define the inactivity duration after which LEDs should be turned off.

The logic behind this implementation ensures that the LEDs won't turn off during a quiet movie scene or when content changes are minimal. Only prolonged inactivity or static scenes would trigger the LED shut-off, making it both energy-efficient and user-friendly.

Are you willing to work on this yourself?

Yes, I am willing to help out with this feature. My primary expertise is in Node.js and React. If these technologies can be utilized for the implementation, I'd be happy to contribute actively.

@rorosaurus
Copy link

+1! It may be more complex, but it would probably satisfy more cases if it could detect a slow, idle slideshow (like Chromecast Ambient Mode) and turn off the LEDs for that too.

Perhaps something like comparing the difference between frames? Configurable threshold % and time until idle. Once idle, require significant delta between frames for a configurable length of time before restoring powered on state. Just a thought.

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

No branches or pull requests

2 participants