Software for Home Automation
I try to develop all software for my Domotica system myself as much as possible.
That way i can have a system that does exactly what
i want and how
want it and i'm not dependent on what some other software package has to offer. The
only 3rd party tool used and that has actually cost me money is Chartdirector; i
use it to produce the charts on the website. With the new ASP.NET Charting
Control, i'll gradually change all charts to using the ASP.NET control;
Chartdirector will not be used anymore when creating new charts.
The complete software package that is behind this website is made out of the following
1. Windows Application, called Domotica Device Monitor and Controller, or
This is a Windows Forms application and it handles all communication with the hardware and
user interfaces. Currently DDMC communicates with 16 different interfaces;
for hardware like the ACT TI-213, RFXCOM receiver, PLCBUS Interface, IRTrans, but it
also has several methods of interfacing with other software like XMLRPC, HTTP
and Telnet (see complete list of hardware interfaces
The User Interface of DDMC is kept very limited on purpose. It only contains the
minimal functionality to define hardware interfaces, sensors, device types,
events; actually only the basics 'it' needs to know about and nothing more. DDMC
has no way of displaying temperatures, current power usage, whether lights are
on or off, create charts or whatsoever. All the useful data is written to a database
but cannot be viewed
with DDMC. For that we have other tools :-).
Configuration data like which IP addresses are assigned to the
hardware interfaces, where all the devices/sensors are located
in the house, whether they are operational or
not, is all stored and retrieved from a SQL database and can be manipulated with DDMC. Adding
a new device, like for instance a new motion detector, is very quick and easy; within
a minute it's displayed on the website.
Although the number of tasks being performed by DDMC are still increasing rapidly, the performance is still very good. With an average CPU load of 0,6% i am quite satisfied. It's completely object oriented and focused on responsiveness and efficient data handling. Nearly every interface works in a separate thread,
and there are virtually no global variables or hard-coded links between objects (devices) and interfaces.
This makes DDMC very flexible, even when i have to add new functionality in the
core of the application, it takes very small adjustments to the code.
The tasks that are performed by DDMC:
- Communication with hardware interfaces: polling, receiving, decoding and
processing all kinds of information: humidity, incoming phone calls, signal
level reports, incoming SMS, etc. etc.;
- Storing all this information in the database;
- Handling events triggered by time or sensor values;
- Sending realtime status updates to User Interfaces;
- Acting on commands received from the various User Interfaces.
DDMC is being developed with Borland Delphi 2005, my favorite programming language over
the years. I started programming in Pascal in the time that MSX was still very popular
and a 8088 processor was top of the bill.
I had a Pascal module for my MSX-computer that enabled me to write Pascal programs.
Later on, i used Turbo Pascal 3.01, 4, 5, Borland Delphi 1.x, 2, 6 ,7 and so on.
2. SQL database.
I use MS SQL Server 2005 as DBMS to store all data. 3 databases with a total of
24 tables in which all the data is stored to and retrieved from. Everything not
suitable for being hard-coded in DDMC ("everything"..), is stored in the database. The database
has a couple of triggers to automatically update some timestamp-fields, but
apart from that, i try not to use any DBMS-specific features, so it should run on MySQL
just as well as it does on MSSQL. On June 30, 2009 the size of the most
important database where all domotica related information is stored, is 465 MB.
4. The User Interfaces.
To interact with my Domotica System, i have developed several User Interfaces
through the years:
I started building this website because i needed a way to have a good overview
of all the data: Temperature charts, Gas usage charts, tables that gave me a
quick overview of things; i didn't have that in the pre-website years.
When i started working on the website, i started
with MS Visual Web Developer 2005 Express (VWD) and added the AJAX Extensions.
This gives you a couple of very nice controls that add the ability to do for
example partial screen updates.
Nowadays (from March 2008) i use Visual Studio 2008 to work on my wesite.
The website is served by IIS6 with ASP.NET 2.0 on a Windows Server 2003 Virtual
Apple iPod Touch
Philips Pronto TSU 9600
Apple iPod Touch
Actually i use the iPod more for listening to podcasts then for Home Automation, but with the right tools it's quite easy to create very useful and good looking pages for the Apple iPod Touch.
I don't use the iPod Touch that much while at home, but made a few pages for the iPod that enable me to do the basic stuff like
controlling the lights in our house, switch TV channel etc. I am planning to add more IP cameras to my network in the future and for those i will create additional pages on the iPod.
Philips Pronto TSU9600
The Pronto is used in the livingroom, primarily to control the TV, Digital Receiver and Home Theatre. I don't use the Pronto's built-in IR capabilities, but i let the Pronto send commands to DDMC which takes care of
the rest, for example sending the IR commands to the appliances by means of the IRTrans unit.
Currently the most used Interface for my Domotica System.
It has a big and good working Touchscreen and it's located at a central place
in the livingroom, attached to the wall. I started development of this UI somewhere
in March 2009 and from time to time new functions are added; when i have the time.
This UI not only shows information coming from my Home Automation system,
but also traffic information, weather forecast, etc; all kinds of things that are handy.
For that i built a so called Web fetcher into DDMC, that enables me to periodically retrieve
all kinds of information from the Internet: RSS feeds, XML, HTTP, whatever.
This raw information is then processed by DDMC and shown on the Asus TOP screen.
The latest User Interface i'm working on is for the Asus R2H UMPC.
It has a much smaller touchscreen so i'll need to display things a bit different
then on the TOP. The Asus R2H will probably become some sort of 'roaming'
User Interface, placed wherever someone thinks it's handy at the moment.
The software for the R2H is being written in VB.NET, just as for the Asus TOP.
Updates by DDMC are being received by UDP broadcast and commands sent back using XMLRPC.