A New Chapter for MagicMirror: The Community Takes the Lead
Read the statement by Michael Teeuw here.
  • MM-PIR-motion-poweron

    Development
    1
    0 Votes
    1 Posts
    234 Views
    C

    I created powersaving program for automatically start the RaspberryPi, if a motion ist detected via PIR-sensor and shut down after a waiting time.

    It’s at Git and I want to share it with you. I would be happy if you give me Feedback.
    https://github.com/ChrisBaehrig/MM-PIR-motion-poweron

  • 0 Votes
    2 Posts
    624 Views
    S

    @anthem212 well there are three commands to turn off the output

    vcgencmd
    dpms

    these two turn off the HDMI port, NOT the monitor/tv

    and cec-client

    this turns off the monitor/tv
    IF it supports the cec command(correctly)

    and then you would need a people sensor,
    most use use infrared, as it’s ‘easy’.

    there are modules that put all this together.

    search here for MMM-PIR

    Now to get your speed requirements will be a little harder. I use TV’s for my two main mirror systems. 43 and 55 in.
    one supports cec, the other doesn’t.
    when I turn off the HDMI port on both, they put up a big NO INPUT screen , and power off after 15 minutes.
    that is energy star compliant.
    but you can’t turn them on via software

    if it supports cec, then maybe you can turn off/on via software. mine is inconsistent. always can turn on, but not off
    on is the same as pushing the button, takes 15 seconds, displays the product logo and all that.

    I gave up, and just hide the mm content and leave the TV’s on. the one in the hall I call the nightlight!

    I also use a webcam for motion detection, instead of pir, cause that’s what I had at the time

    as yours is a 4k tv, I’m guessing it supports cec

    install the cec-utils package on pi
    sudo apt install cec-utils

    this also only works on my pi 4. not pi3.

  • Want to turn off my monitor

    Troubleshooting
    27
    0 Votes
    27 Posts
    19k Views
    J

    so far so good, no problems. so i can call it a fix for me.

    Thanks

  • 2 Votes
    56 Posts
    87k Views
    S

    @randomnoise said in PIR-Sensor - put your mirror to sleep if not used:

    exec(“xdotool key space”); //simulate spacebar to disable screensaver. Needs xdotool to be installed

    Hello Randomnoise;

    So you did exactly what I am looking to do. Can you elaborate on how to configure this so my PIR will turn off the screen saver? I’ve already installed Xdotool, but I don’t know where to go from there.