Home Automation
Home automation is the new craze. However there are good valid reasons for using home automation beyond just being cool. By putting some intelligence into the control and monitoring of the house it allows the house to control the temperature inside in an efficent manner. It also allows the efficent use of electricity and monitoring of the off-grid power system. The advantage to this is that if we are away from home the system will look after itself without damaging batteries due to over-discharge or worse.

Components
The home automation system consists of several components including a main controller with database and logic control. A control and data aquistion system and a front end user interface.
The way I chose to complete my system was to install OpenHab on a Raspberry Pi. I tried a few different controllers but settled on OpenHab due to its good integration with linux, lots of modules programmed to interface with Arudino, Serial, Modbus, Canbus, TCP/IP, MQTT and more.

Lots of people complain that setting up Openhab is difficult, but I did not find it hard. There are plenty of guides. The only thing I had to do was to use the correct database and turn off the logs as it kept corrupting my sd card.
The way my system was setup, was that the local OpenHab server would talk to a TCP/IP connected arduino using a Souliss protocol over a physcial ethernet cable. This Souliss Gateway was a Arduino Mega with a ethernet card. It does nothing else at this stage. The Arduino then talks to distributed control boards in each section of the house. Each distributed control board uses the Souliss protocol to interface to Openhab. As inputs and outpus are read and written by Openhab the distributed control boards will follow. The distributed control boards also run some logic locally.
Most of the distributed control boards are hardwired with ethernet cable to minimise unreliablity.
There is also a mqtt message broker running on the openhab server. This allows me to use the mqtt protocol to control devices around the house too. I have built some ESP8266 devices that run a mqtt messaging system. These are able to read temperature, humidity and control an output. Each board has a lithium charge controller on board so that the board can be solar powered.

The power supply room has a seperate power control and monitor board I have designed. It is a arduino mega sheild that uses INA226 ICs to measure standard 75mv current shunts. It takes the battery voltage, Solar charge current, generator charge current, Inverter currents, Wind generator Current and can control various outputs such as generator start.It uses a mqtt protocol to talk via the messaging broker to OpenHab.
The house has a temperature, humidity, PIR movement, Lighting Control, Power Point control, Blind Control, Windows Open switches and Power switch controls for each room. The front door uses a RFID reader and door latch for entry and exit control. This is all controlled via OpenHab. The TV and air-conditioner is also connected via IR and Modbus control.
Here are some links to various files I am currently using for this, including circuit board layouts using kicad and firmare in arduino.