Read the statement by Michael Teeuw here.
Bugsounet and MMM-Pir
-
@sdetweil yes! :-)
-
Hi everyone,
I didn’t quite get it right. Are there still problems with MMM-Pir?
I see that there are already two pull requests on https://github.com/Coernel82/MMM-Pir/pulls (one is from me). I would be willing to maintain the module, if no one else does.
Happy to hear from you @coernel
-
@FrostByte .
Yes there are still “problems”.
@coernel has prepared a re-upload of bugsounet’s MMM-Pir.
But for some reasons this has failed.Several entities are missing in his upload (including e.g. the core MMM-Pi.js and several other linked and necessary sub-programs (Described in more detail in this post).
I’ve copied a tar.gz file of my own local repository-copy here.
This copy is installable with npm install in the respective MMM-Pir directory in mirror Version 2.30 (NOT tested in brand new 2.31!).
It works without problems on a Pi4 with bullseye.
It does NOT work on a Raspi5/bookworm “out of the box”.
In the meantime I’ve identified and corrected the root cause for this (wrong parameter for the xrandr-call).
This correction is NOT reflected in the URL above because I’ve done this correction after the upload.
I can share this with you if you are interested in - only a very minor adoption and only for MY use-case (working without wayland and with x11).From my side it would be really highly appreciated if somebody can take the responsibility for maintenance of this pretty module because I really like it very much.
I definitely NOT able to do this but I’m definitely willing to give any additional support in the course of my (tiny) abilities…Let me know what you’re thinking about.
Warm regards,
Ralf -
Okay, let’s go into detail. @rkorell
As already written by @sdetweil , the node_modules directory is created when npm run setup (or npm install as it should be called).
In addition, the ‘missing files’ are also created dynamically when this command is called. See:
lukas@smartmirror:~/MagicMirror/modules$ git clone https://github.com/Coernel82/MMM-Pir.git MMM-Pir-test lukas@smartmirror:~/MagicMirror/modules$ cd MMM-Pir-test lukas@smartmirror:~/MagicMirror/modules/MMM-Pir-test$ npm run setup lukas@smartmirror:~/MagicMirror/modules/MMM-Pir-test$ ls -al components/ total 68 drwxr-xr-x 2 lukas lukas 4096 Apr 1 19:06 . drwxr-xr-x 10 lukas lukas 4096 Apr 1 19:53 .. -rw-r--r-- 1 lukas lukas 4101 Apr 2 11:23 cronJob.js -rw-r--r-- 1 lukas lukas 2241 Apr 2 11:23 governorLib.js -rw-r--r-- 1 lukas lukas 3894 Apr 2 11:23 motion.js -rw-r--r-- 1 lukas lukas 1563 Apr 2 11:23 motionLib.js -rw-r--r-- 1 lukas lukas 757 Mar 3 19:09 MotionSensor.py -rw-r--r-- 1 lukas lukas 3755 Apr 2 11:23 pirLib.js -rw-r--r-- 1 lukas lukas 6068 Apr 2 11:23 screenDisplayer.js -rw-r--r-- 1 lukas lukas 19159 Apr 2 11:23 screenLib.js -rw-r--r-- 1 lukas lukas 1763 Apr 2 11:23 screenTouch.js
I use Wayland/labwc (Debian GNU/Linux 12 bookworm) on aarch64 Raspberry Pi 3B and everything is working for my Pir configuration. I did not use your copy.
So i am asking again, are there some runtime errrors? So please send me errrors logs.
The ‘build’ step in package.json is really very confusing. That’s why I’ve started to organise it: https://github.com/Coernel82/MMM-Pir/compare/main...LukasWestholt:MMM-Pir:main#diff-7ae45ad102eab3b6d7e7896acd08c427a9b25b346470d7bc6507b6481575d519
Best regards,
Lukas -
@lif So in my experience, your error just means that you didn’t run ‘npm run setup’!
-
@FrostByte said in Bugsounet and MMM-Pir:
As already written by @sdetweil , the node_modules directory is created when npm run setup (or npm install as it should be called).
This one I’ve missed or was to blonde, to see …
If the install is creating necessary files all “should” be fine.
Despite the fact that in the original screenLib.js is an error (for x11 - regarding handling because the calls are slightly different as coded).
Wayland does not work properly with MagicMirror on my Pi5 - so I’ve switched back to x11, found the above error and corrected this.
Not sure how to handle this in “release” and your maintenance of module.What have I done?
See here:
This is line 311 (of screenLib.js ):exec("DISPLAY=:0 xrandr | grep 'connected primary'", //--rkorell // original : exec("xrandr | grep 'connected primary'",
this is line 489 (of screenLib.js ):
// original exec(`xrandr --output ${this.screen.hdmiPort} --auto --rotate ${this.screen.xrandrRotation}`, (err) => { exec(`xrandr --output ${this.screen.hdmiPort} --primary --mode 2560x1440 --rate 59.951 --pos 0x0 --rotate ${this.screen.xrandrRotation}`, (err) => {
especially the second one was disturbing because the statement simply doesn’t work - this option “auto” is something one can find everywhere referenced but it never worked as far as I have tried to research. from own experience (see above) it don’t work. I guess “–auto” should recover the current settings -but it doesn’t (on bookworm!) . Hard coded screen resolution is definitely no candidate for broader distribution …
(First one “only” produces an error message)
These are my findings.
I’ve mistakenly (not aware of the “dynamically created” libraries/dependant modules) linked the problems of the thread owner with the missing libraries in HIS installation to the likewise missing modules in git clone…Sorry for confusion!
Ralf
-
@rkorell Thanks for your answer! That makes total sense. Thanks for reporting your experience. I’ll keep that in mind.
With Wayland it took me tens of hours to rotate the display by 90 degrees via autostart and I often thought about migrating to X11 back. But in the end it worked.
-
@FrostByte
I don’t know if it helps but the only way I could get my old DVI input monitor to turn on & off was with Wayland enabled and the commandsDISPLAY=:0.0 xrandr --output HDMI-1 --auto --rotate left
and
DISPLAY=:0.0 xrandr --output HDMI-1 --offNick
-
@lif with wayland enable it should be wl_randr
xrandr is for x11 -
hi, i just want to drop this here.
my magic mirror is running on a zero2 but very laggy, needs like 10 sec to activate the screen form the pir, often startup failures and so on.
i was about to move to a bigger raspi and tried to migrate my installation from the zero2 to a pi3.
unfortunatelly did not got MMM-Pir running.so i switched over to MMM-Universal-Pir and everything is running so much smoother.
no need to replace the zero2 anymore :)