Home Automation System Code Release - 11,000 Lines

Hi all

On 12th Jan over at http://forum.arduino.cc/index.php?topic=291796.0 I announced an intention to release all 11,000 lines of the source code for my Arduino based home automation system. The source code was released yesterday.

In the PUBLIC folder (directory) of Micro SD card on the system's website at http://www.2wg.co.nz you will find the following recent files:

  • overview.pdf - A 34 page overview of the system.
  • ha150127.ino - The main application sketch (over 8,000 lines)
  • utility.h & utility.cpp - My utility library of common functionality (over 3,000 lines)
  • stringsp.xls - My Excel strings database/management tool

I am releasing the application source code for the benefit of the Arduino community, who via this forum, have helped me solve a few difficult problems and get me to this point. I hope this release and the application website will disclose a few Arduino application development secrets ("how to" algorithms) and encourage others to pursue their Arduino application development objectives.

Key features of my home automation system that may interest you include:

  • Webserver functionality including dynamic web page generation, html request processing, file uploads and downloads, security, session cookies, etc
  • SD Card operations including web page browser, activity logging, direct file access, RAM backup and restart restore, etc.
  • Home Automation including climate recording, PIR monitoring, device control.
  • An email subsystem.
  • RAM (memory) management including real time RAM monitoring and linked list caching.


Catweazle NZ

Hi CatweazleNZ,

This will be somewhat off-topic but when I was reading your nice documentation about locked/stuck Ethernet sockets I realized that I have probably the same problem on my arduino-webserver, mainly when using moblie data connection it happend quite often.

Can you point me on what should I focus and what to try to prevent this from happening?
Because once it happend, only RESET or turn off turn on helps.

(my configuration is arduino uno equipped with wiznet5100 ethernet shield and as I examined it is not a sram problem I was saving my memory wherever it was possible)

you can look on it here: solara.mooo.com (if it is not actually in stuck state :slight_smile: )


Investigate my code including the ListSocketStatus() procedure in the utility library - you should be able to work it out.

We use this command to disconnect stuck sockets:

W5100.execCmdSn(l_sock, Sock_DISCON);

Catweazle NZ