Secure Control for my Raspberry Pi

This is an internet accessible remote control platform for a home-based Raspberry Pi, aka RaspPi.

At the Christmas of 2021 I got a Raspberry Pi 4 from my wife. Okay, in our family we usually ask for some hint before buying Christmas gifts and that time I gave her more than a hint, but a very detailed specification.

This 'platform' is my first and still ongoing Raspberry Pi project. Most of the RaspPi projects are about building robots, so the idea is far from being unique, but perhaps the concept includes some novelty. My robot provides a web UI where the user can select commands to be processed by my RaspPi that sits behind the firewall of my home internet. 

In other words I created a cloud based application that can be used to select a command. The RaspPi is regularly checking for new commands, processes them using the connected webcam and IoT sensors and uploads the output to the cloud. 


So far my robot understands 5 commands:

  1. Takes a photo with the USB webcam A
  2. Turns on light and takes a photo with the USB webcam B
  3. Enlights the last photo
  4. Check the temperature and humidity with a Sonoff ZigBee IoT sensor
  5. Check the status of the RaspPi

The webcam commands were in fact created as a pet camera that can turn on a lamp to take pictures also in the dark. But this opens up the opportunity for various other use cases.

The UI is only a list of commands. By clicking on eg. the photo command a small text file is created with a command string. The RaspPi polls the file, interprets the commands and runs them.

This temperature command calls for the status of a ZigBee temperature/humidity sensor. Actually this was my first step in my long-running IoT experiments with ZigBee devices.

The command center is a Flask application running on Pythonanywhere. The webcam images are processed with OpenCV and the Zigbee devices are connected to a Mosquitto server. I started this project soon after Chirstmas 2021 and halted the work in the early summer days of 2022. However I consider this as a platform that can be the basis of further robot commands using other technologies.