motionEyeOS is an awesome system for creating security cameras with single board computers. This can include systems to monitor pets or burglars. It has a number of nice features under the hood and one of those features is the ability to monitor GPIO pins and display information within the motionEyeOS web interface.
The “monitoring” feature allows you to run a bash script at a regular interval and overlay the text output on the web interface. This could be used to display the state of GPIO pins or other data such as CPU temperature, sensor readings etc.
I wanted to use this feature to display the status of my two garage doors. They have magnetic switches so I decided to configure motionEyeOS to display their status given the Raspberry Pi is already setup in the same location. The door switches connect a GPIO pin to 3.3V. When the door is opened, the connection is broken and the GPIO pin is pulled Low by the Pi’s internal pull-down resistors.
Each Friday is PiDay here at Adafruit! Be sure to check out our posts, tutorials and new Raspberry Pi related products. Adafruit has the largest and best selection of Raspberry Pi accessories and all the code & tutorials to get you up and running in no time!
Make a robot friend with Adafruit’s CRICKIT – A Creative Robotics & Interactive Construction Kit. It’s an add-on to our popular Circuit Playground Express, FEATHER and other platforms to make and program robots with CircuitPython, MakeCode, and Arduino. Start controlling motors, servos, solenoids. You also get signal pins, capacitive touch sensors, a NeoPixel driver and amplified speaker output. It complements & extends your boards so you can still use all the goodies on the microcontroller, now you have a robotics playground as well.