It worked with the pm2 way ! thanks
In mm.sh I wrote npm run server and everything is up n runnin again .
Thanks again !
It worked with the pm2 way ! thanks
In mm.sh I wrote npm run server and everything is up n runnin again .
Thanks again !
Hey!
Thanks for answering, and no I have not a backup of client SDcard,
BUT trust me, I will have that in the future… but I have backup of my shell scripts, so it feels pretty ok anyways.
Hello Folks
I got a little problem not directly with MM but in the same area its Xorg/xserver/xinit that makes me a bit confused,
I got the following setup - server runs MM -> client (raspberry pi) runs raspbian os(bookworm) with chromium in kiosk mode-> client
connected to computer screeen behind glass.
A couple a days ago I pulled the power plug from the client, after a while I inserted the poweplug again and the problem started
I have tried several things, remove and reinstalled xorg , changed user group, tried to remove xorg.conf but I couldnt find it.
now I could need some help, is it possible to solve my problem without wipe the sdcard and start over ?
and here is the xorg log :
X.Org X Server 1.21.1.7
X Protocol Version 11, Revision 0
[ 28.228] Current Operating System: Linux MMclient 6.6.51+rpt-rpi-v8 #1 SMP PREEMPT Debian 1:6.6.51-1+rpt3 (2024-10-08) aarch64
[ 28.229] Kernel command line: coherent_pool=1M 8250.nr_uarts=0 snd_bcm2835.enable_headphones=0 snd_bcm2835.enable_headphones=1 snd_bcm2835.enable_hdmi=1 bcm2708_fb.fbwidth=1080 bcm2708_fb.fbheight=1920 bcm2708_fb.fbswap=1 vc_mem.mem_base=0x3ec00000 vc_mem.mem_size=0x40000000 console=ttyS0,115200 console=tty1 root=PARTUUID=5852fd22-02 rootfstype=ext4 fsck.repair=yes rootwait cfg80211.ieee80211_regdom=SE
[ 28.272] xorg-server 2:21.1.7-3+rpt3+deb12u8 (https://www.debian.org/support)
[ 28.278] Current version of pixman: 0.42.2
[ 28.298] Before reporting problems, check http://wiki.x.org
to make sure that you have the latest version.
[ 28.298] Markers: (--) probed, (**) from config file, (==) default setting,
(++) from command line, (!!) notice, (II) informational,
(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[ 28.333] (==) Log file: "/var/log/Xorg.0.log", Time: Sun Nov 24 10:27:31 2024
[ 28.344] (==) Using config directory: "/etc/X11/xorg.conf.d"
[ 28.355] (==) Using system config directory "/usr/share/X11/xorg.conf.d"
[ 28.365] (==) ServerLayout "ServerLayout0"
[ 28.365] (==) No screen section available. Using defaults.
[ 28.365] (**) |-->Screen "Default Screen Section" (0)
[ 28.365] (**) | |-->Monitor "<default monitor>"
[ 28.366] (==) No device specified for screen "Default Screen Section".
Using the first device section listed.
[ 28.366] (**) | |-->Device "kms"
[ 28.366] (==) No monitor specified for screen "Default Screen Section".
Using a default monitor configuration.
[ 28.367] (**) Option "BlankTime" "0"
[ 28.367] (**) Option "StandbyTime" "0"
[ 28.367] (**) Option "SuspendTime" "0"
[ 28.367] (**) Option "OffTime" "0"
[ 28.367] (**) Option "Debug" "dmabuf_capable"
[ 28.367] (==) Automatically adding devices
[ 28.367] (==) Automatically enabling devices
[ 28.367] (==) Automatically adding GPU devices
[ 28.367] (==) Automatically binding GPU devices
[ 28.375] (==) Max clients allowed: 256, resource mask: 0x1fffff
[ 28.390] (WW) The directory "/usr/share/fonts/X11/cyrillic" does not exist.
[ 28.390] Entry deleted from font path.
[ 28.400] (==) FontPath set to:
/usr/share/fonts/X11/misc,
/usr/share/fonts/X11/100dpi/:unscaled,
/usr/share/fonts/X11/75dpi/:unscaled,
/usr/share/fonts/X11/Type1,
/usr/share/fonts/X11/100dpi,
/usr/share/fonts/X11/75dpi,
built-ins
[ 28.400] (==) ModulePath set to "/usr/lib/xorg/modules"
[ 28.400] (**) Extension "DPMS" is disabled
[ 28.401] (II) The server relies on udev to provide the list of input devices.
If no devices become available, reconfigure udev or disable AutoAddDevices.
[ 28.401] (II) Loader magic: 0x558c0a0ef0
[ 28.401] (II) Module ABI versions:
[ 28.401] X.Org ANSI C Emulation: 0.4
[ 28.401] X.Org Video Driver: 25.2
[ 28.401] X.Org XInput driver : 24.4
[ 28.401] X.Org Server Extension : 10.0
[ 28.403] (++) using VT number 1
[ 28.403] (--) controlling tty is VT number 1, auto-enabling KeepTty
[ 28.411] (II) systemd-logind: took control of session /org/freedesktop/login1/session/_31
[ 28.412] (II) no primary bus or device found
[ 28.412] (II) LoadModule: "glx"
[ 28.419] (II) Loading /usr/lib/xorg/modules/extensions/libglx.so
[ 28.506] (II) Module glx: vendor="X.Org Foundation"
[ 28.506] compiled for 1.21.1.7, module version = 1.0.0
[ 28.506] ABI class: X.Org Server Extension, version 10.0
[ 28.506] (II) LoadModule: "modesetting"
[ 28.508] (II) Loading /usr/lib/xorg/modules/drivers/modesetting_drv.so
[ 28.537] (II) Module modesetting: vendor="X.Org Foundation"
[ 28.537] compiled for 1.21.1.7, module version = 1.21.1
[ 28.537] Module class: X.Org Video Driver
[ 28.537] ABI class: X.Org Video Driver, version 25.2
[ 28.537] (II) modesetting: Driver for Modesetting Kernel Drivers: kms
[ 28.538] (WW) Falling back to old probe method for modesetting
[ 28.538] (EE) open /dev/dri/card0: No such file or directory
[ 28.538] (WW) Falling back to old probe method for modesetting
[ 28.538] (EE) open /dev/dri/card0: No such file or directory
[ 28.538] (EE) No devices detected.
[ 28.538] (EE)
Fatal server error:
[ 28.538] (EE) no screens found(EE)
[ 28.538] (EE)
Please consult the The X.Org Foundation support
at http://wiki.x.org
for help.
[ 28.538] (EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information.
[ 28.538] (EE)
[ 28.664] (EE) Server terminated with error (1). Closing log file.
It worked with the pm2 way ! thanks
In mm.sh I wrote npm run server and everything is up n runnin again .
Thanks again !
Thanks! I will try that, seems smooth.
@sdetweil the VM has only terminal interface I access it with ssh
oo cool script. shall i run it inside my MagicMirror directory or outside in my user directory or in my root folder ?
Hello I have setup my magicmirror (latest) as follows
Virtual machine on a dell optiplex running magicmirror serveronly
Raspberry pi running chromium-browser in kiosk pointing at VM
BUT when running npm run serveronly on VM my mm-client (raspberrrypi fetch and shows magicmirror interface from server)
then I stop npm serveronly and make a systemd script as the one in magicmirror documents.
[Unit]
Description=MagicMirror
After=network.target
StartLimitIntervalSec=0
[Service]
Type=simple
Restart=always
RestartSec=1
User=sentinel
WorkingDirectory=/home/sentinel/MagicMirror/
ExecStart=/usr/bin/node /home/sentinel/MagicMirror/serveronly
[Install]
WantedBy=multi-user.target
and systemctl start and then status magicmirror.service result in following
● magicmirror.service - MagicMirror
Loaded: loaded (/etc/systemd/system/magicmirror.service; enabled; vendor preset: enabled)
Active: active (running) since Sun 2024-04-21 18:36:18 CEST; 1ms ago
Main PID: 1016038 ((node))
Tasks: 1 (limit: 8826)
Memory: 256.0K
CPU: 224us
CGroup: /system.slice/magicmirror.service
└─1016038 (node)
Apr 21 18:36:18 MagicMirrorVm systemd[1]: Started MagicMirror.
but after this action my mm-client (raspberry pi) cant connect to server anymore I get “this site cant be reached”
How do I solve this, to me it seems that mm-serveronly does not start but I’m not sure .
AH! Sorry!
Changed it now your snippet in 1st Line
And we have Success!!! Finally!!
Thanks Alot @sdetweil
I added your code snippet in 1st line after
var mpd = require('mpd'),
and output
[2020-10-24 01:56:54.490] [ERROR] WARNING! Could not validate config file. Starting with default configuration. Please correct syntax errors at or above this line: /home/pi/MagicMirror/modules/mpd_client/node_helper.js:1
var mpd = require('mpd'),const NodeHelper = require("node_helper");
^^^^^
SyntaxError: Unexpected token const
at Module._compile (internal/modules/cjs/loader.js:722:23)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:798:10)
at Module.load (internal/modules/cjs/loader.js:645:32)
at Function.Module._load (internal/modules/cjs/loader.js:560:12)
at Module.require (internal/modules/cjs/loader.js:685:19)
at require (internal/modules/cjs/helpers.js:16:16)
at loadModule (/home/pi/MagicMirror/js/app.js:134:17)
at loadNextModule (/home/pi/MagicMirror/js/app.js:169:5)
at /home/pi/MagicMirror/js/app.js:171:6
at Class.loaded (/home/pi/MagicMirror/js/node_helper.js:18:3)
@sdetweil said in Add JS Code to the Mirror:
mpd_client
ok then
fresh install and download after your instructions:
[[ERROR] WARNING! Could not validate config file. Starting with default configuration. Please correct syntax errors at or above this line: ReferenceError: NodeHelper is not defined
at Object.<anonymous> (/home/pi/MagicMirror/modules/mpd_client/node_helper.js:4:18)
at Module._compile (internal/modules/cjs/loader.js:786:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:798:10)
at Module.load (internal/modules/cjs/loader.js:645:32)
at Function.Module._load (internal/modules/cjs/loader.js:560:12)
at Module.require (internal/modules/cjs/loader.js:685:19)
at require (internal/modules/cjs/helpers.js:16:16)
at loadModule (/home/pi/MagicMirror/js/app.js:134:17)
at loadNextModule (/home/pi/MagicMirror/js/app.js:169:5)
at /home/pi/MagicMirror/js/app.js:171:6
[2020-10-24 01:33:46.979] [LOG] Loading module helpers ...
[2020-10-24 01:33:46.980] [LOG] No helper found for module: alert.
[2020-10-24 01:33:46.981] [LOG] Initializing new module helper ...
[2020-10-24 01:33:46.982] [LOG] Module helper loaded: updatenotification
[2020-10-24 01:33:46.983] [LOG] No helper found for module: clock.
[2020-10-24 01:33:46.984] [LOG] Initializing new module helper ...
[2020-10-24 01:33:46.985] [LOG] Module helper loaded: calendar
[2020-10-24 01:33:46.986] [LOG] No helper found for module: .
[2020-10-24 01:33:46.988] [LOG] No helper found for module: currentweather.
[2020-10-24 01:33:46.990] [LOG] No helper found for module: weatherforecast.
[2020-10-24 01:33:46.991] [LOG] Initializing new module helper ...
[2020-10-24 01:33:46.992] [LOG] Module helper loaded: newsfeed
[2020-10-24 01:33:46.994] [ERROR] App threw an error during load
[2020-10-24 01:33:47.003] [ERROR] ReferenceError: NodeHelper is not defined
at Object.<anonymous> (/home/pi/MagicMirror/modules/mpd_client/node_helper.js:4:18)
at Module._compile (internal/modules/cjs/loader.js:786:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:798:10)
at Module.load (internal/modules/cjs/loader.js:645:32)
at Function.Module._load (internal/modules/cjs/loader.js:560:12)
at Module.require (internal/modules/cjs/loader.js:685:19)
at require (internal/modules/cjs/helpers.js:16:16)
at loadModule (/home/pi/MagicMirror/js/app.js:134:17)
at loadNextModule (/home/pi/MagicMirror/js/app.js:169:5)
at /home/pi/MagicMirror/js/app.js:171:6
[2020-10-24 01:33:47.006] [ERROR] Whoops! There was an uncaught exception...
[2020-10-24 01:33:47.007] [ERROR] ReferenceError: NodeHelper is not defined
at Object.<anonymous> (/home/pi/MagicMirror/modules/mpd_client/node_helper.js:4:18)
at Module._compile (internal/modules/cjs/loader.js:786:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:798:10)
at Module.load (internal/modules/cjs/loader.js:645:32)
at Function.Module._load (internal/modules/cjs/loader.js:560:12)
at Module.require (internal/modules/cjs/loader.js:685:19)
at require (internal/modules/cjs/helpers.js:16:16)
at loadModule (/home/pi/MagicMirror/js/app.js:134:17)
at loadNextModule (/home/pi/MagicMirror/js/app.js:169:5)
at /home/pi/MagicMirror/js/app.js:171:6
[2020-10-24 01:33:47.014] [ERROR] MagicMirror will not quit, but it might be a good idea to check why this happened. Maybe no internet connection?
[2020-10-24 01:33:47.014] [ERROR] If you think this really is an issue, please open an issue on GitHub: https://github.com/MichMich/MagicMirror/issues
[2020-10-24 01:33:49.707] [LOG] Launching application.]
something wrong with nodehelper I believe.
Or maybe I have wrong port and IP to my mpd.
and then change folder name to mod-client ?
is it mod-client (folder) and mod_client in config.js in config array. do I also change name in mpd-client.js file?