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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 andhdmiOffDelay
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.