Closed gonzonia closed 1 month ago
way cool! not
I saw the post about rebuild
do this
cd ~/MagicMirror
npm install @electron/rebuild
cd modules/MMM-Pir
../../node_modules/.bin/electron-rebuild
please advise
✖ Rebuild Failed
An unhandled error occurred inside electron-rebuild node-gyp failed to rebuild '/home/pi/MagicMirror/modules/MMM-Pir/node_modules/epoll'
Error: node-gyp failed to rebuild '/home/pi/MagicMirror/modules/MMM-Pir/node_modules/epoll'
at ChildProcess.
yeh darn good old poll again
ok try this
in the MMM-Pir folder rm package-lock.json rm -rf node_modules npm install and maybe the electron-rebuild command again
That seemed to work without error (just lots of deprecated warnings). Should I still run the electron-rebuild
no, electron rebuild not needed
@sdetweil I still have the same issue. During the update to the new MM Version with your script, I stuck in a loop with the message "Do you want to continue?". This came during the routine for MMM-Pir. I updated MMM-Pir manually before I start the script. After I stopped the loop with Ctrl-C and reboot my mirror the MMM-Pir is not working anymore. Also a rebuild didn´t help. Any idea ?
I do not.
can you give me the info from MagicMirror startup which describes your system.
I know the pir author has been facing charges.
You mean the pm2 startup log ? Or the log of your script ?
the MagicMirror startup,
dumps out a bunch of misc info, os ,version ,electron version..etc etc
Raspberry Pi 4 Model B Rev 1.1 Operating System: Raspbian GNU/Linux 11 (bullseye) Kernel: Linux 6.1.21-v8+ Architecture: arm64 Installed Node version: v20.9.0 Installed npm version: V10.1.0 MagicMirror version 2.28.0 Electron version 31.1.0 MMM-Pir v1.5.3
MMM-PIR is displayed as installed, but does not work.
Here the log of the update:
`Upgrade started - Di Jul 9 22:30:40 CEST 2024 system is Linux smartmirror 6.1.21-v8+ #1642 SMP PREEMPT Mon Apr 3 17:24:16 BST 2023 aarch64 GNU/Linux user requested to apply changes doing test run = false the os is Distributor ID: Raspbian Description: Raspbian GNU/Linux 11 (bullseye) Release: 11 Codename: bullseye [0mNode currently installed. Checking version number.[0m [0mMinimum Node version: [1mv20.9.0[0m [0mInstalled Node version: [1mv20.8.0[0m [96minstalling correct version of node and npm, please wait[0m installing : node-v20.9.0 mkdir : /usr/local/n/versions/node/20.9.0 fetch : https://nodejs.org/dist/v20.9.0/node-v20.9.0-linux-armv7l.tar.xz copying : node/20.9.0 installed : v20.9.0 (with npm 10.1.0) [96mCheck current Node installation ...[0m [0mNode currently installed. Checking version number. [0mMinimum Node version: [1mv20.9.0[0m [0mInstalled Node version: [1mv20.9.0[0m [92mNo Node.js upgrade necessary.[0m [96mCheck current NPM installation ...[0m [0mNPM currently installed. Checking version number. [0mMinimum npm version: [1mV10.1.0[0m [0mInstalled npm version: [1mV10.1.0[0m [92mNo npm upgrade necessary.[0m
saving custom.css
remote name = origin
upgrading from version 2.27.0 to 2.28.0
fetching latest revisions
git fetch rc=0
current branch = master
On branch master
Untracked files:
(use "git add
nothing added to commit but untracked files present (use "git add" to track)
no files different from github version
test merge result rc='' , if empty, no conflicts
executing merge, apply specified
merge result rc= 0
Updating 5ea8a346..53fc814f Fast-forward .github/workflows/automated-tests.yaml
3 +- .github/workflows/electronRebuild.yaml
8 + CHANGELOG.md
45 +- config/config.js.sample
14 +- fonts/package-lock.json
16 +- fonts/package.json
10 +- js/app.js
15 +- js/check_config.js
66 + js/loader.js
3 +- js/main.js
11 +- js/utils.js
11 + modules/default/calendar/calendar.js
15 +- modules/default/compliments/compliments.js
7 +- .../default/updatenotification/update_helper.js
11 +- modules/default/weather/providers/openmeteo.js
18 +- modules/default/weather/providers/weathergov.js
2 +- package-lock.json
3164 +++++++++++++------- package.json
105 +- .../compliments_specialDayUnique_false.js
22 + .../compliments_specialDayUnique_true.js
22 + tests/e2e/modules/compliments_spec.js
24 + vendor/package-lock.json
8 +- vendor/package.json
8 +- 23 files changed, 2342 insertions(+), 1266 deletions(-)
create mode 100644 tests/configs/modules/compliments/compliments_specialDayUnique_false.js
create mode 100644 tests/configs/modules/compliments/compliments_specialDayUnique_true.js
processor architecture is aarch64
updating MagicMirror runtime, please wait
(node:4392) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 close listeners added to [TLSSocket]. Use emitter.setMaxListeners() to increase limit
(Use node --trace-warnings ...
to show where the warning was created)
(node:4392) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 close listeners added to [TLSSocket]. Use emitter.setMaxListeners() to increase limit
(node:4392) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 close listeners added to [TLSSocket]. Use emitter.setMaxListeners() to increase limit
(node:4392) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 close listeners added to [TLSSocket]. Use emitter.setMaxListeners() to increase limit
(node:4392) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 close listeners added to [TLSSocket]. Use emitter.setMaxListeners() to increase limit
(node:4392) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 close listeners added to [TLSSocket]. Use emitter.setMaxListeners() to increase limit
(node:4392) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 close listeners added to [TLSSocket]. Use emitter.setMaxListeners() to increase limit
(node:4392) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 close listeners added to [TLSSocket]. Use emitter.setMaxListeners() to increase limit
(node:4392) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 close listeners added to [TLSSocket]. Use emitter.setMaxListeners() to increase limit
(node:4392) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 close listeners added to [TLSSocket]. Use emitter.setMaxListeners() to increase limit
(node:4392) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 close listeners added to [TLSSocket]. Use emitter.setMaxListeners() to increase limit
(node:4392) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 close listeners added to [TLSSocket]. Use emitter.setMaxListeners() to increase limit
(node:4392) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 close listeners added to [TLSSocket]. Use emitter.setMaxListeners() to increase limit
(node:4392) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 close listeners added to [TLSSocket]. Use emitter.setMaxListeners() to increase limit
(node:4392) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 close listeners added to [TLSSocket]. Use emitter.setMaxListeners() to increase limit
(node:4392) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 close listeners added to [TLSSocket]. Use emitter.setMaxListeners() to increase limit
(node:4392) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 close listeners added to [TLSSocket]. Use emitter.setMaxListeners() to increase limit
(node:4392) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 close listeners added to [TLSSocket]. Use emitter.setMaxListeners() to increase limit
(node:4392) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 close listeners added to [TLSSocket]. Use emitter.setMaxListeners() to increase limit
(node:4392) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 close listeners added to [TLSSocket]. Use emitter.setMaxListeners() to increase limit
(node:4392) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 close listeners added to [TLSSocket]. Use emitter.setMaxListeners() to increase limit
(node:4392) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 close listeners added to [TLSSocket]. Use emitter.setMaxListeners() to increase limit
(node:4392) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 close listeners added to [TLSSocket]. Use emitter.setMaxListeners() to increase limit
(node:4392) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 close listeners added to [TLSSocket]. Use emitter.setMaxListeners() to increase limit
(node:4392) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 close listeners added to [TLSSocket]. Use emitter.setMaxListeners() to increase limit
(node:4392) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 close listeners added to [TLSSocket]. Use emitter.setMaxListeners() to increase limit
(node:4392) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 close listeners added to [TLSSocket]. Use emitter.setMaxListeners() to increase limit
magicmirror@2.28.0 postinstall npm run install-vendor && npm run install-fonts && echo "MagicMirror² installation finished successfully! "
magicmirror@2.28.0 install-vendor echo "Installing vendor files ... " && cd vendor && npm install --loglevel=error --no-audit --no-fund --no-update-notifier
Installing vendor files ...
changed 1 package in 10s
magicmirror@2.28.0 install-fonts echo "Installing fonts ... " && cd fonts && npm install --loglevel=error --no-audit --no-fund --no-update-notifier
Installing fonts ...
changed 2 packages in 12s MagicMirror² installation finished successfully!
magicmirror@2.28.0 prepare [ -f node_modules/.bin/husky ] && husky || echo no husky installed.
no husky installed.
added 469 packages in 2m
112 packages are looking for funding
run npm fund
for details
npm install completed - Di Jul 9 22:33:55 CEST 2024 on base
fixing sandbox permissions
Checking for modules with removed libraries downloading dumpactivemodules script
updating dependencies for active modules with package.json files
processing for module MMM-Todoist please wait
----------------------------------
npm WARN deprecated har-validator@5.1.5: this library is no longer supported npm WARN deprecated uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details. npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
added 50 packages, and audited 51 packages in 13s
3 packages are looking for funding
run npm fund
for details
2 moderate severity vulnerabilities
Some issues need review, and may require choosing a different dependency.
Run npm audit
for details.
processing complete for module MMM-Todoist
processing for module MMM-Remote-Control please wait
----------------------------------
npm WARN deprecated uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
added 50 packages, and audited 51 packages in 12s
12 packages are looking for funding
run npm fund
for details
found 0 vulnerabilities
processing complete for module MMM-Remote-Control
processing for module MMM-Pir please wait
----------------------------------
MMM-Pir@1.5.3 update installer/update.sh
[94mWelcome to MMM-Pir v1.5.3 Updater[0m
[94mUpdating...[0m HEAD ist jetzt bei 1f90ef8 Update README.md Bereits aktuell. [92mDone[0m
[94mReady for Installing...[0m
MMM-Pir@1.5.3 preinstall installer/preinstall.sh -d 'unclutter cec-utils ddcutil python3 python-is-python3 python3-gpiozero'
[94mWelcome to MMM-Pir v1.5.3[0m
[94mNo root checking...[0m [92mChecking MMM-Pir: pi/pi[0m [92mChecking MagicMirror: pi/pi[0m
[94mChecking OS...[0m [92mOS Detected: linux-gnueabihf (raspbian 11 aarch64)[0m
[94mChecking all dependencies...[0m [92mAll Dependencies needed are installed ![0m
[94mInstalling @sdetweil sandbox fix...[0m fixing sandbox permissions
MMM-Pir@1.5.3 postinstall installer/postinstall.sh -m -r
[94mMinify Main code...[0m Found: 7 files to minify
Process File: ../MMM-Pir.js Process File: ../node_helper.js Process File: ../components/screenTouch.js Process File: ../components/screenLib.js Process File: ../components/screenDisplayer.js Process File: ../components/progressbar.js Process File: ../components/pirLib.js [92mDone[0m
[94mTry to Disable screen saver...[0m Found: screen saver in gsettings gsettings screen saver already disabled Found: screen saver in lightdm screensaver via lightdm already disabled Found: screen saver in lxsession lxsession screen saver already disabled [92mDone[0m
[94mRebuild MagicMirror...[0m [92mDone[0m
[92mMMM-Pir is now installed ![0m
added 419 packages in 1m
125 packages are looking for funding
run npm fund
for details
@bugsounet can you look at this.
I check for rebuild or upgrade abd run those instead of npm install for modules during upgrade
@sdetweil
natural command for this is npm run rebuild
(Available only with @bugsounet modules)
I look in the package.json scripts for rebuild and if present execute it
It's not enaugh :)
It's need up to date dependencies (node Abi, nan, electron rebuild,... And cleaned node_modules, and up to date package-lock)
That why i done my own script Take a look to installer folder
I cant look all over for different things I can npm install again which does pre/post installs too
check this
if "-r" option -> do npm run rebuild
Note: i will deprecate onoff
library in next release cycle (24-08-01), so electron rebuild will be not needed
in other hand:
You can add this rule for MMM-GoogleAssistant
and EXTs
EXTs
npm run refresh
in MMM-GoogleAssistant
folder
MMM-GoogleAssistant
and EXTs
components@gonzonia i have fixed upgrade as described above.. please give it another try
use force instead of apply, as you already have the latest MM version
I give it a try, but MMM-Pir is still not working anymore.
Here the new log: `pi@smartmirror:~ $ bash -c "$(curl -sL https://raw.githubusercontent.com/sdetweil/MagicMirror_scripts/master/upgrade-script.sh)" apply update log will be in /home/pi/MagicMirror/installers/upgrade.log doing test run = false Node currently installed. Checking version number. Minimum Node version: v20.9.0 Installed Node version: v20.8.0 installing correct version of node and npm, please wait Check current Node installation ... Node currently installed. Checking version number. Minimum Node version: v20.9.0 Installed Node version: v20.9.0 No Node.js upgrade necessary. Check current NPM installation ... NPM currently installed. Checking version number. Minimum npm version: V10.1.0 Installed npm version: V10.1.0 No npm upgrade necessary.
saving custom.css upgrading from version 2.27.0 to 2.28.0 fetching latest revisions updating MagicMirror runtime, please wait
magicmirror@2.28.0 postinstall npm run install-vendor && npm run install-fonts && echo "MagicMirror² installation finished successfully! "
magicmirror@2.28.0 install-vendor echo "Installing vendor files ... " && cd vendor && npm install --loglevel=error --no-audit --no-fund --no-update-notifier
Installing vendor files ...
changed 1 package in 49s
magicmirror@2.28.0 install-fonts echo "Installing fonts ... " && cd fonts && npm install --loglevel=error --no-audit --no-fund --no-update-notifier
Installing fonts ...
changed 2 packages in 3s MagicMirror² installation finished successfully!
magicmirror@2.28.0 prepare [ -f node_modules/.bin/husky ] && husky || echo no husky installed.
no husky installed.
added 469 packages in 2m
112 packages are looking for funding
run npm fund
for details
Checking for modules with removed libraries
updating dependencies for active modules with package.json files
processing for module MMM-Todoist please wait
----------------------------------
npm WARN deprecated har-validator@5.1.5: this library is no longer supported npm WARN deprecated uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details. npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
added 50 packages, and audited 51 packages in 6s
3 packages are looking for funding
run npm fund
for details
2 moderate severity vulnerabilities
Some issues need review, and may require choosing a different dependency.
Run npm audit
for details.
processing complete for module MMM-Todoist
processing for module MMM-Remote-Control please wait
----------------------------------
npm WARN deprecated uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
added 50 packages, and audited 51 packages in 6s
12 packages are looking for funding
run npm fund
for details
found 0 vulnerabilities
processing complete for module MMM-Remote-Control
processing for module MMM-Pir please wait
----------------------------------
Hinweis: Es wird davon abgeraten zu Pullen, ohne anzugeben, wie mit abweichenden Hinweis: Branches umgegangen werden soll. Sie können diese Nachricht unterdrücken, Hinweis: indem Sie einen der folgenden Befehle ausführen, bevor der nächste Pull Hinweis: ausgeführt wird: Hinweis: Hinweis: git config pull.rebase false # Merge (Standard-Strategie) Hinweis: git config pull.rebase true # Rebase Hinweis: git config pull.ff only # ausschließlich Vorspulen Hinweis: Hinweis: Sie können statt "git config" auch "git config --global" nutzen, um Hinweis: einen Standard für alle Repositories festzulegen. Sie können auch die Hinweis: Option --rebase, --no-rebase oder --ff-only auf der Kommandozeile nutzen, Hinweis: um das konfigurierte Standardverhalten pro Aufruf zu überschreiben. ✔ Rebuild Complete Do you want to continue ? [Y/n] Do you want to continue ? [Y/n] Do you want to continue ? [Y/n] Do you want to continue ? [Y/n] Do you want to continue ? [Y/n] Do you want to continue ? [Y/n] Do you want to continue ? [Y/n] Do you want to continue ? [Y/n] Do you want to continue ? [Y/n] Do you want to continue ? [Y/n] Do you want to continue ? [Y/n] Do you want to continue ? [Y/n] Do you want to continue ? [Y/n] Do you want to continue ? [Y/n] `
ok mmm-pir says there is a conflict between local files and repo on github
do this
cd ~/MagicMirror/modules/MMM-Pir
git reset hard head
git pull
npm install
then restart MagicMirror
Output:
pi@smartmirror:~/MagicMirror/modules/MMM-Pir $ git reset hard head
fatal: mehrdeutiges Argument 'hard': unbekannter Commit oder Pfad existiert nicht
im Arbeitsverzeichnis
Benutzen Sie '--', um Pfade und Commits zu trennen, ähnlich wie:
'git
Is it important to execute the command:
git config pull.rebase false
in the MMM-Pir directory before starting the update script?
no do this
cd ~/MagicMirror/modules/MMM-Pir git reset --hard head git pull npm install
pi@smartmirror:~/MagicMirror/modules/MMM-Pir $ git reset --hard head
fatal: mehrdeutiges Argument 'head': unbekannter Commit oder Pfad existiert nicht
im Arbeitsverzeichnis
Benutzen Sie '--', um Pfade und Commits zu trennen, ähnlich wie:
'git
and if I try: git reset --hard --head
error: Unbekannte Option: `head'
Verwendung: git reset [--mixed | --soft | --hard | --merge | --keep] [-q] [
-q, --quiet weniger Ausgaben, nur Fehler melden
--mixed HEAD und Index umsetzen
--soft nur HEAD umsetzen
--hard HEAD, Index und Arbeitsverzeichnis umsetzen
--merge HEAD, Index und Arbeitsverzeichnis umsetzen
--keep HEAD umsetzen, aber lokale Änderungen behalten
--recurse-submodules[=<reset>]
control recursive updating of submodules
-p, --patch Blöcke interaktiv auswählen
-N, --intent-to-add nur speichern, dass gelöschte Pfade später hinzugefügt werden sollen
--pathspec-from-file <Datei>
Pfadspezifikation aus einer Datei lesen
--pathspec-file-nul Mit der Option --pathspec-from-file sind Pfade durch NUL-Zeichen getrennt
dang this thing is SO picky
git reset --hard HEAD
pi@smartmirror:~/MagicMirror/modules/MMM-Pir $ git reset --hard HEAD HEAD ist jetzt bei 1f90ef8 Update README.md
After git pull, npm install and reboot the problem still exists.
ok, which problem? the PIR module doesn't work?
did you look at the different operation modes.. the OS requires changes to the settings
Yes the MMM-Pir module is not running after the update. I get no output of the module on my mirror and the screen didn't switch of. Before I'm running the update script the module is running fine.
I‘m running Raspbian 11 Bullseye. In MMM-Pir I‘m using mode: 1 - use vgencmd (For raspbian 10/11) with the entry dtoverlay=vc4-fkms-v3d in /boot/config.txt
I don't know.. you'd have to talk to the MMM-Pir author..
Ok. Thanks for your time.
I am going to close this as its really a module problem
I was running the update and it failed on MMM-Pir (https://github.com/bugsounet/MMM-Pir/issues/81)
However, once it failed I got a message "Do you want to continue?" but it flooded the terminal like it was stuck in a loop. Answering Y or n didn't help. I had to Ctrl-C to stop it.