@pddh I have my MM in the bathroom.
Actual solution - change the wiring (a bit)
I already use ioBroker for some SmartHome magic.
So i installed a shelly to catch the switch and set the shelly to detaced. With this- i can activate/deactive the power only with the shelly-app, ioBroker, Alexa e.g. So i have power the whole time behind my Mirror like i want an no one can turn off the power accidently. Oh- i fogot to mention… i have a double switch installed. One for the regular light and one for the power behind the mirror.
2nd step- I have MQTT-service installed on the RPI (found the script online). WIth the “vcgencmd” you can turn off/ on the monitor signal to save some power, when not needed. Man PIR-Modules do the same.
3rd step- let ioBroker (is the MQTT broker in this case) set the MQTT Mesasage - “Montitor on” e.g… when the switch is pressed on. And “monitor off” when the switch is off.
So now you have a fully running MM and when someone is pressing the switch (or using the iphone-Home app, or using Alexa or or or…) the the MQTT state is set to “Monitor on” and the RPI (which has subsrcibed on that channel) is seeing the “Monitor on” command and starts “vcgencmd_1”.
So the Monitor ist switched off.
If you dont have any Smart Home Handler… You can have the MQTT-Broker on the RPI instead and when you use Tasmota you can configure Tasmota to communicate directly. So no need for ioBroker.
I hope you can follow my “instructions”.