Read the statement by Michael Teeuw here.
PIR-Sensor - put your mirror to sleep if not used
-
-
@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 -o
switches the monitor connected to the Pi off,tvservice -p
switches 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 9
command, 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
xrefresh
to work when given via ssh, the correct display variable has to be set (in my case):
export DISPLAY=:0
I 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.