Any home automation project using Raspberry Pi yields a lot of examples that involves building a web server that controls appliances within a local network that takes care of securing the place using electromechanical locks. We will build a simple web server that can be used to turn off an LED from a web page. This concept can be expanded to control multiple appliances and read sensor data from the GPIO interface of Raspberry Pi.
Note
This task is meant for absolute beginners who are not familiar with Python web framework tools. We are discussing this example considering some readers might jump right to Project 11, Home Automation Using Raspberry Pi.
We will be building a web server using a Flask framework (http://flask.pocoo.org/). The Flask framework can be installed as follows:
sudo apt-get install python-pip sudo pip install Flask