A New Chapter for MagicMirror: The Community Takes the Lead
Read the statement by Michael Teeuw here.
  • 2 Votes
    2 Posts
    607 Views
    KristjanESPERANTOK
    Nice! :smiley: Please add it to the modules list: https://github.com/MagicMirrorOrg/MagicMirror/wiki/3rd-party-modules.
  • PIR sensor Disaster

    Moved Troubleshooting pir pir sensor
    6
    0 Votes
    6 Posts
    2k Views
    S
    @delecive woohoo!
  • LIRC AUTOMATION

    Development automation coding gpio lirc pir python sensor
    4
    0 Votes
    4 Posts
    964 Views
    S
    @sranj ok, so u receive the trigger in the node_helper, and need to launch/exec/spawn your python pgm so you need the child_process library https://nodejs.org/en/knowledge/child-processes/how-to-spawn-a-child-process/ PIR uses the same library to launch the tvservice command, or vgencmd to blank the screen
  • PIR Sensor help

    Show your Mirror pir
    2
    0 Votes
    2 Posts
    652 Views
    cowboysdudeC
    No but you need at least a pi… hook the sensor to the GPIO pins…no bread board is needed.
  • LG FLatron 2242PE check signal cable PIR Sensor

    Unsolved Troubleshooting pir sensor
    3
    0 Votes
    3 Posts
    2k Views
    A
    @Justinvd0203 I had a similar problem with my LG Monitor and PIR-Sensor. In my case i had the following behavior: Using HDMI Connection: switching off was possible, wake up not Using VGA Connection (with HDMI->VGA adapter on RPI side): switching off an wake up was possible Details see post. No worry using HDMI->VGA adapter: VGA can also deliver FullHD Resolution. Maybe your problem could be solved with an adapter. AxLED
  • 5 Votes
    11 Posts
    14k Views
    P
    @pascal456 Thank you!
  • PIR Sensor - Sleep LCD monitor

    Unsolved Hardware monitor lcd pir
    10
    1
    0 Votes
    10 Posts
    11k Views
    qu1queQ
    Finally, I’ve finnished my script, and it works like a charm. I paste it here if someone else need it. #!/usr/bin/python3 # PACKAGES NEEDED TO WORK: sudo apt install python3 python3-rpi.gpio # My screen has an USB port, that turns on when screen is on, and off when screen is off. # So, I made a voltage divider with a few resistors to get 3 volts, to activate pin 6 (BCM) # on the raspberry Pi. In this way, the script can 'know' if Screen is ON or OFF. import RPi.GPIO as GPIO import time import subprocess from subprocess import call GPIO.setmode(GPIO.BCM) GPIO.setup(22, GPIO.IN) # PIR's output GPIO.setup(6, GPIO.IN) # Screen power detector GPIO.setup(25, GPIO.OUT) # Relay Input GPIO.setwarnings(False) while (GPIO.input(6) == 0): # IF SCREEN IS ON if (GPIO.input(22) == 1): # PIR DETECTS MOTION call(('/opt/vc/bin/vcgencmd', ' display_power', '1')) GPIO.output(25, GPIO.HIGH) # RELAY ACTIVATION time.sleep(3) GPIO.output(25, GPIO.LOW) time.sleep(60) # THE TIME WE WANT THE SCREEN TO STAY ON if (GPIO.input(22) == 1): # IF PIR DETECTS A NEW MOVEMENT, time.sleep(60) # ACTIVATES THE MIRROR ANOTHER AMOUNT OF SECONDS else: GPIO.output(25, GPIO.HIGH) # WITH THIS LINE, THE SCREEN POWERS OFF TO SAVE ENERGY time.sleep(3) GPIO.output(25, GPIO.LOW) else: GPIO.output(25, GPIO.LOW) while (GPIO.input(6) == 1): # IF SCREEN IS OFF if (GPIO.input(22) == 1): # PIR DETECTS MOTION call(('/opt/vc/bin/vcgencmd', ' display_power', '1')) GPIO.output(25, GPIO.LOW) # SAME AS ABOVE, BUT THIS TIME DON'T ACTIVATE THE RELAY time.sleep(60) if (GPIO.input(22) == 1): time.sleep(60) else: GPIO.output(25, GPIO.HIGH) # WITH THIS LINE, THE SCREEN POWERS OFF TO SAVE ENERGY, AGAIN time.sleep(3) GPIO.output(25, GPIO.LOW) else: GPIO.output(25, GPIO.LOW) call(('/usr/bin/python3', '/home/pi/SCRIPTS/pir.py'))
  • 0 Votes
    11 Posts
    8k Views
    bheplerB
    @elleclouds - If I understand you properly, then this is what you’re looking for: Motion Detection with RaspiCam Non-Module Version