How to Add a Web Interface to the Raspberry Pi 4 Relay Board

Sometimes is very handy to control your project from a browser
from a different location.
This little app is wtitten in Python language and it uses the Flask framework to get access to relays from the web page.
The actual board and the relay scripts are here.
Before you start follow the tutorial for installing the Flask framework here.
Usage
Download the robogaia_4_relays_web_interface.tar.gz file on the Raspberry Pi board. The file is on the bottom of the page.
From terminal type
wget http://www.weebly.com/uploads/6/8/0/9/6809982/robogaia_4_relays_web_interface.tar.gz
tar -xzvf robogaia_4_relays_web_interface.tar.gz
cd robogaia_4_relays_web_interface
Make sure the relays are initialized:
sudo relays_init
The last command will start the web server and the web page is available .
python relay_web_interface.py
From the browser (Firefox,Chrome, Internet Explorer) type the Raspberry Pi IP address and the port number (the Flask will start by default at port 5000)
The IP address should look something like :
http://192.168.0.14:5000
Here is how the web page looks like . Every relay has 2 buttons ( ON and OFF) .
By pressing one of them the relay will close or open.
from a different location.
This little app is wtitten in Python language and it uses the Flask framework to get access to relays from the web page.
The actual board and the relay scripts are here.
Before you start follow the tutorial for installing the Flask framework here.
Usage
Download the robogaia_4_relays_web_interface.tar.gz file on the Raspberry Pi board. The file is on the bottom of the page.
From terminal type
wget http://www.weebly.com/uploads/6/8/0/9/6809982/robogaia_4_relays_web_interface.tar.gz
tar -xzvf robogaia_4_relays_web_interface.tar.gz
cd robogaia_4_relays_web_interface
Make sure the relays are initialized:
sudo relays_init
The last command will start the web server and the web page is available .
python relay_web_interface.py
From the browser (Firefox,Chrome, Internet Explorer) type the Raspberry Pi IP address and the port number (the Flask will start by default at port 5000)
The IP address should look something like :
http://192.168.0.14:5000
Here is how the web page looks like . Every relay has 2 buttons ( ON and OFF) .
By pressing one of them the relay will close or open.

robogaia_4_relays_web_interface.tar.gz | |
File Size: | 1 kb |
File Type: | gz |