Hi Ralf and Karsten,
Thanks for your support. I tried, but did not work unfortunately. Still the monitor goes on for no reason.
So I switched now to X11, and updated the config file, AND finally it works. Here my command:
{
module: “MMM-Universal-Pir”,
position: “top_left”,
config: {
gpioCommand: “/usr/bin/gpiomon -e rising -c 0 22”,
//onCommand: “WAYLAND_DISPLAY=‘wayland-1’ wlr-randr --output HDMI-A-1 --on”,
//offCommand: “WAYLAND_DISPLAY=‘wayland-1’ wlr-randr --output HDMI-A-1 --off”,
//onCommand: “wlr-randr --output HDMI-A-1 --on”,
//offCommand: “wlr-randr --output HDMI-A-1 --off”,
//onCommand: “echo on | sudo tee /sys/class/drm/card0-HDMI-A-1/status”,
//offCommand: “echo off | sudo tee /sys/class/drm/card0-HDMI-A-1/status”,
//onCommand: “/usr/local/bin/hdmi-on.sh”,
//offCommand: “/usr/local/bin/hdmi-off.sh”,
//X11:
onCommand: “xrandr --output HDMI-1 --mode 1920x1080 --rate 60”,
offCommand: “xrandr --output HDMI-1 --off”,
//onCommand: “xrandr --output HDMI-1 --on”,
//offCommand: “xrandr --output HDMI-1 --off”,
//onCommand: “vcgencmd display_power 1”,
//offCommand: “vcgencmd display_power 0”,
//onCommand: “wlr-randr --output HDMI-1 --on”,
//offCommand: “wlr-randr --output HDMI-1 --off”,
deactivateDelay: 40 * 1000,
}
},
My assumption is that the auto-switch to On of the monitor comes from raspi-connect. With VNC this is not the case. But this is not thoroughly tested, just gut feel.
Maybe a last question you might help me with: with the now working offCommand my VNC window on the PC shrinks to tiny. Any suggestion how to avoid?
Best,
Hobbes aka Dirk