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.

    PIR and config.js

    Scheduled Pinned Locked Moved Utilities
    16 Posts 3 Posters 5.6k Views 4 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.
    • S Offline
      shall_ @N6NG
      last edited by

      @N6NG I have just spent the evening getting my MM working with this module. What do you want this module to do? turn the screen off 20 seconds after motion is detected?

      I am using the latest version of Desbian so i had to used the default xrandr command. but I seem to have got it working fine. I was also having issues with GPIO pin 2 so I changed it to pin 22.

      If it helps, I can share my config file for this module.

      N6NGN 2 Replies Last reply Reply Quote 1
      • N6NGN Offline
        N6NG @shall_
        last edited by

        @shall_ Yes… I would like to look at it… If you would like not to post it to public, you can send it to my protected email
        wg7dgxytg@relay.firefox.com
        Thanks
        Dennis

        1 Reply Last reply Reply Quote 0
        • N6NGN Offline
          N6NG @shall_
          last edited by

          @shall_ Although it might help others if you don’t mind posting it here…
          Thanks
          Dennis

          1 Reply Last reply Reply Quote 0
          • N6NGN Offline
            N6NG
            last edited by

            I never saw an example of what the config.js would look like to have the vcgencmd be used to turn the screen on and off. Would someone post a part of a config.js with this in use so I can get a look at how it would be used? I would appreciate it.
            Thanks all
            Dennis

            S 1 Reply Last reply Reply Quote 0
            • S Offline
              sdetweil @N6NG
              last edited by

              @N6NG edit the node_hekper.js and see what it does. change as u see fit

              Sam

              How to add modules

              learning how to use browser developers window for css changes

              N6NGN 1 Reply Last reply Reply Quote 0
              • N6NGN Offline
                N6NG @sdetweil
                last edited by

                @sdetweil Use the whole node_helper.js except as I modify it? The only thing I would modify would be the sensor pin number… All else would stay the same?
                Thanks

                N6NGN 1 Reply Last reply Reply Quote 0
                • N6NGN Offline
                  N6NG @N6NG
                  last edited by

                  @N6NG Do I modify it where it is or do I copy it into the config.js ? If I modify it where it is and change the sensor pin what would I put in the config.js?

                  S 1 Reply Last reply Reply Quote 0
                  • S Offline
                    sdetweil @N6NG
                    last edited by sdetweil

                    @N6NG said in PIR and config.js:

                    @N6NG Do I modify it where it is or do I copy it into the config.js ? If I modify it where it is and change the sensor pin what would I put in the config.js?

                    all you are doing is changing the vcgencmd string

                    exec(“…”)

                    then everything else is normal in config.js

                    pin and commandType (I didn’t look at the module doc)

                    Sam

                    How to add modules

                    learning how to use browser developers window for css changes

                    N6NGN 1 Reply Last reply Reply Quote 0
                    • N6NGN Offline
                      N6NG @sdetweil
                      last edited by

                      @sdetweil Ok Sam… thanks I’ll give it a try and see how it does… will let you know…

                      Dennis

                      N6NGN 1 Reply Last reply Reply Quote 0
                      • N6NGN Offline
                        N6NG @N6NG
                        last edited by

                        @N6NG When I put the
                        exec (“/usr/bin/vcgencmd display_power 0”, null);
                        in the config.js I get an error. When I run npm run config:check it says that line has an Unexpected token
                        “/usr/bin/vcgencmd display_power 0”

                        Dennis

                        S 2 Replies Last reply Reply Quote 0
                        • S Offline
                          sdetweil @N6NG
                          last edited by

                          @N6NG be careful copy/paste, the forum without code marker uses the slanted. single and double quotes. used by word processing apps

                          JavaScript expects the upright versions

                          Sam

                          How to add modules

                          learning how to use browser developers window for css changes

                          N6NGN 1 Reply Last reply Reply Quote 0
                          • N6NGN Offline
                            N6NG @sdetweil
                            last edited by

                            @sdetweil I typed it in straight from the keyboard… No copy and paste at all… Still the still the same error…
                            Dennis

                            1 Reply Last reply Reply Quote 0
                            • S Offline
                              sdetweil @N6NG
                              last edited by

                              @N6NG that doesn’t go on config.js, it goes in the node_helper.js to replace what it already does, if it’s different.

                              Sam

                              How to add modules

                              learning how to use browser developers window for css changes

                              N6NGN 1 Reply Last reply Reply Quote 0
                              • N6NGN Offline
                                N6NG @sdetweil
                                last edited by

                                @sdetweil Oh… ok… thanks… I’ll do that.
                                Dennis

                                1 Reply Last reply Reply Quote 0

                                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 / 1
                                • 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