@rkorell said:
cd ~/MagicMirror/modules/MMM-PresenceScreenControl
git pull
rm -rf node_modules package-lock.json
npm install
Better:
rm -f node_modelues package-lock.json
git pull
npm install
Otherwise the git pull wil not work.
Issue 1:
When time is up, the screen doesn’t go off. Dim works, but then when the screen should go off, it is not dimmed anymore and on. Debug says:
[2026-03-06 18:16:29.150] [LOG] [MMM-PresenceScreenControl] [updatePresence] pirPresence=false, touchPresence=false, presence=true, newPresence=false
[2026-03-06 18:17:30.311] [LOG] [MMM-PresenceScreenControl] [startCounter] Counter expired: presence=false, pirPresence=false, calling updateScreen(false)
[2026-03-06 18:17:30.323] [LOG] [MMM-PresenceScreenControl] [updateScreen] on=false, cmd="DISPLAY=:0 xrandr --output HDMI-1 --off"
[2026-03-06 18:17:30.467] [LOG] [MMM-PresenceScreenControl] [updateScreen] SUCCESS: executed "DISPLAY=:0 xrandr --output HDMI-1 --off"
Issue 2:
When module is started, and there is no movement, the mirror stays on and counter says 00:00.
Until it see movement, than counter start and after the counter is should go out (not, see issue 1). Debug after just started:
[2026-03-06 18:20:32.007] [LOG] [MMM-PresenceScreenControl] [startCounter] Counter expired: presence=false, pirPresence=false, calling updateScreen(false)
[2026-03-06 18:20:32.012] [LOG] [MMM-PresenceScreenControl] [updateScreen] on=false, cmd="DISPLAY=:0 xrandr --output HDMI-1 --off"
[2026-03-06 18:20:32.132] [LOG] [MMM-PresenceScreenControl] [updateScreen] SUCCESS: executed "DISPLAY=:0 xrandr --output HDMI-1 --off"
Current config (for testing):
{
module: "MMM-PresenceScreenControl",
position: "bottom_right",
disabled: false,
config: {
mode: "PIR",
pirGPIO: 17,
onCommand: "DISPLAY=:0 xrandr --output HDMI-1 --mode 1920x1200 --rotate left",
offCommand: "DISPLAY=:0 xrandr --output HDMI-1 --off",
counterTimeout: 30,
autoDimmer: false,
autoDimmerTimeout: 60,
style: 2,
colorFrom: "red",
colorTo: "lime",
colorCronActivation: "cornflowerblue",
showPresenceStatus: false,
debug: "on",
resetCountdownWidth: false
}
},
Pi OS version:
PRETTY_NAME="Debian GNU/Linux 13 (trixie)"
NAME="Debian GNU/Linux"
VERSION_ID="13"
VERSION="13 (trixie)"
VERSION_CODENAME=trixie
DEBIAN_VERSION_FULL=13.3
Mirror information:
- SYSTEM: manufacturer: Raspberry Pi Foundation; model: Raspberry Pi 4 Model B Rev 1.4; virtual: false; MM: 2.34.0
- OS: platform: linux; distro: Debian GNU/Linux; release: 13; arch: arm64; kernel: 6.12.62+rpt-rpi-v8
- VERSIONS: electron: 39.7.0; used node: 22.22.0; installed node: 22.21.1; npm: 10.9.4; pm2: 6.0.14
- ENV: XDG_SESSION_TYPE: tty; MM_CONFIG_FILE: undefined
WAYLAND_DISPLAY: undefined; DISPLAY: :0; ELECTRON_ENABLE_GPU: undefined
- RAM: total: 1845.58 MB; free: 972.54 MB; used: 873.04 MB
- OTHERS: uptime: 5652 minutes; timeZone: Europe/Amsterdam
Node version:
v22.21.1
Currently I’m using MMM-Pir from Coernel82/MMM-Pir and this works fine. But because he doensn’t maintain this module, I thougt to go over.
I use these settings in this module:
mode: 3 - use wlr-randr (For raspbian 12 with wayfire compositor)
wrandrForceRotation: "270",
wrandrForceMode: null,
waylandDisplayName: "wayland-0",
Pir mode: 1,
gpio: 17,
triggerMode : "LH" - motion signal is triggered when sensor goes from LOW (0, no-motion) to HIGH (1, motion)