Open Selyjohns opened 1 year ago
You still have this issue? I had it too.
Turned out this module wants to read the /dev/gpiomem
folder with the pi
user, but after upgrading my RPi to Bullseye (from Buster) and upgrading MagicMirror to 2.25 this folder has the wrong permissions for use with the mirror.
Have a look here:
https://raspberrypi.stackexchange.com/questions/124402/user-getting-removed-from-group-after-reboot
When you run the provided pir.py
script from the commandline as user pi
it will give an error:
RuntimeError: Not running on a RPi!
Check with:
ls -l /dev/gpiomem
The folder should have crw-rw---- 1 root gpio <size, date, time> /dev/gpiomem
for the module to work, but this folder probably only has crw------- 1 root root <etc, etc>
on it.
I fixed it by adding below 2 commands to the crontab so it will 'stick' on reboots, as /dev/gpiomem
is recreated (in memory) every reboot (note: it changes some of the security on your pi, use with caution):
sudo crontab -e
@reboot sudo chown root.gpio /dev/gpiomem
@reboot sudo chmod g+rw /dev/gpiomem
After this the MMM-PIR-Sensor-Lite worked again for me. (I forked the repo and made some other changes too).
Hello,
Thank you for this module. All works great since a long time.
But, there'is a strange problem that always display a loading status "Chargement..." See screen here
Here is the config.js
Do you know why ? Thank you.