Read the statement by Michael Teeuw here.
PIR problem
-
Hi smart people,
My MM has been running without major problems for 5 years.
Lately I experienced some problems, so decided to make a fresh install: Bullseye, MM 2.22 on a Pi 3.
After a lot of work (I am not really good at this, mostly copy-paste) the MM is running.Just 2 problems: major problem: I cannot get de PIR sensor to work anymore (worked perfectly for 5 year).
I tried MMM-Pir (nothing), and MMM-Pir-Sensor-Light (I can see it countdown from 15 minutes, but after 15 minutes the counter starts allover), so it does not turn off the screen.Smaller problem: the default Calendar module disappears after some time and gets back after some more time, strange behaviour.
Can somebody give me an answer (maybe two …)?
Thanks in advance!Peter
-
@Peter
There can be a lot of reasons why the PIR modules are not working anymore.
What module did you use in the previous setup?
Did you run “npm install” in the module again? Or did you only copy the directory to the new setup?
Are there any errors during the installation of the module?You can use my test script to check if the sensor it self triggers an event.
Next step would be to test if the command which controls the screen. Most modules use
vcgencmd
If you run the following command to display should be shut off and 20 seconds later it should be shut on again.
Best way is to run the command via ssh shell./usr/bin/vcgencmd display_power 0; echo "Display should now be off"; sleep 20; /usr/bin/vcgencmd display_power 1; echo "And now it should be on again"
-
@wishmaster270 note vcgencmd is sensitive to the pi firmware level
-
@sdetweil I saw your post about firmware level in one of the other posts. Additionally i think it is depending of the graphical driver used (vc4-kms-v3d vs vc4-fkms-v3d).
But if it works with the posted command most of the modules should be fine. -
-
@wishmaster270 said in PIR problem:
@Peter
There can be a lot of reasons why the PIR modules are not working anymore.
What module did you use in the previous setup?
Did you run “npm install” in the module again? Or did you only copy the directory to the new setup?
Are there any errors during the installation of the module?You can use my test script to check if the sensor it self triggers an event.
Next step would be to test if the command which controls the screen. Most modules use
vcgencmd
If you run the following command to display should be shut off and 20 seconds later it should be shut on again.
Best way is to run the command via ssh shell./usr/bin/vcgencmd display_power 0; echo "Display should now be off"; sleep 20; /usr/bin/vcgencmd display_power 1; echo "And now it should be on again"
Thanks for your answer.
I used MMM-Pir_Sensor in my previous setup.
I made a complete new install, so I did not copy the directory to the new setup.
I will try your commands in the next days, will keep you informed.
Peter -
@sdetweil
I think it is more a problem of the graphical stack. Just checked my new installation of today.
With “vc4-kms-v3d” my test commands from above result in the screen being unchanged after i changed back to the “vc4-fkms-v3d” driver in the “/boot/config.txt” and a reboot everything is working as before.
I run the kernel 5.15.84-v7l+ at the moment. -
@wishmaster270 sorry for my stupid question, I use Gpio pin 17, do I have to use that number in line 6 of your test script?
Peter -
@Peter
No stupid question more a lack of information/documentation of me ;-)You can call the script with the GPIO number as first argument. In your case it should be:
./testGPIO.py 17
After some research i am pretty sure the problem is the graphics stack in your case. I am working on a solution for the problem
-
@wishmaster270 great!
I will try it as soon as I find time …
Have a nice evening!
Peter