A simple FLASK WebServer to control things in your home using Raspberry Pi's GPIOs programmed as outputs (acting as actuators).
New Interface (Default) | Old Interface |
---|---|
![]() |
![]() |
- Install Git, python3-pip, curl
$ curl -sSL https://raw.githubusercontent.com/HritwikSinghal/room_control_server/master/install.sh | bash
The server will start automatically on Network connect. You can check the status of server by below command.
$ systemctl status --user room_control_flask.service
Clone this repository using
$ cd ~
$ git clone -b master --depth 1 https://github.com/HritwikSinghal/room_control_server /usr/local/sbin/room_control_server/
Enter the directory and install all the requirements using
$ cd /usr/local/sbin/room_control_server/
$ pip3 install -r requirements.txt
(Optional, but Recommended) Enable Systemd service to start on network connect
$ sudo chmod +x room_control_flask.service
$ mkdir -p ~/.config/systemd/user/
$ cp room_control_flask.service ~/.config/systemd/user/
$ sudo loginctl enable-linger $USER
$ systemctl enable --now --user room_control_flask.service
Run the app (or don't if it was started in last step)
$ python3 run.py
For GPIO connections and how to connect the relay, you can visit this website. Here is archived version of above page from wayback.
Thanks to RPi-Flask-WebServer and NetworkChuck for providing base code.