Read the statement by Michael Teeuw here.
Motion Detector
-
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, progressive
So 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.
-
Thank you guys for having a look!!
-
@trividar before I spend some time creating a dev branch, could you please run the magic mirror from the terminal on RPI with the following command line:
npm start dev
The magic mirror will be started with dev tools enabled. Switch to the 'Console" tab in the dev tools and you should be able to see the following output:
“compare result=Infinity,Infinity;0,0” when there’s no movement before your camera and something like “compare result=49,44;31,47” when there’s some movement.
Also if you could also look for errors in this console as well (red colored lines).
-
For me the I get the compare result=Infinity,Infinity:0,0 but it’s not sensing any movement… so it’s the camera that’s the problem here…
I did get an error its says:
NavigatorUserMediaError {name: "DeviceNotFoundError", message "", constaintName: ""}
That tells me it can’t access the camera…
How does one fix that?
-
@cowboysdude this is what I had suspected. What kind of camera do you have? Web camera over usb?
-
I use the pi NoIR camera V1. Sorry for the bad image!