Read the statement by Michael Teeuw here.
Bugsounet and MMM-Pir
- 
 @sdetweil said in Bugsounet and MMM-Pir: @lif and you are using the correct pin definition Pir: { mode: 0, gpio: 21 },Yes, the working script is: 
 from gpiozero import MotionSensor
 from datetime import datetime
 import os, time
 import RPi.GPIO as GPIOpir = MotionSensor(21) 
 while True:pir.wait_for_motion() now = datetime.now() current_time = now.strftime("%H:%M:%S") print("Movement detected at", current_time) pir.wait_for_no_motion()
- 
 @lif I meant MMM-PIR config setup there are different numbering schemes for GPIO pins and different ways to access the doc (readme) describes the different choices. 
- 
 @sdetweil said in Bugsounet and MMM-Pir: @lif and you are using the correct pin definition Pir: { mode: 0, gpio: 21 },Yes, I think so, the pir is connected to pin 40 on the Raspberry pi 3b which I’m sure is GPIO 21 
- 
 @lif and if you change to mode 1?? which matches your python lib test? 
- 
 @sdetweil said in Bugsounet and MMM-Pir: @lif and if you change to mode 1?? which matches your python lib test? No difference. I have added a header: “PIR”, line before the config and that is not showing either. 
- 
 @lif are there any errors listed in the MM startup messages?? if using pm2 to auto start pm2 logs --lines =xxx xxx is number of most recent lines to display, default 15, 
 usually need 100 or more for full message list
- 
 @sdetweil said in Bugsounet and MMM-Pir: @lif are there any errors listed in the MM startup messages?? if using pm2 to auto start pm2 logs --lines =xxx xxx is number of most recent lines to display, default 15, 
 usually need 100 or more for full message listThanks for all your help 
 I think this line might be relevant
 0|mm | [2025-03-24 16:54:30.994] [WARN] No /home/pi/MagicMirror/js/…/modules/MMM-Pir/MMM-Pir.js found for module: MMM-Pir.It’s correct, there isn’t a MMM-Pir.js file in the MMM-Pir directory. 
- 
 @lif module rules module name (exact case) = folder name in modules folder 
 MUST contain at minimum a file name that matches(exact case) of the modulename.jsAND inside that file it MUST contain a module.register(name…) 
 where name MUST match (exact case) the module name
- 
 @lif said in Bugsounet and MMM-Pir: It’s correct, there isn’t a MMM-Pir.js file in the MMM-Pir directory If you had cloned this repository from @coernel - the MMM-pir.js is missing. 
 This must be an error.Nevertheless: I’ve played around with the original version from bugsounet and figured out that editing his “origin” MM-Pir.js was really hard because he has deleted all linefeeds. 
 Seeking around I found an editable clone of the *.js files (including node_helper) in the src folder of the repository.
 This is true for the new clone from coernel …
 give it a try :-)Regards, 
 Ralf
- 
 @rkorell said in Bugsounet and MMM-Pir: Nevertheless: I’ve played around with the original version from bugsounet and figured out that editing his “origin” MM-Pir.js was really hard because he has deleted all linefeeds. called minified 
