Read the statement by Michael Teeuw here.
PIR-Sensor - put your mirror to sleep if not used
-
@paviro, I also don’t understand where it comes from, especially since the MagicMirror appears as it should immediately after boot. At first glance, the monitor (Philips 273V5L) and Pi seem to play nice: EDID information is correct,
tvservice -sgives the native resolution and refresh rate of the monitor. If I can find some time, I will look into it. However, I am also quite earger to start playing with your Facial-Recognition module… :relaxed: -
This is more of a PSA than anything else, but particularly since the tvservice is part of the rPi’s firmware. While running
'sudo apt-get update && sudo apt-get upgrade'will upgrade your rPi’s packages and firmware, it may not be the latest version. For most, this is okay. But if you’re like me, who likes to live on the bleeding edge of things, particularly when something isn’t working right, running'sudo rpi-update'separately will update the firmware only, including binaries such as'tvservice'since they’re part of the firmware, not just a standard package (in fact, you can’t find it as a stand alone package through'apt-cache'.)Use at your own risk. :)
-
I’m getting the following error:
start-magic-0 (err): WARNING! Could not find config. Please create one. start-magic-0 (err): App threw an error when running [Error: Module version mismatch. Expected 47, got 48.] start-magic-0 (err): [Error: Module version mismatch. Expected 47, got 48.]I’ve just cloned the git repository and installed the dependencies.
And that is my config:{ module: 'MMM-PIR-Sensor', config: { sensorPIN: 22, powerSaving: true } }, -
Please use Node v5 not v6 one of the dependencies is not yet ready for v6.
-
Can you tell me how to do that, please?!
-
First Google result when searching for
downgrade node to v5:)
Also do not forget to executenpm installand if that does not work reinstall the module from GitHub after you downgraded. -
@paviro, but but but … @MichMich said … he said … he said node 6.1.0 is now supported. Dependencies be damned, they need to catch up.
-
-
@MichMich, I have a laser … let’s tie him up and put his hand under the beam. That’ll teach him!
-
He is from the stone age. He doesn’t know what a laser is. 😱
-

-
Ha, ha :laughing:
Will change my dependencies when I have some spare time. -
At first: Thank you very much.
This module is great and works fine for me.
When it’s allowed to make some suggestion…
you maybe could add a possibility to switch wireless sockets.
The effort for this shouldn’t be much, when you can use xkonni’s remote control.
https://github.com/xkonni/raspberry-remote
This would be a great possibity for those, who don’t feel comfortable to use a 230V relais… (I studied Mechatronics, so i don’t care :P) -
Feel free to send a pull request! :)
-
@paviro any suggestions on what relay to get for use with this? There are lots of choices on amazon
-
Ok. When I’ve time, I will get a wireless transmitter.
Would be embarrasing if it wouldnt work because I’ve never tried :anguished: -
@paviro I finally found some time to look into the problem I had some more. The exact origin is still unclear to me, but I did figure out that my problem, it is not related to your module, or the MM software in general. I got the same behaviour over ssh:
tvservice -oswitches the monitor connected to the Pi off,tvservice -pswitches it back on, but the screen would appear black. After fiddling around a little bit, I found another solution that does not require root rights. Instead of using thesudo chvt 7 && sudo chvt 9command, the problem can also be solved usingfbset. My modified version of the activateMonitor function file node_helper.js:activateMonitor: function () { if (this.config.relayPIN != false) { gpio.digitalWrite(this.config.relayPIN, this.config.relayOnState) } else if (this.config.relayPIN == false){ exec("/opt/vc/bin/tvservice -p", null); exec("/bin/fbset -depth 8 && /bin/fbset -depth 16 ", null); exec("/usr/bin/xrefresh",null); }For the command
xrefreshto work when given via ssh, the correct display variable has to be set (in my case):
export DISPLAY=:0I have added this line to my .profile file in the /home/pi directory so that I don’t have to type it every time I log in via ssh. -
@MechMatt Have a look at the PowerSwitch Tail. If you live in the US, you can buy an assembled version from Adafruit. If you’re in 240V land (like me), you will have to do some (basic) soldering. Works like a charm for me. :-)
-
That’s really odd that you have to go through all of that. On my rPi-3 with the most recent Raspbian Jessie release, I can use
'tvservice -o'and'tvservice -p'and it just works. I don’t have to do anything else. It’s all running as the unprivileged user'pi'(and without issuing'sudo'before each command.) I wonder if it has something to do with the monitor and what it responds with when a signal is sent … Glad you figured it out though. -
@KirAsh4 I agree, it’s very strange. Like you, I am using a rPi-3 with the most recent version of Raspbian Jessie and run everything as user
pi. So maybe it is the monitor (Philips 273V5l). Which one do you use?Although the problem is fixed, I would like to know what is going on.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login