Check out the above menu item “DIY Domotica & Energy”  for several pages about DIY projects with source code!

[wpdm_file id=4]

[wpdm_file id=5]

You receive the whole package, Energy Meter, Domotica Gateway, SensorBox and Wireless LCD Display so all versions are working together. I’ve packed all libraries as they are on my disk now. They are probably not the most recent versions, but they should work with sources.
Unfortunately the sources are not ‘monkey proof’, so you have to dig into the code and change it to suit your situation and needs. 

To monitor the generated power of my solar panels, I thought about installing an Arduino microcontroller and write some software to monitor the generated electricity numbers of our solar panel installation. After some searching on Google, I found that other people had done this before and a very good source for the Arduino was available. This worked almost ‘out of the box’ but I created some changes to fit my situation. I installed a kWh meter with S0 pulse output, connected the Arduino and loaded the software. It works like a charm and my output is available on pvoutput.org.

Meanwhile I got a Raspberry Pi which is a very tiny low power and low cost linux computer. While searching the internet for sensors and other tools, more and more ideas come up. So now I have some Arduino’s and a Raspberry Pi working for me.

Raspberry Pi

  • Switch my gardenlights on or off based on Sunset and Sunrise times
  • Provide SSH Tunnel
  • MySQL database for storing Solar Panel output (in progress)
  • Apache with PHP & Python for simple webinterfaces which will host a page for access to solarpanel data but also controlling digital ports on the attached Arduino!
  • Connected to both Arduino’s via USB to program them remotely.

Arduino EnergyMonitor

  • Arduino Mega 2560 with EthernetShield
  • Count pulses of kWh meter and generate energy statistics
  • Read P1-port output of smart energy meter
  • Upload the statistics to pvoutput.org
  • Monitor electricity import and export from grid and total consumption
  • Monitor gas consumption
  • Send statistics over ethernet to my Arduino ‘Domotica Gateway’.

Arduino Domotica Gateway

  • Arduino Mega 2560 with EthernetShield
  • provide many digital in- and output ports
  • provide many analog input ports
  • Ethernet connected to Raspberry Pi & Arduino Energy monitor
  • Controllable via iOS device (iPhone/iPad) using Arduino Manager
  • Controllable via webinterface from Raspberry Pi (and thus worldwide) (to be build)
  • 434 Mhz transmitter to remote control switches (Action, Blokker, KlikAan/KlikUit and Elro).
  • 434 Mhz transmitter to send data (solar statistics and text) to Arduino with LCD display
  • Switches the gardenlights based on signals from the Raspberry Pi

Arduino LCD

  • Arduino Nano connected to 20×4 LCD display
  • 434 Mhz receiver to receive data from Domotica Gateway
  • Displays text on the LCD Display like solar power, temperature, energy consumption, status of light switches, etc
  • Clock based on DS1307 RTC
  • Temperature & Humidity based on DHT11 or DHT22
  • Carbon Monixide detector (to be tested)

 ATtiny based wireless sensors (to be build and tested)

  • Atmel ATtiny84 (or 85) microcontroller
  • 434 Mhz transmitter to send sensor data to Domotica gateway
  • Temperature or other sensor
  • Battery Powered
  • Waterproof housing?!?!

The ATtiny chips are small microcontrollers with limited pins but can handle many functions. When programmed correctly they can run for months on a set of AA batteries while a normal ATmega which is used in the Arduino boards can run for some hours on the same batteries.