@mumblebaj
After updating and reload, I. got Undefined / NaN
What can this be?

@mumblebaj
After updating and reload, I. got Undefined / NaN
What can this be?

@mumblebaj
I like what you did!
Keep up the good work!!
Added an issue for the dutch translations.
When I give command
pi@MagicMirror:~ $ WAYLAND_DISPLAY='wayland-1' wlr-randr --output HDMI-A-1
HDMI-A-1 "Samsung Electric Company SyncMaster 0x00000001 (HDMI-A-1)"
Physical size: 700x390 mm
Enabled: yes
Modes:
720x400 px, 70.082001 Hz
640x480 px, 59.939999 Hz
640x480 px, 60.000000 Hz
640x480 px, 66.667000 Hz
640x480 px, 72.808998 Hz
640x480 px, 75.000000 Hz
720x480 px, 59.939999 Hz
720x480 px, 59.939999 Hz
720x480 px, 60.000000 Hz
720x480 px, 60.000000 Hz
720x576 px, 50.000000 Hz
800x600 px, 60.317001 Hz
800x600 px, 72.188004 Hz
800x600 px, 75.000000 Hz
832x624 px, 74.551003 Hz
1024x768 px, 60.004002 Hz
1024x768 px, 70.069000 Hz
1024x768 px, 75.028999 Hz
1280x720 px, 50.000000 Hz
1280x720 px, 50.000000 Hz
1280x720 px, 59.939999 Hz
1280x720 px, 60.000000 Hz
1280x720 px, 60.000000 Hz
1152x864 px, 75.000000 Hz
1280x800 px, 59.910000 Hz
1440x900 px, 59.901001 Hz
1280x1024 px, 60.020000 Hz
1280x1024 px, 75.025002 Hz
1600x900 px, 60.000000 Hz
1680x1050 px, 59.882999 Hz
1920x1080 px, 23.976000 Hz
1920x1080 px, 24.000000 Hz
1920x1080 px, 25.000000 Hz
1920x1080 px, 29.969999 Hz
1920x1080 px, 30.000000 Hz
1920x1080 px, 50.000000 Hz
1920x1080 px, 50.000000 Hz
1920x1080 px, 59.939999 Hz
1920x1080 px, 60.000000 Hz
1920x1080 px, 60.000000 Hz (preferred, current)
Position: 0,0
Transform: 270
Scale: 1.000000
@sdetweil Maybe I don’t understand.
WAYLAND_DISPLAY=wayland-0 still gives wayland-1 in npm run start:wayland.
wlr_randr gives
pi@MagicMirror:~/MagicMirror $ wlr_randr
-bash: wlr_randr: command not found
By the way, my PIR command do work
onCommand: "WAYLAND_DISPLAY='wayland-1' wlr-randr --output HDMI-A-1 --on --transform 270 --mode='1920x1080'",
offCommand: "WAYLAND_DISPLAY='wayland-1' wlr-randr --output HDMI-A-1 --off",
@sdetweil said in V2.31.0 unable to start:
WAYLAND_DISPLAY=wayland-x
In terminal window I typed WAYLAND_DISPLAY=wayland-1
Then I did “env”, nothing changed.
npm run start:wayland still gives the same error.
@sdetweil It seems it’s not set
pi@MagicMirror:~ $ env
SHELL=/bin/bash
NO_AT_BRIDGE=1
PWD=/home/pi
LOGNAME=pi
XDG_SESSION_TYPE=tty
MOTD_SHOWN=pam
HOME=/home/pi
LANG=en_GB.UTF-8
LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=00:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.wim=01;31:*.swm=01;31:*.dwm=01;31:*.esd=01;31:*.avif=01;35:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.webp=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:*~=00;90:*#=00;90:*.bak=00;90:*.old=00;90:*.orig=00;90:*.part=00;90:*.rej=00;90:*.swp=00;90:*.tmp=00;90:*.dpkg-dist=00;90:*.dpkg-old=00;90:*.ucf-dist=00;90:*.ucf-new=00;90:*.ucf-old=00;90:*.rpmnew=00;90:*.rpmorig=00;90:*.rpmsave=00;90:
SSH_CONNECTION=192.168.0.200 57994 192.168.0.47 22
XDG_SESSION_CLASS=user
TERM=xterm-256color
USER=pi
SHLVL=1
XDG_SESSION_ID=4
XDG_RUNTIME_DIR=/run/user/1000
SSH_CLIENT=192.168.0.200 57994 22
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/games:/usr/games
DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus
SSH_TTY=/dev/pts/0
OLDPWD=/home/pi/.config
TEXTDOMAIN=Linux-PAM
_=/usr/bin/env
pi@MagicMirror:~ $
How do I set this?
@htilburgs
I took a new SD Card and installed everything from fresh.
Some information:
cat /sys/firmware/devicetree/base/model
Raspberry Pi 4 Model B Rev 1.4
cat /etc/debian_version
12.10
cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 12 (bookworm)"
NAME="Debian GNU/Linux"
VERSION_ID="12"
VERSION="12 (bookworm)"
VERSION_CODENAME=bookworm
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
uname -a
Linux MagicMirror 6.12.20+rpt-rpi-v8 #1 SMP PREEMPT Debian 1:6.12.20-1+rpt1~bpo12+1 (2025-03-19) aarch64 GNU/Linux
node -v
v22.14.0
npm -v
10.9.2
When I start MagicMirror with “npm run start”, then everything seems to work.
pm2 start MagicMirror works and seems to start MagicMirror in Wayland
npm run start:wayland still gives an error
pi@MagicMirror:~/MagicMirror $ npm run start:wayland
> magicmirror@2.31.0 start:wayland
> WAYLAND_DISPLAY="${WAYLAND_DISPLAY:=wayland-1}" ./node_modules/.bin/electron js/electron.js --enable-features=UseOzonePlatform --ozone-platform=wayland
[2025-04-15 21:25:47.140] [LOG] Starting MagicMirror: v2.31.0
[2025-04-15 21:25:47.175] [LOG] Loading config ...
[2025-04-15 21:25:47.179] [LOG] config template file not exists, no envsubst
[2025-04-15 21:25:47.752] [INFO] Checking config file /home/pi/MagicMirror/config/config.js ...
[2025-04-15 21:25:47.874] [INFO] Your configuration file doesn't contain syntax errors :)
[2025-04-15 21:25:47.876] [INFO] Checking modules structure configuration ...
[2025-04-15 21:25:47.988] [INFO] Your modules structure configuration doesn't contain errors :)
[2025-04-15 21:25:47.991] [LOG] Loading module helpers ...
[2025-04-15 21:25:47.992] [LOG] No helper found for module: alert.
[2025-04-15 21:25:48.002] [LOG] Initializing new module helper ...
[2025-04-15 21:25:48.004] [LOG] Module helper loaded: updatenotification
[2025-04-15 21:25:48.004] [LOG] No helper found for module: clock.
[2025-04-15 21:25:48.005] [LOG] No helper found for module: MMM-CalendarExt3Agenda.
[2025-04-15 21:25:48.005] [LOG] No helper found for module: weather.
[2025-04-15 21:25:48.061] [LOG] Initializing new module helper ...
[2025-04-15 21:25:48.061] [LOG] Module helper loaded: MMM-Formula1
[2025-04-15 21:25:48.099] [LOG] Initializing new module helper ...
[2025-04-15 21:25:48.100] [LOG] Module helper loaded: MMM-MyGarbage
[2025-04-15 21:25:48.225] [LOG] Initializing new module helper ...
[2025-04-15 21:25:48.225] [LOG] Module helper loaded: calendar
[2025-04-15 21:25:48.270] [LOG] Initializing new module helper ...
[2025-04-15 21:25:48.271] [LOG] Module helper loaded: MMM-OnSpotify
[2025-04-15 21:25:48.298] [LOG] Initializing new module helper ...
[2025-04-15 21:25:48.298] [LOG] Module helper loaded: MMM-Bring
[2025-04-15 21:25:48.487] [LOG] Initializing new module helper ...
[2025-04-15 21:25:48.487] [LOG] Module helper loaded: MMM-Tado
[2025-04-15 21:25:48.489] [LOG] Initializing new module helper ...
[2025-04-15 21:25:48.489] [LOG] Module helper loaded: MMM-MyHomeWizard
[2025-04-15 21:25:48.491] [LOG] Initializing new module helper ...
[2025-04-15 21:25:48.492] [LOG] Module helper loaded: MMM-SystemMonitor
[2025-04-15 21:25:48.523] [LOG] Initializing new module helper ...
[2025-04-15 21:25:48.523] [LOG] Module helper loaded: MMM-network-signal
[2025-04-15 21:25:48.525] [LOG] Initializing new module helper ...
[2025-04-15 21:25:48.526] [LOG] Module helper loaded: MMM-Universal-Pir
[2025-04-15 21:25:48.526] [LOG] All module helpers loaded.
[2025-04-15 21:25:48.536] [LOG] Starting server on port 8080 ...
[2025-04-15 21:25:49.396] [LOG] Server started ...
[2025-04-15 21:25:49.401] [LOG] Connecting socket for: updatenotification
[2025-04-15 21:25:49.407] [LOG] Starting module helper: updatenotification
[2025-04-15 21:25:49.409] [LOG] Connecting socket for: MMM-Formula1
[2025-04-15 21:25:49.414] [LOG] Starting module: MMM-Formula1
[2025-04-15 21:25:49.418] [LOG] Connecting socket for: MMM-MyGarbage
[2025-04-15 21:25:49.419] [LOG] Starting node_helper for module: MMM-MyGarbage
[2025-04-15 21:25:49.420] [LOG] Connecting socket for: calendar
[2025-04-15 21:25:49.422] [LOG] Starting node helper for: calendar
[2025-04-15 21:25:49.424] [LOG] Connecting socket for: MMM-OnSpotify
[2025-04-15 21:25:49.427] [LOG] [MMM-OnSpotify] by Fabrizz >> Node helper loaded.
[2025-04-15 21:25:49.428] [LOG] Connecting socket for: MMM-Bring
[2025-04-15 21:25:49.430] [LOG] Connecting socket for: MMM-Tado
[2025-04-15 21:25:49.438] [LOG] - MMM-Tado: Refresh token loaded.
[2025-04-15 21:25:49.440] [LOG] Connecting socket for: MMM-MyHomeWizard
[2025-04-15 21:25:49.443] [LOG] Starting node_helper for: MMM-MyHomeWizard
[2025-04-15 21:25:49.444] [LOG] Connecting socket for: MMM-SystemMonitor
[2025-04-15 21:25:49.446] [LOG] Starting module helper: MMM-SystemMonitor
[2025-04-15 21:25:49.450] [LOG] Connecting socket for: MMM-network-signal
[2025-04-15 21:25:49.452] [LOG] MMM-network-signal helper started ...
[2025-04-15 21:25:49.454] [LOG] Connecting socket for: MMM-Universal-Pir
[2025-04-15 21:25:49.457] [LOG] Sockets connected & modules started ...
[2025-04-15 21:25:50.513] [LOG] Launching application.
[2025-04-15 21:25:51.278] [INFO] System information:
### SYSTEM: manufacturer: Raspberry Pi Foundation; model: Raspberry Pi 4 Model B Rev 1.4; virtual: false
### OS: platform: linux; distro: Debian GNU/Linux; release: 12; arch: arm64; kernel: 6.12.20+rpt-rpi-v8
### VERSIONS: electron: 35.1.5; used node: 22.14.0; installed node: 22.14.0; npm: 10.9.2; pm2: 5.4.3
### OTHER: timeZone: Europe/Amsterdam; ELECTRON_ENABLE_GPU: undefined
/home/pi/MagicMirror/node_modules/electron/dist/electron exited with signal SIGTRAP
pi@MagicMirror:~/MagicMirror $
I was just wondering, couldn’t it have something to do with the WAYLAND_DISPLAY parameter?
WAYLAND_DISPLAY="${WAYLAND_DISPLAY:=wayland-1
I think I take a new SD Card and do an install from scratch to see what happens.
@sdetweil
Same error😔
npm run start
npm run start:wayland
@sdetweil
I did the update, it didn’t work afterwards.
Then I’ve tried sudo apt-get update / upgrade, still no luck
Today I renamed MagicMirror to .org and did a new install of MagicMirror, same result.
So now I’m out of options…
@sdetweil said in V2.31.0 unable to start:
ps -ef | grep way
ps -ef | grep labwc
pi@mm:~/MagicMirror $ ps -ef | grep way
vnc 739 1 0 Apr09 ? 00:00:00 /bin/sh /usr/sbin/wayvnc-run.sh
vnc 759 739 0 Apr09 ? 00:00:00 wayvnc --render-cursor --detached --gpu --config /etc/wayvnc/config --socket /tmp/wayvnc/wayvncctl.sock
root 1605 1 0 Apr09 ? 00:02:02 python /usr/sbin/wayvnc-control.py
lightdm 801759 801726 0 19:20 ? 00:00:02 /usr/bin/rpi-connectd -socket /run/user/106/rpi-connect-wayvnc.sock
lightdm 801764 801648 0 19:20 ? 00:00:00 /usr/bin/wayfire -c /usr/share/greeter.ini
pi 810604 974 0 19:24 ? 00:00:02 /usr/bin/rpi-connectd -socket /run/user/1000/rpi-connect-wayvnc.sock
lightdm 870748 1 0 19:32 ? 00:00:00 /usr/bin/Xwayland -auth /home/lightdm/.Xauthority :0 -rootless -core -terminate 10 -listenfd 30 -listenfd 31 -displayfd 59 -wm 56
pi 878864 735951 0 21:00 pts/0 00:00:00 grep --color=auto way
pi@mm:~/MagicMirror $ ps -ef | grep labwc
pi 878897 735951 0 21:00 pts/0 00:00:00 grep --color=auto labwc
pi@mm:~/MagicMirror $
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 12 (bookworm)
Release: 12
Codename: bookworm
@sdetweil Same error:
[875833:0410/200935.088653:ERROR:wayland_connection.cc(198)] Failed to connect to Wayland display: No such file or directory (2)
[875833:0410/200935.088864:ERROR:ozone_platform_wayland.cc(264)] Failed to initialize Wayland platform
[875833:0410/200935.088893:ERROR:env.cc(258)] The platform failed to initialize. Exiting.
/home/pi/MagicMirror/node_modules/electron/dist/electron exited with signal SIGSEGV
After upgrade to v2.31.0 MM will not start.
PM2 doesn’t show errors, but with NPM START I become this error:
[2025-04-10 19:35:00.301] [LOG] Sockets connected & modules started ...
Invalid MIT-MAGIC-COOKIE-1 key
[873086:0410/193500.307514:ERROR:ozone_platform_x11.cc(245)] Missing X server or $DISPLAY
[873086:0410/193500.308038:ERROR:env.cc(258)] The platform failed to initialize. Exiting.
/home/pi/MagicMirror/node_modules/electron/dist/electron exited with signal SIGSEGV
I did a new install of MM, same error.
@Klinge
I had the same issue with MMM-Universal-Pir.
The maker had made a comment ABOUT It in the readme, with the correct commands after mine e-mail.
Read the readme and you are How to do.
@sdetweil In the netherlands, we do have that!
Fortunately, otherwise I would not have been able to write this MagicMirror module ;-)
MMM-MyHomeWizard is a MagicMirror module that shows the information from the HomeWizard P1 meter and/or the HomeWizard WaterMeter.
The HomeWizard P1 Meter gives you detailed insight into your gas consumption, electricity consumption and solar surplus.
The HomeWizard Watermeter gives you live insight into your water consumption.
Homepage: MMM-MyHomeWizard


@sdetweil
Meanwhile I was doing this, and I found the error (stupid me)
start: function () {
Log.info("Starting module: " + this.name);
requiresVersion: "2.9.0";
// Set locales
if (this.config.P1_IP != null) {
this.urlP1 = "http://" + this.config.P1_IP + "/api/v1/data/";
} else {
this.urlP1 = "https://dummyjson.com/c/7e24-36ab-48e0-a96d";
}
if (this.config.WM_IP != null) {
this.urlWM = "http://" + this.config.WM_IP + "/api/v1/data/";
} else {
this.urlWM = "https://dummyjson.com/c/704a-9a96-4845-bc72";
}
// this.urlP1 = "http://" + this.config.P1_IP + "/api/v1/data/";
// this.urlWM = "http://" + this.config.WM_IP + "/api/v1/data/";
this.MHW_P1 = []; // <-- Create empty MHW_P1 array
this.MHW_WM = []; // <-- Create empty MHW_WM array
this.scheduleUpdate(); // <-- When the module updates (see below)
},
The line with "requiresVersion: “2.9.0”; " was ending with an “,” instead of “;”
without the “if” statement, I don’t get a failure with a “,”
So changed it now into “;” and everythins seems to work.
I continue testing.
@MMRIZE Thanks for the alternative way. I’m going to look into it.
So with the “promise” statement, it looks like I can eleminate the node_helper.js