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.

    MMM-SimplePIR

    Scheduled Pinned Locked Moved Utilities
    3 Posts 2 Posters 812 Views 3 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.
    • M Offline
      myfingersarecold
      last edited by

      https://github.com/ryanjblajda/MMM-SimplePIR

      A simple PIR module that uses a PIR sensor with a digital output, and it utilizes gpio interrupts to check it. I liked the MMM-Pir module that once existed, but I didnt see an easy way to add a feature that physically turned off a monitor after a specified timeout, as well as blanking the screen. This utilizes the gpio outputs on the Pi to drive buttons intended for use with this RF controlled outlet (https://a.co/d/4hUItyW) [driven by some NPN transistors with current limiting resistors to prevent gpio damage].

      The module emits the following notification: MMM_PIR-SCREEN_POWERSTATUS, with a boolean payload of whether the display is on or off. this happens when the display is muted, or physically turned on/off

      If the module is visible, it will provide some basic debugging statistics

      An example config is shown below: [actually my exact config from my mirror]

      {
          module: 'MMM-SimplePIR',
          //position: 'top_left',
          hidden: true,
          config:
          {
              debug: true,            //enables debug printing
              blankScreenTimeout: 1,  //in minutes, when the screen will be blacked out. 
              offScreenTimeout: 60,   //in minutes, when the screen will be physically turned off.
              pirSensorPin: 17,       //where the output of the PIR sensor should be connected
              displayOnPin: 23,       //connect this to either the on button on a display, or to the RF outlet controller [or whatever you want]
              displayOffPin: 24,      //connect this to either the off button on a display, or to the RF outlet controller [or whatever you want]
          }
      },
      
      S 1 Reply Last reply Reply Quote 1
      • S Offline
        sdetweil @myfingersarecold
        last edited by

        @myfingersarecold add to the 3rd party list

        you edit it

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        M 1 Reply Last reply Reply Quote 0
        • M Offline
          myfingersarecold @sdetweil
          last edited by

          @sdetweil should be done already, figured i would add it here as well.

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