Skip to content
This repository has been archived by the owner on Mar 6, 2022. It is now read-only.

delay functionality when switching both, via HDMI and a relay #86

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

dangrie158
Copy link

Hi,
for my personal MM Project I use a control line on the display to control the backlight of the display. This has the benefit of being very fast, as the display controller does not need to boot after switching on. However, to save power, I also want to switch of the controller if the display is off for a longer time, which is easiest over the HDMI control.

I thus added the the config option switchhHDMI to allow setting a relayPin in the configuration without disabling the HDMI switching and hdmiOffDelay to control the delay before powering off the controller via HDMI after switching off only the backlight (over a relay).

However, this causes the display to show solid white backfill if the display backlight (e.g. relay) is switched on before the controller is booted back up. I thus also added the relayOnDelay configuration option to delay the switching of the relay if motion is detected AND the display was switched off over HDMI, otherwise the backlight switches instantly.

With these changes I'm able to benefit of the fast switching when motion is detected with short delays and only need to wait until the controller started up once no motion was detected for e.g. 30 minutes.

I documented the new configuration options in the readme and also set the default values to leave the behaviour unchanged when people upgrade the module. Maybe this is useful for others.

@eric-h-st
Copy link
Collaborator

Could someone with matching hardware test this one?
Thank you.

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

Successfully merging this pull request may close these issues.

2 participants