Read the statement by Michael Teeuw here.
PIR-Sensor - put your mirror to sleep if not used
-
For people who are not confortable with programming this, or need to buy a pir sensor anyway
You can also buy a pir with motionsensor like this
-
9 verbose stack Error: magicmirror@2.0.0 start: `electron js/electron.js` 9 verbose stack Exit status 1 9 verbose stack at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/lifecycle.js:214$ 9 verbose stack at emitTwo (events.js:87:13) 9 verbose stack at EventEmitter.emit (events.js:172:7) 9 verbose stack at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/spawn.js:24:14) 9 verbose stack at emitTwo (events.js:87:13) 9 verbose stack at ChildProcess.emit (events.js:172:7) 9 verbose stack at maybeClose (internal/child_process.js:817:16) 9 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
I’ve tested my PIR sensor with a Python script to make sure I’m using the proper GPIO and its functioning as it should. I do see 1 & 0 when I move near the sensor so I don’t think its the hardware.
I’d love to use this module, I was going to do it in python but since you have it in JS I figured why not use that.
-
-
Sorry, no clue. :(
-
@paviro I had to downgrade to node 5.0.0, I confirmed its that version of node. After the downgrade I removed the PIR module and did a git clone and then npm install in the folder. Still the same thing, is there a specific version of node 5 I should be using or a specific version of npm?
I’m running it from
/home/pi/MagicMirror/modules/MMM-PIR-Sensor -
Could you try it with
node serveronly
? -
@joerod also do
npm install
on the mm folder or install the whole thing from scratch :) -
@paviro as a feedback: i used the latest MMM branch and yours and it is working fine with my PIR sensor on a rpi2. I didn’t had to downgrade anything to node 5 (and i also don’t know what it is :D ) Thanks for your work. It is so great that the mirror is starting if a presence is detected!!
-
@DirkS glad to hear! :)
-
Hey Everyone!
I am trying to use this module to turn off/on a tv and im having a bit of trouble on the physical end of things… I got the module working perfectly (tested it with PIR and hdmi on/off). Now I am trying to use a relay with the PIR sensor to have the TV screen itself turn on and off. I was planning on wiring this to the TV power button (so it is essentially the same as pressing the on/off button).I got the relay working… and I was about to take apart my tv when i thought…will even work for the on/off button? When it senses movement it will send the signal and then … turn off the tv I guess. As soon as the movement is undetected it stops sending the signal (or really pulse in this case)… just stopping wouldn’t turn the tv back on either. I guess it needs to send a pulse when it stops detecting movement, and then another one when it does again. Am I thinking about this wrong? Should I wire it to something else? Thanks in advance