delay functionality when switching both, via HDMI and a relay
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.
Could someone with matching hardware test this one? Thank you.