Home automation with RasPi and Arduino

At my house in Kajaani I have few sensors monitoring continuously my home and the environment. I can get a real-time graph for the data read from sensors served by my Raspberry Pi web server.

Currently I have the following sensors installed:
* Outside temperature (C°) and humidity (%)
* Household power consumption (kW)

HomeAutomationScreenshot HomeAutomationScreenshot2

Picture (left): Partial screenshot from outside temperature sensor graph on web page (yes it was sunny warm day even in Finland).
Picture (right): Partial screenshot from household power consumption sensor graph on web page.


Picture: My Pebble smartwatch showing outside temperature, humidity and the current household power consumption.

The implementation includes an Arduino board to which the hardware sensors are connected (via simple circuitry). Weather sensors are wired through the wall from outside the house. Household power consumption is read with a light-sensitive sensor from the blinking LED on the household power meter (which is just below the Arduino board). The Arduino runs a realtime (C) software reading the values every few seconds and then feeds them to the USB serial connection which is connected to a Raspberry Pi (which also powers the Arduino via the USB).


Picture: Arduino Uno and the wiring to the sensors.

The Raspberry Pi that runs a software (C++) which reads the values from USB serial connection and stores them to MySQL database. The Raspi runs PHP engine and web server (LAMP) for which I have made Javascript-based HTML pages for showing an illustration of the data. The web port (80) of the Raspberry is opened to outside Internet by the home ADSL firewall router, so the web pages can be viewed with any web browser from anywhere (if you just know the IP of my home connection). The latest temperature is also posted with a HTTP query to the cupla.net front page.


Picture: Raspberry Pi connected to TeleWell home ADSL router.

Later I have plans to install more sensors (also inside the house), build control for car heaters for winter-timer, and further develop data visualization.

If you want to create a web server out of Raspberry Pi, check out these instructions.


Comments are closed.