I think you’re right in calling it a switch. You can see it clearly in the screenshot at the arrow.
Read the statement by Michael Teeuw here.
Posts
-
RE: Switching the Magic Mirror display on/off
-
RE: Switching the Magic Mirror display on/off
First of all, thank you for your tips.
So, I use the module from ambarusa
origin https://github.com/ambarusa/MMM-HomeAssistant/ (fetch) origin https://github.com/ambarusa/MMM-HomeAssistant/ (push)
And use the following config
module: “MMM-HomeAssistant”, config: { mqttServer: “mqtt://192.168.100.xx”, mqttPort: 1883, username: “mqttxxxx”, password: “xxxxx”, deviceName: “MagicMirror xxxx”, autodiscoveryTopic: “homeassistant”, monitorControl: true, brightnessControl: true, moduleControl: true, monitorStatusCommand: “xrandr --query | awk \”/Screen/ {print ($8 > 320) ? ‘true’ : ‘false’}\“”, monitorOnCommand: “wlr-randr --output HDMI-A-1 --on --transform 90”, monitorOffCommand: “wlr-randr --output HDMI-A-1 --off”, // monitorOnCommand: “xrandr -d :0 --output HDMI-1 --auto --rotate right”, // monitorOffCommand: “xrandr -d :0 --output HDMI-1 --off”, pm2ProcessName: “mm”, }
As you can see, I use wlr-randr for on/off and rotate the monitor 90 degrees when switching it on.
-
Switching the Magic Mirror display on/off
I want to automate my MMMs via Home Assistant.
To do this, I installed the MMM-Home-Assistant module on my MM. The MMM is now also recognised as a device in Home Assistant (HA).
There is a control element called ‘Magic Mirror Bathroom’. I can use the button to switch the monitor display on and off.
But now I have the following problem.
When I press the button while the MM is running, the button first moves from right to left (i.e. from on to off) and the display is switched off. Just as it should be. But after about 2 seconds, the button moves back from left to right (from off to on). However, the display remains switched off.
If I want to turn the display back on, I have to press the button, which is now on the right (i.e. on), again so that it moves back to the left (off). Then, within the 2 seconds that the button is on the left (off), I have to press it again so that the button moves back to the right (on). Then the display turns back on.
Ultimately, I want to connect my MMM to a motion sensor so that the MMM monitor only runs when someone is in the room.
It would be really great if one of you could help me.
Thank you in advance.
-
RE: MMM-DWD-Pollen and MMM-pollen remain in status "loading"
@sdetweil Thank you again.
I thought, that default will display all pollen. It seems not.
But now it is running. -
MMM-DWD-Pollen and MMM-pollen remain in status "loading"
Hi,
Spring is coming and I wanted to install pollen modules.
So I installed two pollen modules MM-DWD-Pollen and MMM-pollen at once
Both modules remain in the ‘loading’ status.
Here I show you my configuration
{ module: "MMM-DWD-Pollen", position: "top_right", header: "Pollenwarnung", config: { updateInterval: 2 * 60 * 60 * 1000, // every 1 hour DWD_region: 42, // Ostwestfalen icon: true, // Show icons or not showNullValue: false, //Show value or symbol if value is 0 } }, { module: "MMM-pollen", position: "top_right", // This can be any of the regions. config: { // See 'Configuration options' for more information. locationLongitude: x.xxxxxx, locationLatitude: xx.xxxxxx, } },
When I start the MMM I got this log
[2025-02-18 15:47:06.959] [INFO] Checking git for module: MMM-DWD-Pollen [2025-02-18 15:47:07.387] [INFO] Checking git for module: MMM-pollen [2025-02-18 15:47:07.491] [LOG] MMM-DWD-Pollen: Success loading
and regarding the two instances from another DWD-Pollen forum post I got the following result
pi@raspi-mm-bad:~/MagicMirror $ netstat -plan|grep 8080 (Not all processes could be identified, non-owned process info will not be shown, you would have to be root to see it all.) tcp6 0 0 ::1:8080 :::* LISTEN 67920/electron.js tcp6 0 0 ::1:8080 ::1:54378 TIME_WAIT - tcp6 0 0 ::1:8080 ::1:57896 TIME_WAIT
Thank you for your tips :-)
-
RE: I am looking for a working PIR Modul/function
Thank you all for your tips.
Now I could realize it with the parameter
--transform 90
My complete configuration is
{ module: "MMM-Universal-Pir", position: "top_right", config: { gpioCommand: "gpiomon -r -b gpiochip0 17", onCommand: "wlr-randr --output HDMI-A-1 --on --transform 90", offCommand: "wlr-randr --output HDMI-A-1 --off", deactivateDelay: 180 * 1000, } },
and it works.
-
RE: I am looking for a working PIR Modul/function
@sdetweil @KristjanESPERANTO Now I finally had time to look into this problem further.
Thank you very much for your tips. The module works great.
But… I have installed the monitor vertically. This means that the MMM has to be displayed rotated by 90 degrees. When I start the MMM, it is displayed as intended. But as soon as the monitor is switched off and on again by the module, the display is no longer rotated. In other words, the MMM is then displayed as if the monitor is installed horizontally.
Incidentally, I set the rotated display via the Raspberry OS menu.
Do any of you have a tip on how to keep the display vertical even after movement has been recognised?
Many thanks in advance.
-
RE: Cannot find module 'undici' - 'npm install' doesn't work
@sdetweil Great, now it works.
Thank you for your help again
-
RE: Cannot find module 'undici' - 'npm install' doesn't work
Hi,
@sdetweil some minutes ago I updated my MMM with your scriptkling@raspi-mm-gaeste:~/MagicMirror $ bash -c "$(curl -sL https://raw.githubusercontent.com/sdetweil/MagicMirror_scripts/master/upgrade-script.sh)" apply update log will be in /home/kling/MagicMirror/installers/upgrade.log doing test run = false Node currently installed. Checking version number. Minimum Node version: v20.18.1 Installed Node version: v20.9.0 installing correct version of node and npm, please wait Check current Node installation ... Node currently installed. Checking version number. Minimum Node version: v20.18.1 Installed Node version: v20.18.1 No Node.js upgrade necessary. Check current NPM installation ... NPM currently installed. Checking version number. Minimum npm version: V10.8.2 Installed npm version: V10.8.2 No npm upgrade necessary. want /var/swap=200MByte, checking existing: keeping it saving custom.css local version 2.30.0 already same as master 2.30.0 restoring custom.css
After that I tried to start my MMM and now I got the same error message "Cannot find module ‘undici’.
kling@raspi-mm-gaeste:~/MagicMirror $ display=:0 npm start > magicmirror@2.30.0 start > npm run start:x11 > magicmirror@2.30.0 start:x11 > DISPLAY="${DISPLAY:=:0}" ./node_modules/.bin/electron js/electron.js [2025-02-13 16:04:02.858] [ERROR] App threw an error during load [2025-02-13 16:04:02.863] [ERROR] Error: Cannot find module 'undici' Require stack: - /home/kling/MagicMirror/js/app.js - /home/kling/MagicMirror/js/electron.js at Module._resolveFilename (node:internal/modules/cjs/loader:1232:15) at s._resolveFilename (node:electron/js2c/browser_init:2:121498) at Module._resolveFilename (/home/kling/MagicMirror/node_modules/module-alias/index.js:49:29) at Module._load (node:internal/modules/cjs/loader:1058:27) at c._load (node:electron/js2c/node_init:2:17025) at Module.require (node:internal/modules/cjs/loader:1318:19) at require (node:internal/modules/helpers:179:18) at Object.<anonymous> (/home/kling/MagicMirror/js/app.js:15:40) at Module._compile (node:internal/modules/cjs/loader:1484:14) at Module._extensions..js (node:internal/modules/cjs/loader:1564:10) at Module.load (node:internal/modules/cjs/loader:1295:32) at Module._load (node:internal/modules/cjs/loader:1111:12) at c._load (node:electron/js2c/node_init:2:17025) at Module.require (node:internal/modules/cjs/loader:1318:19) at require (node:internal/modules/helpers:179:18) at Object.<anonymous> (/home/kling/MagicMirror/js/electron.js:4:14) A JavaScript error occurred in the main process Uncaught Exception: Error: Cannot find module 'undici' Require stack: - /home/kling/MagicMirror/js/app.js - /home/kling/MagicMirror/js/electron.js at Module._resolveFilename (node:internal/modules/cjs/loader:1232:15) at s._resolveFilename (node:electron/js2c/browser_init:2:121498) at Module._resolveFilename (/home/kling/MagicMirror/node_modules/module-alias/index.js:49:29) at Module._load (node:internal/modules/cjs/loader:1058:27) at c._load (node:electron/js2c/node_init:2:17025) at Module.require (node:internal/modules/cjs/loader:1318:19) at require (node:internal/modules/helpers:179:18) at Object.<anonymous> (/home/kling/MagicMirror/js/app.js:15:40) at Module._compile (node:internal/modules/cjs/loader:1484:14) at Module._extensions..js (node:internal/modules/cjs/loader:1564:10) at Module.load (node:internal/modules/cjs/loader:1295:32) at Module._load (node:internal/modules/cjs/loader:1111:12) at c._load (node:electron/js2c/node_init:2:17025) at Module.require (node:internal/modules/cjs/loader:1318:19) at require (node:internal/modules/helpers:179:18) at Object.<anonymous> (/home/kling/MagicMirror/js/electron.js:4:14) [5112:0213/160403.943167:ERROR:gbm_wrapper.cc(74)] Failed to get fd for plane.: No such file or directory (2) [5112:0213/160403.943531:ERROR:gbm_wrapper.cc(257)] Failed to export buffer to dma_buf: No such file or directory (2)
So my question again, what did I wrong? It is necessary to install the MMM completely new?
Thank you.
Kind regards.
Klinge -
I am looking for a working PIR Modul/function
Hello,
I am looking for a working PIR module / function to turn off/on my monitor.
Every PIR module I have tried is either deprecated, abandoned or an error appears during installation.
I have tried the following modules
MMM-Pir
MMM-PIR
MMM-PIR-Sensor-Lite
MMM-PIR-Sensor
MMM-SimplePIRand this
https://www.putorius.net/using-pir-sensor-for-motion-detection.html
The one from putorius.net got me the furthest. But unfortunately the command to switch the monitor on/off works
vcgencmd display_power 0 > /dev/null vcgencmd display_power 1 > /dev/null
doesn´t work for me.
I would be really grateful if you could recommend a working PIR module or maybe you have an advice to turn on/off my monitor instead of the both commands.
Thank you very much.
Klinge