X10 Ambient Email Notification
Our daughter has reached the age where she uses computers and has her own email address but doesn't regularly switch on a PC. She wanted something to tell her when she had new emails, without having to boot up a PC to find out. We saw this as an ideal application for X10 technology as it needs to switch on a lower power device in her bedroom, which currently has no Ethernet networking. The objective to to simply switch on a colour-changing egg lamp when she has email to be read. The lamp is a very low power device, using LEDs within it and a 7.5V dc plug-in mains adaptor. Pretty much any device could be used instead though.
The Oggz colour changing egg. This device was used because it was sitting there unused on a bookshelf. It comes with a charging base and a rechargeable battery inside but, this was removed to make it switch on/off when the power was supplied/removed.
This is the X10 appliance module.
For this project we could use an X10 lamp module, which is slightly cheaper and has dimming capability but, an X10 appliance module provided more flexibility in terms of loads that could be used. This project represents the most basic form of ambient devices and more advanced ones are planned as future projects.
At the core of this project is a Java application to poll email accounts. This code is based around the SUN JavaMail API. It HCS log when the message count changes and if the count is one or more, switches on an X10 appliance module.
The code has some intelligence within it, to save some energy and to make this a useful and not an annoying feature. The design supports the following features:
- The X10 appliance module and email account polling only occur if the Home Control System (HCS) house status is set to 'In'.
- The X10 module is switched off between the hours of 9pm and 8am, to avoid waking my daughter up and the lamp being on all night.
- Polling happens every half hour by default, to minimise network traffic.
- The code does not poll the email account if the network is down.
- X10 'off' commands are sent every 30 minutes in case one is missed by the appliance module.
The Java application is run as a separate process, with no dependency on the rest of our Home Control System (HCS) but, it communicates with our X10 Java controller by sending events over IP, using sockets for interprocess communication.
This project is now complete and in use in our daughter's bedroom. It is very likely the code will be extended to provide a similar service for our son.
- On the face of it, this looked like a simple project to undertake but, the issues experienced with the X10 drivers, hardware and Java software interfacing have made it a lot harder than it should be. We are even more convinced that X10 technology should not be used for serious home automation projects and mission critical systems. It's simply too unreliable and prone to external influences and interference. For less serious applications like this one, it is fine though.
- The Marmitek appliance module is not pretty. In this case it could be hidden out of sight, under a desk.
- The Marmitek appliance module is too noisy when switching on or off. We are looking to replace it with something much quieter in operation.