Read the statement by Michael Teeuw here.
MMM-PIR-SENSOR not working
-
This post is deleted! -
@mab6435 said in MMM-PIR-SENSOR not working:
My modification to the modules config file looks like this.
{
module: “MMM-PIR-Sensor”,
}Bur that is not like it is described in the readme of the module.
try:
{ module: 'MMM-PIR-Sensor', config: { sensorPIN: 22, powerSavingDelay: 120 // in seconds } },
Also u need to use a powersaving delay. Cause the default is 0 !
And i am not sure, but i think u used “ instead of "
-
That happens when users don’t use a code block to paste their code. Quotes get screwed up.
-
This post is deleted! -
OH nice so now we’re deleting messages…Thanks appreciate that…
-
Hi guys, thanks for the help. Unfortunately that did not fix the issue…
I changed the code like you mentioned. Does anyone have any idea why the monitor never turns off. Googling the topic it seems other people have had a similar issue but no solutions ever been found.Its very strange to me because with a python script I have it printing out when it detects motion and when it detects none and it works flawlessly. I have a feeling that for some reason the MMM-PIR-SENSOR isn’t actually connecting with the rest of my magic mirror when I start things up. Below is my entire config.js file.
modules: [
{ module: "clock", position: "top_left" }, { module: "compliments", position: "lower_center" }, { module: 'MMM-PIR-SENSOR', config: { sensorPIN: 22, powerSavingDelay: 120 // in seconds } }, { module: "newsfeed", position: "bottom_bar", config: { feeds: [ { title: "New York Times", url: "http://www.nytimes.com/services/xml/rss/nyt/HomePage.xml" } ], showSourceTitle: true, showPublishDate: true } }, { module: "MMM-NFL", position: "bottom_left", }, ]
};
-
are u sure, u are using the correct pin?
The Module uses BCM numbering, so if u write in your config to use 22, it is physically 15, and this is GPIO 3!type in console, while u are running through the PIR:
gpio read 3
before detecting it must give out a “0”. WHILE moving through the PIR it must give out a “1”
or simply type
gpio readall
before and while the PIR detects to compare results and see what Pin you are really using.and please check if pm2 gives errors with
pm2 logs
-
@cowboysdude said in MMM-PIR-SENSOR not working:
OH nice so now we’re deleting messages…Thanks appreciate that…
We all are here for some fun. But mentioning “dynamite” several times doesn’t help the user and it does not make your joke better.
-
@cruunnerr I’m using the correct pin. I made a python script shown below:
from gpiozero import MotionSensor
pir = MotionSensor(22)
while True:
if pir.motion_detected:
print(“motion detected”)
else:
print(“NOTHING”)With this it will print nothing until i wave my hand in front of it then motion detected until i stop. So I know for a fact the PIR sensor is connected and working properly. Also there are no errors when I start magic mirror the only thing that is mentioned about MMM-PIR-Sensor is it says no helper found for module: MMM-PIR-SENSOR. Anyone have any idea
-
have u tried to delete the Pir Folder in your modules direction and start a simple new installation of the module?
or just go into the MMM-PIR-Sensor folder and type
npm install
again?