Read the statement by Michael Teeuw here.
MMM-Pir toggling
-
@ttt126 troll wasn’t indended for you. he is a busy guy. PIR is busted all over the place with bookworm.
-
Thanks, opened an issue here:
https://github.com/KristjanESPERANTO/MagicMirror-3rd-Party-Modules/issues
Will see
-
Hi,
MMM-Pir v2 is under coding
Unfortunately, it is not possible to use mode 6 and 7 at the same time (same GPIO)This module send
USER_PRESENCE
notification withtrue
orfalse
payload (it’s the screen state)
You can trigger it with this module MMM-NotificationTrigger and exec a personal script for thisNote:
- python
RPi.GPIO
will be deleted (in next release) because there is a compatibility problem with pi5 and with bookworm too. - I will try to recode it with
gpiod
library for both compatibility
- python
-
Would it be possible to create a mode in which a relay is switched when detected on the PIR and after the new timer has expired.
So an on off toggle, so to speak. This would make it possible to switch any monitor using the Stanfby button. HDMI on/off would then not be necessary, simply a relay on the monitor button and all monitors could be used.
Unfortunately, I’m not that good at cascading the module.
Thank you for your great work -
Thank you very much, I spent the whole day trying to understand notification triggers and producing a config, unfortunately without success.
Maybe you can help me out. how do I do the config so that the trigger can be taken over by mmmpir? I’ve already created a small py script with a gpio pin that goes on and off, it’s in the root directory.
But I just can’t get the execut function to be implemented.{
module: “MMM-NotificationTrigger”,
config: {
triggers:[
{
trigger: “USER_PRESENCE”,
fires: [
{
exec: “/neu1.py”
}
],
},
]
}
}, -
@ttt126 said in MMM-Pir toggling:
exec: “/neu1.py”
that means in the root system folder’if you meant YOUR home folder
that would be , replace username with really logged on user for home folder/home/username/neu1.py
there may have been messages posted to the MM startup output
-
Even with /home/pi/neu1.py it is not responding.
Do I have to devine true and fals state in the config as well? -
@ttt126 can you execute the script manually from the terminal window?
-
Yes, this I can.
Kliking - exexute, relay klliks on an off once. -
@ttt126 ok, i was checking for permissions
did you check the messages from npm start location, see if any errors were posted