Read the statement by Michael Teeuw here.
Motion Detector
-
@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!
-
@cowboysdude could you please run the magic mirror from the terminal until it switches off and doesn’t switch back on, bring the monitor back with the command and post your screenshot of the terminal?
-
@alexyak Do you mean SSH or shell on the mirror?
-
Could you also run the
/opt/vc/bin/tvservice -swhen your monitor is on? -
@alexyak I did … I posted it above LOL
/opt/vc/bin/tvservice -sI get this:
state 0x12000a [HDMI CEA (16) RGB lim 16:9], 1920x1080 @ 60.00Hz, progressive -
@cowboysdude on the RPI.
-
@alexyak
/opt/vc/bin/tvservice -sI get this:
state 0x12000a [HDMI CEA (16) RGB lim 16:9], 1920x1080 @ 60.00Hz, progressiveThat’s where I was running it from and I still get the above
-
@cowboysdude so just to confirm, when you run the status command on the RPI you get this output, right?
-
@alexyak Yes that is correct
-
Is it logging anywhere that we may be able to see what it’s doing exactly?
-
It’s logging in the terminal window that you use to start the mirror with npm start. You can also start the mirror with “npm start dev” with dev tools and there will be the output from the chromium.
-
This post is deleted! -
/home/pi$ /opt/vc/bin/tvservice -o
Powering off HDMI
/home/pi$ /opt/vc/bin/tvservice -s
state 0x120002 [TV is off]That is off
/opt/vc/bin/tvservice --preferred && sudo chvt 6 && sudo chvt 7
Turns it back on… no problem…this is the tvservice -s when it’s on…state 0x12000a [HDMI CEA (16) RGB lim 16:9], 1920x1080 @ 60.00Hz, progressiveSo somewhere it’s broken in the module itself… it does turn it off [even if you’re standing in front of it moving…which means to me it’s not taping into the camera looking for motion] but not back on… I know the camera is working I’ve taken pictures with it…
So what is getting lost after it turns off? And how or where can I look to see what it’s loggin? I can’t look at the terminal window when it’s off because to do that you’d have to turn it back on… and you can’t.
-
@alexyak the logs from @trividar show only state hdmi on never hdmi off, so maybe the check for on off is not correct in the module, as an idea create a dev branch where you don’t check with tvservice -s, just set a variable hdmi true/false after you running a command and starting with true in the start method of the nodehelper and let them checkout this branch
-
@strawberry-3.141 I have a feeling that the camera is not properly captured from the client side js code. I am going to create a dev branch with a lot more logging soon.
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