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

Independent display controller based on PIR sensor.

Scheduled Pinned Locked Moved Utilities
14 Posts 4 Posters 12.2k Views 6 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.
  • B Offline
    Beh
    last edited by Beh Nov 2, 2016, 3:30 PM Nov 2, 2016, 3:25 PM

    This is not really a module for the MagicMirror application itself, but I wrote it for my own mirror and I want to share it, if anybody has use for it.

    I wanted a turn-off-my-display-control that is independent from the MagicMirror application. It turns off the display after a given countdown time from the last time a motion was detected by a PIR sensor.
    So every time a motion is recognized, the countdown is set to the maximum countdown time. When no motion is noticed for that time, the display is set to sleep. When then a motion is detected, the display is turned on.

    I also provide a systemd service file, if you want to use it as a service.

    If you have use for it, I put it on GitHub:
    [card:deg0nz/MagicMirror-Display-Controller]

    NOTE:
    If you’re looking for an integrated (and probably easier to use) solution, please take a look at paviro’s awesome PIR-Sensor module.

    B 1 Reply Last reply Nov 3, 2016, 4:22 PM Reply Quote 2
    • B Offline
      bibi @Beh
      last edited by Nov 3, 2016, 4:22 PM

      @Beh Thx for sharing! One question : what are the physical settings to apply to the sensor itself pls? (Jumper & the 2 knobs)

      1 Reply Last reply Reply Quote 0
      • B Offline
        Beh
        last edited by Beh Nov 4, 2016, 4:13 PM Nov 4, 2016, 4:10 PM

        Example configurations for wiring are shown here:

        http://www.raspberrypi-spy.co.uk/2013/01/cheap-pir-sensors-and-the-raspberry-pi-part-1/

        and here:

        https://www.raspberrypi.org/learning/parent-detector/worksheet/

        I can’t really tell you the jumper and knob configurations, because I’m using a simple sensor like this:
        https://www.amazon.de/Keyestudio-Pyroelektrische-Infrarot-Bewegungssensor-Bewegungs-Sensor-Arduino/dp/B01GCRQJ0Y/ref=sr_1_9?ie=UTF8&qid=1478275900&sr=8-9&keywords=PIR+sensor

        Maybe you look in the PIR HOWTO thread or ask a question there:
        https://www.amazon.de/Keyestudio-Pyroelektrische-Infrarot-Bewegungssensor-Bewegungs-Sensor-Arduino/dp/B01GCRQJ0Y/ref=sr_1_9?ie=UTF8&qid=1478275900&sr=8-9&keywords=PIR+sensor

        B 1 Reply Last reply Nov 4, 2016, 6:34 PM Reply Quote 0
        • B Offline
          bibi @Beh
          last edited by Nov 4, 2016, 6:34 PM

          @Beh i see thx! maybe it’s better to use your one to somehow bypass these settings which are a bit frustrating. i did’t really get the systemd option (i am new) but as i understood it’s like a crontab, correct?

          B 1 Reply Last reply Nov 6, 2016, 9:57 AM Reply Quote 0
          • B Offline
            Beh @bibi
            last edited by Nov 6, 2016, 9:57 AM

            @bibi No, it’s more like having it added to the autostart (like on windows). Then it’s running as a service in the background, which can be controlled via systemd’s systemctl command.

            1 Reply Last reply Reply Quote 0
            • B Offline
              bibi
              last edited by Nov 28, 2016, 8:41 PM

              hi @Beh ! unfortunately your module is not working for me :( could you please help me to figure out why? i have bought the same PIR sensor and plug it in the gpio 14 (physical pin 8) thx!

              1 Reply Last reply Reply Quote 0
              • B Offline
                bibi
                last edited by Dec 4, 2016, 10:44 AM

                it’s solved ;-) thx anyway

                1 Reply Last reply Reply Quote 0
                • B Offline
                  bibi
                  last edited by Dec 30, 2016, 12:08 PM

                  @beh hi! i was wondering if there was an easy way to add a fading effect when the mirror goes to sleep and wake up? would be interesting in this as well? thx

                  B 1 Reply Last reply Jan 1, 2017, 11:20 PM Reply Quote 0
                  • B Offline
                    Beh @bibi
                    last edited by Jan 1, 2017, 11:20 PM

                    Hi @bibi, I hope, I understand that right.

                    I don’t think that this is very easy. Because the script just turns the HDMI port of the RaspberryPi to on and off. So a fading effect wouldn’t be quite easy I think

                    B 1 Reply Last reply Jan 1, 2017, 11:22 PM Reply Quote 0
                    • B Offline
                      bibi @Beh
                      last edited by Jan 1, 2017, 11:22 PM

                      @Beh i understand this. No problem and thx for reply! :)

                      S 1 Reply Last reply Jan 7, 2017, 4:33 AM Reply Quote 0
                      • 1
                      • 2
                      • 1 / 2
                      • 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