When Shawn Wallace and I wrote Getting Started with Raspberry Pi, we wanted to include a few projects that demonstrated the strengths of the single-board computer. One of those strengths is the ability to run a fully-fledged dynamic web server that could take direct control of the GPIO pins for turning on and off household appliances. In chapter 10 of the book, we walk you through how to install and use Flask, a Python based web framework for creating dynamic web sites.
The beauty of using Python and Flask is that it can be easily used in concert with RPi-GPIO, the popular Python module for controlling and reading the GPIO pins on the Raspberry Pi. In the book, we show you how you can write a single function to serve dynamic web pages for each of the pins on the Raspberry Pi. Each pin can be connected to a relay or Power Switch Tail to control many different AC appliances in your home. We kept things simple and used it to control a lamp, but you can control many different things such as air conditioners, TV’s, stereos, or even espresso machines:
— Mark Moran (@markrmoran) February 11, 2013
It explains why I was absolutely delighted to see that Mark Moran created his own web-controlled espresso machine. The project was based on the Weblamp.py example in Getting Started with Raspberry Pi. He made a few changes so that now he can pre-heat his machine via his wireless network from anywhere in the house! Thanks for sharing, Mark!