MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    1. Home
    2. MyMirror
    3. Posts
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.
    M
    Offline
    • Profile
    • Following 1
    • Followers 2
    • Topics 21
    • Posts 127
    • Groups 0

    Posts

    Recent Best Controversial
    • RE: birthdaylist

      @sdetweil

      Sure …

              {
                      module: "birthdaylist",
                      position:'top_left',
                      header:"Geburtstage",
                      config: {
                      language: "de",
                      dimmEntries: false,             // true: dims entries and the associated
                                                      //       symbol when the date has expired.
                                                      // false: dont display entries and the associated
                                                      //        symbol when the date has expired.
                      initialLoadDelay: 10,           // How many seconds to wait on a fresh start up.
                                                      // This is to prevent collision with all other modules also
                                                      // loading all at the same time. This only happens once,
                                                      // when the mirror first starts up.
                      updateDelay: 5,                 // How many seconds after midnight before a refresh
                                                      // This is to prevent collision with other
                                                      // modules refreshing at the same time.
                      currentMonthOnly: false,        // will show birthdays for the current month only if true
                      maxEntries: 10,                 // maximum entries to show, default is all
                      dateFormat: '',                 // date format for birthday (default is none), could be 'Do' for 'Sep 12th'
                      ageFormat:'',                   // some format string for the persons age, '[ n ]'  n will be replace by age value
                      debug:false
                      }
              },
      
      10 maxEntries just for the test, if this works, i would go to 4.
      On my screen I get this:
      ![screenshot](https://my.hidrive.com/lnk/CBHojVsL)
      So ... only 3 entries and i took your example
      
      BR
      Jens
      posted in Requests
      M
      MyMirror
    • RE: birthdaylist

      @sdetweil

      … and if i delete
      03/01/1940,aaa AAAAA
      06/01/1969,bbb BBBBB
      only Joan is left …
      Any idea?

      Jens

      posted in Requests
      M
      MyMirror
    • RE: birthdaylist

      @sdetweil

      Hmm, if i set
      currentMonthOnly: false,
      and
      maxEntries: 10,

      i just get 3 lines.
      Can you check this?

      BR
      Jens

      posted in Requests
      M
      MyMirror
    • RE: birthdaylist

      @sdetweil

      It couldn’t look any better.
      Great - thank you very much!

      Jens

      posted in Requests
      M
      MyMirror
    • birthdaylist

      @sdetweil

      thank you very much for your great birthday overview.
      Unfortunately, as you wrote here ( https://forum.magicmirror.builders/topic/18107/mmm-birthdays/11 ), the list is limited to the end of the month or year.
      Is it possible to add 2 more options to extend the display beyond the end of the month or year? Because this way I can only see at the beginning of the month/year if someone has a birthday on 01.01., for example.
      And … could the list also have an underlined heading “Birthdays”?

      I wish you all a happy new year. Stay healthy.

      Jens

      posted in Requests module
      M
      MyMirror
    • Problems with Python3 and RPi.GPIO under root

      Hi all,

      may i ask for a little help?
      I am really not a Linux specialist and would be glad if you could help me with this problem.

      Environment: Raspi 3b with Bullseye
      uname -a gives the following output: Linux MM3 6.1.21-v7+ #1642 SMP Mon Apr 3 17:20:52 BST 2023 armv7l GNU/Linux

      Version of my MagicMirror: 2.25.0

      If I start Python3 as normal user “pi” and call “import RPi.GPIO as GPIO”, then it works but not as root:

      pi@MM3:~/MagicMirror $ pwd
      /home/pi/MagicMirror
      pi@MM3:~/MagicMirror $ whoami
      pi
      pi@MM3:~/MagicMirror $ python3
      Python 3.9.7 (default, Oct 14 2023, 17:06:45) 
      [GCC 10.2.1 20210110] on linux
      Type "help", "copyright", "credits" or "license" for more information.
      >>> import RPi.GPIO as GPIO
      >>> 
      pi@MM3:~/MagicMirror $ su - root
      Passwort: 
      root@MM3:~# pwd
      /root
      root@MM3:~# python3
      Python 3.9.7 (default, Oct 14 2023, 17:06:45) 
      [GCC 10.2.1 20210110] on linux
      Type "help", "copyright", "credits" or "license" for more information.
      >>> import RPi.GPIO as GPIO
      Traceback (most recent call last):
        File "<stdin>", line 1, in <module>
      ModuleNotFoundError: No module named 'RPi'
      >>> 
      root@MM3:~
      

      Unfortunately, I cannot start such a python script for a PIR as a service. What is the user root missing that the user “pi” has?

      I want the Python script here: /lib/systemd/system to start as a service when starting the raspi: pir_sensor.service This is not done with the user “pi” but as “root” or “system”, right?
      Contents of pir_sensor.service:

      [Unit]
      Description=MagicMirror PIR Service
      After=multi-user.target
      
      [Service]
      Type=idle
      WorkingDirectory=/home/pi/MagicMirror
      Restart=on-failure
      User=root
      ExecStart=/usr/bin/python3.9 /home/pi/MagicMirror/pirx.py
      
      [Install]
      WantedBy=multi-user.target
      

      And the start of my pirx.py looks like this:

      #!/usr/bin/python3
      # coding: utf8 #
      import RPi.GPIO as GPIO
      

      As user pi it works well, but as described above, not as root or “system”.
      Can anyone help me to repair Python to work under root/system as well with RPi.GPIO?

      Thanks
      Jens

      posted in Troubleshooting
      M
      MyMirror
    • RE: Need help to upgrade npm and node ...

      Hi Sam,

      not nice, but if there’s no other way …
      Thanks for the info and your script.

      BR
      Jens

      posted in Troubleshooting
      M
      MyMirror
    • RE: Need help to upgrade npm and node ...

      Hi Sam,

      rebuild means to install all from the scratch and then make a restore (after backup now) with your script?

      BR
      Jens

      posted in Troubleshooting
      M
      MyMirror
    • Need help to upgrade npm and node ...

      Hi,

      after using sdetweil’s script to upgrade i get this on my raspi 3 and Buster:

      pi@MM3:~/MagicMirror $ bash -c  "$(curl -sL https://raw.githubusercontent.com/sdetweil/MagicMirror_scripts/master/upgrade-script.sh)" apply
      Paketlisten werden gelesen… Fertig
      Abhängigkeitsbaum wird aufgebaut… Fertig
      Statusinformationen werden eingelesen… Fertig
      Das folgende Paket wurde automatisch installiert und wird nicht mehr benötigt:
        raspinfo
      Verwenden Sie »sudo apt autoremove«, um es zu entfernen.
      Die folgenden Pakete werden ENTFERNT:
        nodejs*
      0 aktualisiert, 0 neu installiert, 1 zu entfernen und 0 nicht aktualisiert.
      Nach dieser Operation werden 185 MB Plattenplatz freigegeben.
      (Lese Datenbank ... 111709 Dateien und Verzeichnisse sind derzeit installiert.)
      Entfernen von nodejs (20.8.0-1nodesource1) ...
      dpkg: Warnung: Während Entfernens von nodejs ist Verzeichnis »/usr/lib/node_modules« nicht leer, wird daher nicht gelöscht
      Trigger für man-db (2.9.4-2) werden verarbeitet ...
      OK:1 http://raspbian.raspberrypi.org/raspbian bullseye InRelease
      OK:2 http://archive.raspberrypi.org/debian bullseye InRelease
      Holen:3 http://giteduberger.fr rpimonitor/ InRelease [1.933 B]
      Es wurden 1.933 B in 2 s geholt (1.035 B/s).
      Paketlisten werden gelesen… Fertig
      Paketlisten werden gelesen… Fertig
      Abhängigkeitsbaum wird aufgebaut… Fertig
      Statusinformationen werden eingelesen… Fertig
      ca-certificates ist schon die neueste Version (20210119).
      curl ist schon die neueste Version (7.74.0-1.3+deb11u7).
      gnupg ist schon die neueste Version (2.2.27-2+deb11u2).
      Das folgende Paket wurde automatisch installiert und wird nicht mehr benötigt:
        raspinfo
      Verwenden Sie »sudo apt autoremove«, um es zu entfernen.
      0 aktualisiert, 0 neu installiert, 0 zu entfernen und 0 nicht aktualisiert.
      deb [  signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main
      Holen:1 http://giteduberger.fr rpimonitor/ InRelease [1.933 B]
      OK:2 http://raspbian.raspberrypi.org/raspbian bullseye InRelease                                                                                      
      Holen:3 https://deb.nodesource.com/node_20.x nodistro InRelease [12,1 kB]                                                                             
      OK:4 http://archive.raspberrypi.org/debian bullseye InRelease                                                                                         
      Holen:5 https://deb.nodesource.com/node_20.x nodistro/main armhf Packages [3.269 B]                                                                   
      Es wurden 17,3 kB in 6 s geholt (2.745 B/s).                                                                                                          
      Paketlisten werden gelesen… Fertig
      Paketlisten werden gelesen… Fertig
      Abhängigkeitsbaum wird aufgebaut… Fertig
      Statusinformationen werden eingelesen… Fertig
      Das folgende Paket wurde automatisch installiert und wird nicht mehr benötigt:
        raspinfo
      Verwenden Sie »sudo apt autoremove«, um es zu entfernen.
      Die folgenden NEUEN Pakete werden installiert:
        nodejs
      0 aktualisiert, 1 neu installiert, 0 zu entfernen und 0 nicht aktualisiert.
      Es müssen noch 0 B von 27,8 MB an Archiven heruntergeladen werden.
      Nach dieser Operation werden 185 MB Plattenplatz zusätzlich benutzt.
      Vormals nicht ausgewähltes Paket nodejs wird gewählt.
      (Lese Datenbank ... 105887 Dateien und Verzeichnisse sind derzeit installiert.)
      Vorbereitung zum Entpacken von .../nodejs_20.8.0-1nodesource1_armhf.deb ...
      Entpacken von nodejs (20.8.0-1nodesource1) ...
      nodejs (20.8.0-1nodesource1) wird eingerichtet ...
      Trigger für man-db (2.9.4-2) werden verarbeitet ...
      doing test run = false
      update log will be in /home/pi/MagicMirror/installers/upgrade.log
      Check current Node installation ...
      Node currently installed. Checking version number.
      Minimum Node version: v20.8.0
      Installed Node version: v19.2.0
      Node should be upgraded.
      Installing Node.js ...
      Paketlisten werden gelesen… Fertig
      Abhängigkeitsbaum wird aufgebaut… Fertig
      Statusinformationen werden eingelesen… Fertig
      nodejs ist schon die neueste Version (20.8.0-1nodesource1).
      Das folgende Paket wurde automatisch installiert und wird nicht mehr benötigt:
        raspinfo
      Verwenden Sie »sudo apt autoremove«, um es zu entfernen.
      0 aktualisiert, 0 neu installiert, 0 zu entfernen und 0 nicht aktualisiert.
      node version is
      Node.js installation Done! version=v19.2.0
      apply: Zeile 245: [: Zu viele Argumente.
      Check current NPM installation ...
      NPM currently installed. Checking version number.
      Minimum npm version: V10.1.0
      Installed npm version: V8.19.3
      npm should be upgraded.
      Installing npm ...
      E: Probleme können nicht korrigiert werden, Sie haben zurückgehaltene defekte Pakete.
      npm WARN EBADENGINE Unsupported engine {
      npm WARN EBADENGINE   package: 'npm@1.4.29',
      npm WARN EBADENGINE   required: { node: '>=0.8', npm: '1' },
      npm WARN EBADENGINE   current: { node: 'v19.2.0', npm: '8.19.3' }
      npm WARN EBADENGINE }
      evalmachine.<anonymous>:41
      } = primordials;
          ^
      
      ReferenceError: primordials is not defined
          at evalmachine.<anonymous>:41:5
          at Object.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/graceful-fs/fs.js:11:8)
          at Module._compile (node:internal/modules/cjs/loader:1218:14)
          at Module._extensions..js (node:internal/modules/cjs/loader:1272:10)
          at Module.load (node:internal/modules/cjs/loader:1081:32)
          at Module._load (node:internal/modules/cjs/loader:922:12)
          at Module.require (node:internal/modules/cjs/loader:1105:19)
          at require (node:internal/modules/cjs/helpers:103:18)
          at Object.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/graceful-fs/graceful-fs.js:3:27)
          at Module._compile (node:internal/modules/cjs/loader:1218:14)
      
      Node.js v19.2.0
      npm installation Done! version=V
      
      apply: Zeile 353: [: -ge: Einstelliger (unärer) Operator erwartet.
      saving custom.css
      upgrading from version 2.23.0 to 2.25.0
      fetching latest revisions
      updating MagicMirror runtime, please wait
      apply: Zeile 593: [: -ge: Einstelliger (unärer) Operator erwartet.
      evalmachine.<anonymous>:41
      } = primordials;
          ^
      
      ReferenceError: primordials is not defined
          at evalmachine.<anonymous>:41:5
          at Object.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/graceful-fs/fs.js:11:8)
          at Module._compile (node:internal/modules/cjs/loader:1218:14)
          at Module._extensions..js (node:internal/modules/cjs/loader:1272:10)
          at Module.load (node:internal/modules/cjs/loader:1081:32)
          at Module._load (node:internal/modules/cjs/loader:922:12)
          at Module.require (node:internal/modules/cjs/loader:1105:19)
          at require (node:internal/modules/cjs/helpers:103:18)
          at Object.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/graceful-fs/graceful-fs.js:3:27)
          at Module._compile (node:internal/modules/cjs/loader:1218:14)
      
      Node.js v19.2.0
      Checking for modules with removed libraries
      processing dependency changes for active modules with package.json files
      
      processing for module MMM-MyWastePickup please wait
      ----------------------------------
      evalmachine.<anonymous>:41
      } = primordials;
          ^
      
      ReferenceError: primordials is not defined
          at evalmachine.<anonymous>:41:5
          at Object.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/graceful-fs/fs.js:11:8)
          at Module._compile (node:internal/modules/cjs/loader:1218:14)
          at Module._extensions..js (node:internal/modules/cjs/loader:1272:10)
          at Module.load (node:internal/modules/cjs/loader:1081:32)
          at Module._load (node:internal/modules/cjs/loader:922:12)
          at Module.require (node:internal/modules/cjs/loader:1105:19)
          at require (node:internal/modules/cjs/helpers:103:18)
          at Object.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/graceful-fs/graceful-fs.js:3:27)
          at Module._compile (node:internal/modules/cjs/loader:1218:14)
      
      Node.js v19.2.0
      processing complete for module MMM-MyWastePickup
      
      processing for module MMM-Fuel please wait
      ----------------------------------
      evalmachine.<anonymous>:41
      } = primordials;
          ^
      
      ReferenceError: primordials is not defined
          at evalmachine.<anonymous>:41:5
          at Object.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/graceful-fs/fs.js:11:8)
          at Module._compile (node:internal/modules/cjs/loader:1218:14)
          at Module._extensions..js (node:internal/modules/cjs/loader:1272:10)
          at Module.load (node:internal/modules/cjs/loader:1081:32)
          at Module._load (node:internal/modules/cjs/loader:922:12)
          at Module.require (node:internal/modules/cjs/loader:1105:19)
          at require (node:internal/modules/cjs/helpers:103:18)
          at Object.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/graceful-fs/graceful-fs.js:3:27)
          at Module._compile (node:internal/modules/cjs/loader:1218:14)
      
      Node.js v19.2.0
      processing complete for module MMM-Fuel
      
      restoring custom.css
      
      

      Asking for the installed npm version:

      pi@MM3:~/MagicMirror $ npm -v
      evalmachine.<anonymous>:41
      } = primordials;
          ^
      
      ReferenceError: primordials is not defined
          at evalmachine.<anonymous>:41:5
          at Object.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/graceful-fs/fs.js:11:8)
          at Module._compile (node:internal/modules/cjs/loader:1218:14)
          at Module._extensions..js (node:internal/modules/cjs/loader:1272:10)
          at Module.load (node:internal/modules/cjs/loader:1081:32)
          at Module._load (node:internal/modules/cjs/loader:922:12)
          at Module.require (node:internal/modules/cjs/loader:1105:19)
          at require (node:internal/modules/cjs/helpers:103:18)
          at Object.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/graceful-fs/graceful-fs.js:3:27)
          at Module._compile (node:internal/modules/cjs/loader:1218:14)
      
      Node.js v19.2.0
      
      

      Ask for node version:

      pi@MM3:~/MagicMirror $ node -v
      v19.2.0
      
      

      Who can help to upgrade npm and node to the latest versions?
      Thanks!

      posted in Troubleshooting
      M
      MyMirror
    • RE: Pir sensor

      @tanvir586 said in Pir sensor:

      @sdetweil it work like https://github.com/paviro/MMM-PIR-Sensor
      mmm-pir-sensor is not working anymore that’s why I wanted to use the light one. but this one is not working looks like

      But of course the module still works.7
      I have this running on my Pi 3b, Bullseye and MM 2.21.0 …

      posted in Troubleshooting
      M
      MyMirror
    • 1
    • 2
    • 3
    • 4
    • 5
    • 12
    • 13
    • 3 / 13