MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.

    Motion Detector

    Scheduled Pinned Locked Moved Utilities
    213 Posts 38 Posters 525.9k Views 39 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • A Offline
      alexyak
      last edited by paviro

      Could you also run the /opt/vc/bin/tvservice -s when your monitor is on?

      cowboysdudeC 1 Reply Last reply Reply Quote 0
      • cowboysdudeC Offline
        cowboysdude Module Developer @alexyak
        last edited by paviro

        @alexyak I did … I posted it above LOL

        /opt/vc/bin/tvservice -s

        I get this:
        state 0x12000a [HDMI CEA (16) RGB lim 16:9], 1920x1080 @ 60.00Hz, progressive

        A 1 Reply Last reply Reply Quote 0
        • A Offline
          alexyak @cowboysdude
          last edited by

          @cowboysdude on the RPI.

          cowboysdudeC 1 Reply Last reply Reply Quote 1
          • cowboysdudeC Offline
            cowboysdude Module Developer @alexyak
            last edited by paviro

            @alexyak /opt/vc/bin/tvservice -s

            I get this:
            state 0x12000a [HDMI CEA (16) RGB lim 16:9], 1920x1080 @ 60.00Hz, progressive

            That’s where I was running it from and I still get the above

            1 Reply Last reply Reply Quote 0
            • A Offline
              alexyak @cowboysdude
              last edited by

              @cowboysdude so just to confirm, when you run the status command on the RPI you get this output, right?

              cowboysdudeC 1 Reply Last reply Reply Quote 0
              • cowboysdudeC Offline
                cowboysdude Module Developer @alexyak
                last edited by

                @alexyak Yes that is correct

                1 Reply Last reply Reply Quote 0
                • cowboysdudeC Offline
                  cowboysdude Module Developer
                  last edited by

                  Is it logging anywhere that we may be able to see what it’s doing exactly?

                  1 Reply Last reply Reply Quote 0
                  • A Offline
                    alexyak
                    last edited by

                    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.

                    strawberry 3.141S 1 Reply Last reply Reply Quote 0
                    • cowboysdudeC Offline
                      cowboysdude Module Developer
                      last edited by

                      This post is deleted!
                      1 Reply Last reply Reply Quote 0
                      • cowboysdudeC Offline
                        cowboysdude Module Developer
                        last edited by paviro

                        /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.

                        1 Reply Last reply Reply Quote 0
                        • strawberry 3.141S Offline
                          strawberry 3.141 Project Sponsor Module Developer @alexyak
                          last edited by

                          @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

                          Please create a github issue if you need help, so I can keep track

                          A 1 Reply Last reply Reply Quote 1
                          • A Offline
                            alexyak @strawberry 3.141
                            last edited by

                            @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.

                            1 Reply Last reply Reply Quote 3
                            • T Offline
                              trividar
                              last edited by

                              Thank you guys for having a look!!

                              A 1 Reply Last reply Reply Quote 1
                              • A Offline
                                alexyak @trividar
                                last edited by alexyak

                                @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).

                                1 Reply Last reply Reply Quote 0
                                • cowboysdudeC Offline
                                  cowboysdude Module Developer
                                  last edited by paviro

                                  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?

                                  A 1 Reply Last reply Reply Quote 0
                                  • A Offline
                                    alexyak @cowboysdude
                                    last edited by

                                    @cowboysdude this is what I had suspected. What kind of camera do you have? Web camera over usb?

                                    1 Reply Last reply Reply Quote 0
                                    • T Offline
                                      trividar
                                      last edited by

                                      I use the pi NoIR camera V1. Sorry for the bad image!

                                      0_1472392762422_99c1caef-3623-4baa-b42a-0ca7c613d088.jpg

                                      1 Reply Last reply Reply Quote 0
                                      • strawberry 3.141S Offline
                                        strawberry 3.141 Project Sponsor Module Developer
                                        last edited by

                                        this sounds that your cam is not getting recognized as a valid webcam

                                        Please create a github issue if you need help, so I can keep track

                                        cowboysdudeC 1 Reply Last reply Reply Quote 0
                                        • cowboysdudeC Offline
                                          cowboysdude Module Developer @strawberry 3.141
                                          last edited by

                                          @strawberry-3.141 said in Motion Detector:

                                          this sounds that your cam is not getting recognized as a valid webcam

                                          I am using the NOIR Picamera that’s interesting because outside the module the camera works fine LOL

                                          Hummmmmmm…

                                          1 Reply Last reply Reply Quote 0
                                          • strawberry 3.141S Offline
                                            strawberry 3.141 Project Sponsor Module Developer
                                            last edited by

                                            can you guys try sudo modprobe bcm2835-v4l2 in the console before starting the mirror

                                            Please create a github issue if you need help, so I can keep track

                                            1 Reply Last reply Reply Quote 1

                                            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
                                            • 1
                                            • 2
                                            • 3
                                            • 4
                                            • 5
                                            • 10
                                            • 11
                                            • 2 / 11
                                            • First post
                                              Last post
                                            Enjoying MagicMirror? Please consider a donation!
                                            MagicMirror created by Michael Teeuw.
                                            Forum managed by Sam, technical setup by Karsten.
                                            This forum is using NodeBB as its core | Contributors
                                            Contact | Privacy Policy