module is great but doesnt seem to be recognizing my clicks. its not sending out a notification, i only have buttons installed for testing so not sure if its that?
Read the statement by Michael Teeuw here.
Posts
-
[MMM-Buttons] Not recognizing button presses
-
RE: MMM-PIR-Sensor is turning off the screen when it detects user?
@cowboysdude Perfect, so I should expect it to shut off by the time the system loads to the prompt.
Yes it has two sensors, one for sensitivity and the other for how long to send the active signal. Suppose I’ll just play around a bit. Maybe i’ll try find the logs for wherever it tells you when cron jobs have run. Not having any luck so far. i might be doing the cron part wrong, i’ve never played around with cron jobs before.
Im thinking its the pir.py script as I’ve done the cron job right I think.
edit: locations of the startup and shutdown script in pir.py need to be updated! Doh!
-
RE: MMM-PIR-Sensor is turning off the screen when it detects user?
@cowboysdude Great i’ll move it across and keep it simple. And yes my sensor is installed to your default pin. Just so I can get an idea if its working, when would the screen shut off? Is this before MM loads or after?
-
RE: MMM-PIR-Sensor is turning off the screen when it detects user?
@cowboysdude Trying to give this a shot, cloned it into /home/pi/Pir-Sensor/ and changed the shutdown/startup files and confirmed they work, running with sh.
/opt/vc/bin/tvservice --preferred && sudo chvt 6 && sudo chvt 2
#! /bin/bash /opt/vc/bin/tvservice -o
In my crontab I have:
@reboot python cd /home/pi/Pir-Sensor/pir.py &
but it doenst look like its doing anything on reboot, ive confirmed the sensor is working correctly and i’ve run the chmod commands.
-
RE: MMM-PIR-Sensor is turning off the screen when it detects user?
@cowboysdude Thanks for the tip, it does seem like a lot less hassle.
-
RE: MMM-PIR-Sensor is turning off the screen when it detects user?
@Jopyth
On this line/opt/vc/bin/tvservice --preferred && sudo chvt 6 && sudo chvt 7
changing the 7 to 2 fixed being able to turn the screen back on.
/opt/vc/bin/tvservice --preferred && sudo chvt 6 && sudo chvt 2
The only issue im having with this now seems to be that on a reboot the screen stays on if the sensor is not detecting anyone. Tested with a small script to show the sensor is sending a 0. Then when I trigger the sensor after a boot it shuts off the screen but then everything starts working properly.
-
RE: MMM-PIR-Sensor is turning off the screen when it detects user?
Thanks not sure this worked, looks like the screen shuts off still. Looked through the code and found that “/opt/vc/bin/tvservice -o” shuts off my monitor correctly, but “/opt/vc/bin/tvservice --preferred && sudo chvt 6 && sudo chvt 7” does not turn it back on. When i try it on the command line it says “Powering on HDMI with preferred settings” but it doesnt turn back on.
Also I’m not even sure its shutting down on its own but cant really test that as i dont have a reliable PIR on/off function yet.
edit: well it does look like that command turns the monitor back on as the light stops blinking and stays on, but the screen is just blank
-
MMM-PIR-Sensor is turning off the screen when it detects user?
Ive managed to get the PIR Sensor installed, but when I trip the sensor it shuts off my screen. I see in the pm2 logs that MMM-PIR-Sensor is sending a USER_PRESENCE notification.
Wondering if anyone has seen this before, or how I can reverse this?
-
RE: [MMM-PIR-Sensor] Install failing
@Mar for anyone else who is getting this an npm rebuild fixes it. from here https://github.com/atom/apm/issues/635
-
RE: [MMM-PIR-Sensor] Install failing
using PM2 Im able to get the logs when starting, and even though it installed with your instructions i now get this error in the logs.
0|mm | Error: The module '/home/pi/MagicMirror/modules/MMM-PIR-Sensor/node_modules/epoll/build/Release/epoll.node' 0|mm | was compiled against a different Node.js version using 0|mm | NODE_MODULE_VERSION 50. This version of Node.js requires 0|mm | NODE_MODULE_VERSION 51. Please try re-compiling or re-installing 0|mm | the module (for instance, using `npm rebuild` or`npm install`). 0|mm | at Object.Module._extensions..node (module.js:598:18) 0|mm | at Module.load (module.js:488:32) 0|mm | at tryModuleLoad (module.js:447:12) 0|mm | at Function.Module._load (module.js:439:3) 0|mm | at Module.require (module.js:498:17) 0|mm | at require (internal/module.js:20:19) 0|mm | at bindings (/home/pi/MagicMirror/modules/MMM-PIR-Sensor/node_modules/bindings/bindings.js:76:44) 0|mm | at Object. (/home/pi/MagicMirror/modules/MMM-PIR-Sensor/node_modules/epoll/epoll.js:1:99) 0|mm | at Module._compile (module.js:571:32) 0|mm | at Object.Module._extensions..js (module.js:580:10) 0|mm | unclutter: someone created a sub-window to my sub-window! giving up