MagicMirror² v2.12.0 is available! For more information about this release, check out this topic.

MMM sensor+WS2812b and MM CONFIG RESET button



  • This app was made to add some kind functionality to Magicmirrors run on RPis.

    App allows you to:

    • control LED strip by sensor and also
    • rreset MagicMirror’s config.js file with a hardware button connected to Raspberry (so config should be set to default values). The operation will be confirmed by three red light blinks.
      Here is short video (press on pic)
      Raspberry

    Installation

    1. Download and install the latest ws2812b library to your Raspberry:
    • sudo pip install rpi-ws281x
    1. Clone the repository : git clone https://github.com/sergge1/MMM-senorled
    2. Enter the repository: cd MMM-senorled/
    3. Edit parameters in configuration section of the *.py file: numbers of LED and GPIO pins
      5 Run the app with: sudo python sensorbtnled.py

    Hardware used:

    LED strip WS2812b https://www.aliexpress.com/item/32820628563.html

    Buttons https://www.aliexpress.com/item/33060639491.html

    Movement sensor RCWL-0516 https://www.aliexpress.com/item/32816228153.html

    Option Description
    SHUTOFF_DELAY Delay in seconds for sensor state change, e,g, how long the LED will light after no movement detected. The default value is 5.
    PIR_PIN GPIO pin number to which the sensor is connected. The default value is 11.
    LED_COUNT Number of LEDs connected to the strip. The default value is 160.
    LED_PIN GPIO pin number to which the LED data line is connected. The default value is 21
    LED_BRIGHTNESS Britness of LED lights. 0 is no light, 255 is the maximum brightness. The default value is 255.
    copy [] set of files which should be rewritten. The default value is ['/home/pi/MagicMirror/config/config.js.sample', '/home/pi/MagicMirror/config/config.js.sample'].
    writePin GPIO pin to which hardware button is conected (Other button pin is connected to any GND. The default value is 3.

    and here is description and GIT

    Any ideas and comments are appreciated.
    As well as your direct pull requests to the project on the github page.



  • Hello, I am very interested in your project, I would like to know if it is possible to have more details, I am a beginner 😁.
    Is it possible to know the connection?
    Is the switch just a push button or a stop market button?
    thank you so much
    I love what you did.


Log in to reply