@rkorell
Oke, done some testing:
With the ‘new’ strings, I get:
onCommand: "WAYLAND_DISPLAY=wayland-0 wlr-randr --output HDMI-A-1 --on --mode 1920x1080 --transform 270",
offCommand: "WAYLAND_DISPLAY=wayland-0 wlr-randr --output HDMI-A-1 --off",
[ERROR] [MMM-PresenceScreenControl] [updateScreen] ERROR: Error: Command failed: WAYLAND_DISPLAY=wayland-0 wlr-randr --output HDMI-A-1 --on --mode 1920x1080 --transform 270
unknown output HDMI-A-1
Why this message, I don’t know.
After a reboot this message didn’t show again.
Then I stopped MagicMirror and did the same command from the commandline WAYLAND_DISPLAY=wayland-0 wlr-randr --output HDMI-A-1 --off
After 6 seconds my display comes on again.
So it isn’t coming from MagicMirror, but from my system.
I created a simple Python3 script to turn off and on my monitor. Same problem.
Next step:
I took a new SD Card and installed a fresh copy of Trixie.
Didn’t do anything else, no updates or something else and tried again with WAYLAND_DISPLAY=wayland-0 wlr-randr --output HDMI-A-1 --off from the command prompt.
Display goes off and after 6 seconds back on again.
So I excluded MagicMirror. What else can it be?
Next step:
I took an other RPI4b with the new SD Card from previous step. Repeated the test, but still same result. Monitor goes on after 6 seconds. So it is not MagicMirror, not the RPI. But why it works with MMM-PIR and not with MMM-PresenceScreenControl. It is still a riddle for me.
Next step:
Original RPI with original SD Card and installed MMM-Universal-Pir. Same result, after 6 seconds screen on.
So I excluded MagicMirror, SD Card, Trixie installation and RPI. It must have something to do with my monitor?!?
Did something happen? Not that I know.
After doing a search on the big WWW, I found an interesting article that described exact the same issue I was having.
https://forums.raspberrypi.com/viewtopic.php?t=363966
So I searched for my RemoteControl and search for a setting
that automatically scan its input sources (not easy if your MagicMirror screen is rotated 270° ;-)
And I found this setting and indeed it was standing on auto scan. I put it on HDMI as only source and tried it again:
YES, IT IS WORKING!!!
And even better than before, now my monitor turns completly off after 15 min. of no signal. So instead of using 75W when on, 26W in standby, it now uses 0W after 15 minutes (it’s a setting on the monitor).
Activating the PIR, it turns back on!
So with this I hope that if somebody else has this problem, they can solve it to.
Ralf, thanks for all the help and trying to solve it with me.
I’m looking forward for the startupGracePeriod parameter and think this is going to make the module fully as I like it.
Thank you for your great work with this module and a grownup replacement for MMM-Pir!!!