Read the statement by Michael Teeuw here.
Motion Detector
-
@plumcraft which RPI you have?
-
The latest, RPI 3.
-
@plumcraft strange, I’ve RPI 3 as well and I don’t see this problem … This may be related to which monitor/TV your RPI is connected.
-
I assume too that the behaviour is different between TV’s. On my LG the screen turns blue with a big message of lost signal on HDMI after 10 seconds after the screen turns off. Not so nice - but then again, nobody should be in the room anyway…? ;-)
-
I installed it… it turns off the monitor but won’t turn it back on… suggestions?
-
@plumcraft Yeah there doesn’t seem to be an answer for the blank screen issue…
-
I am sorry to hear about your issues. Trying to think of the best way to troubleshoot that. The module doesn’t do anything fancy. It just executes these in the node_helper to switch on/of the output on HDMI:
Switch off:
/opt/vc/bin/tvservice -oSwitch-on:
/opt/vc/bin/tvservice --preferred && sudo chvt 6 && sudo chvt 7As a first step, could you please try to execute these commands in the ssh terminal?
Note from admin: Please use Markdown on code snippets for easier reading!
-
Hi alexyak
I try it with the commands an it works, it switch off and on.
-
Ok, the next step let’s check whether the off state is detected correctly. After you switched off the monitor with the first command try to execute this in the ssh term:
/opt/vc/bin/tvservice -sand let me know which output you see.
-
output is:
state 0x120002 [TV is off] -
@trividar @cowboysdude paviro is also using the same code lines in his pir sensor module and a user had similar issues, maybe his solution also work for you
https://forum.magicmirror.builders/topic/208/pir-sensor-put-your-mirror-to-sleep-if-not-used/43
https://forum.magicmirror.builders/topic/208/pir-sensor-put-your-mirror-to-sleep-if-not-used/64 -
Thanks everyone I will look into this later today!
-
@strawberry-3-141 unfortunately it didn’t work for me;0( but thanks for your input.
-
@trividar I thought the commands are working for you, as you pointed out 2 hours ago? I was struggling with this myself for a seperate module, it didn’t work in the terminal i had to login at tty6 or with the solution I posted I got weird colors and a zoom effect on my screen, but in the node_helper it worked at least for me.
-
@strawberry-3-141 This two things work for me if i put it in the terminal:
Switch off:
/opt/vc/bin/tvservice -o
Switch-on:
/opt/vc/bin/tvservice --preferred && sudo chvt 6 && sudo chvt 7But not the module. I tried to change node_helper, but if I tried to start pm2 start mm.sh i got just a white screen. Sorry I’m not a coder, I just start to learn.
-
@trividar can you post your pm2 logs
-
I will… I will be in one hour at home and I will post it.
-
my logs without any changes:

If I put in the therminal:
/opt/vc/bin/tvservice --preferred && sudo chvt 6 && sudo chvt 7my monitor turn on and my mirror work…
-
Was your monitor on when you were starting the magic mirror?
-
@alexyak Yes these both work via ssh
Switch off:/opt/vc/bin/tvservice -oSwitch-on:
/opt/vc/bin/tvservice --preferred && sudo chvt 6 && sudo chvt 7When I do this:
/opt/vc/bin/tvservice -sI get this:
state 0x12000a [HDMI CEA (16) RGB lim 16:9], 1920x1080 @ 60.00Hz, progressiveBut when I start the mirror with the normal npm start and it runs until the motion sensor time then the screen goes out and won’t come back on…
Note from admin: Please use Markdown on code snippets for easier reading!
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