• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
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 2.9k 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
    sdetweil @N6NG
    last edited by Jan 24, 2023, 12:19 AM

    @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

    N 1 Reply Last reply Jan 24, 2023, 8:27 PM Reply Quote 0
    • N Offline
      N6NG @sdetweil
      last edited by Jan 24, 2023, 8:27 PM

      @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

      N 1 Reply Last reply Jan 24, 2023, 8:30 PM Reply Quote 0
      • N Offline
        N6NG @N6NG
        last edited by Jan 24, 2023, 8:30 PM

        @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 Jan 24, 2023, 10:01 PM Reply Quote 0
        • S Offline
          sdetweil @N6NG
          last edited by sdetweil Jan 24, 2023, 10:02 PM Jan 24, 2023, 10:01 PM

          @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

          N 1 Reply Last reply Jan 24, 2023, 11:34 PM Reply Quote 0
          • N Offline
            N6NG @sdetweil
            last edited by Jan 24, 2023, 11:34 PM

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

            Dennis

            N 1 Reply Last reply Jan 28, 2023, 12:40 AM Reply Quote 0
            • N Offline
              N6NG @N6NG
              last edited by Jan 28, 2023, 12:40 AM

              @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 Jan 28, 2023, 1:11 AM Reply Quote 0
              • S Offline
                sdetweil @N6NG
                last edited by Jan 28, 2023, 1:11 AM

                @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

                N 1 Reply Last reply Jan 28, 2023, 6:57 PM Reply Quote 0
                • N Offline
                  N6NG @sdetweil
                  last edited by Jan 28, 2023, 6:57 PM

                  @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 Jan 28, 2023, 8:50 PM

                    @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

                    N 1 Reply Last reply Jan 28, 2023, 8:53 PM Reply Quote 0
                    • N Offline
                      N6NG @sdetweil
                      last edited by Jan 28, 2023, 8:53 PM

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

                      1 Reply Last reply Reply Quote 0
                      • 1
                      • 2
                      • 2 / 2
                      2 / 2
                      • First post
                        11/16
                        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