The security camera pole

One button live stream.

I want to be able to see the image of the security camera in the garden at the touch of a nice button. And with a second press of the button, the image should go out again.

An additional HDMI monitor continuously shows the stream from the security camera. The monitor is controlled via a Raspberry Pi. The Pi runs VLC which shows the stream.

The button is on GPIO pin 4 and is read continuously with a simple shell script. If you press it, the monitor will turn off (it will automatically go into sleep mode) and if you press it again, the monitor will turn on again.

VLC itself is started when the Pi boots because I have a vlc.desktop in /home/pi/.config/autostart (create folder). file:
#Save under /home/pi/.config/autostart (create directory)
[Desktop Entry]
Exec=vlc --fullscreen rtsp://camerauser:password@
The button is a triangular arcade button illuminated by an LED. The LED I believe is a 12V LED (it has a built-in series resistor) but it is powered from the Pi's 3.3V line so it becomes less bright. The security camera pole is in the Movie Cave and it is often dark there.

The script that reads the button and turns the monitor off and on on command:

echo "4" > /sys/class/gpio/export
echo "in" > /sys/class/gpio/gpio4/direction

status=0 # Off

while :
button=$(cat /sys/class/gpio/gpio4/value)
if [[ $button == 0 ]] && [[ $status == 0 ]]; then
# Pressed and off: turn on
echo "Turn on"
xset s 180
xset s off
xdotool mouse move 100 100
sleep 0.6
elif [[ $button == 0 ]] && [[ $status == 1 ]]; then
# Button is pressed and screen is on: turn off
echo "Turn off"
xset s on
xset s 1
xset s blank
xdotool mouse move 120 100
sleep 0.6

#echo $button
sleep 0.1
The script is executed by means of a desktop file that is also included in the above autostart folder is started automatically:
[Desktop Entry]
OpenScad file to 3d print the pile.
This housing is suitable for a Raspberry Pi 3 Model A.


All my appliances are working installations.

If you want to replicate an appliance and you need help, feel free to contact me.

View 32 appliances