A RESTful web-server built-in a Raspberry Pi 3 model B to control the activation of a AC lamp through a TCP/IP network connection and HTTP protocol.
-
Python 2.7 or 3.6 Download Python interpreter here.
-
Raspberry Pi 3 Model B Learn more about RasberryPi project.
-
Clone the repo
$ git clone https://github.com/NomiProject/LampREST-Server.git $ cd LampREST-Server/
-
Create Python Virtual Environment
$ virtualenv env --system-site-packages
The
–system-site-packages
flag is optional, but by adding it, it allows you isolated environment to access your globally installed packages on your root install, so thing’s like the RPi.GPIO library and such so I find it’s a good idea to add it. -
Enable Python Virtual Environment
$ source env/bin/activate
-
Install the pip-installable dependencies
$ pip install -r requirements.txt
-
Run the LampREST-Server
$ python app.py
-
Locally, navigate to http://localhost:5000 or remotely http://your_raspberrypi_ipaddress:5000 to access the webservice and control a lamp.
Developed by Allex Lima, Daniel Bispo, Paulo Moraes and Renan Barroncas with ❤️ using Python.