Tuesday, 24 January 2012



Robert David Shaw - Project Proposal

Project Name:  An Investigation into the future of Home Automation
Degree Title: BSc (Hons) Computing

Introduction:

This blog has been created to log my progress through my final year project at Bournemouth University. This project will demonstrate several potential advances within current technology and bounds/limitations for Home Automation systems. This will be technology redefined.
The project will require additional research and further understanding into new technologies such as different programming languages, network methodologies, linguistic processing and hardware and software implementation.
The project will completely change household management. Imagine all purpose built systems for example video on demand, music, telephone, heating, lighting, security and skype all rolled into one system controlled via a simple mobile application or home touch pad.

The project will combine all previous subjects undertaken whilst at Bournemouth University. In doing this and combining further research it becomes possible to combine these factors making Home Automation relevant to the Computing degree title.
The project has very specific aims and objectives designed to match the degree framework. These points allow for clarity and structure to be applied when approaching the project thus giving clear targets and focus points within the system life cycle approach.

Project Objectives:

The proposed project will be deemed successful if the following objectives are achieved:
  • A complete Home Automation Network allowing remote control over a selection of peripheral devices for instance lights and security devices.
  • A friendly and approachable avatar is designed and developed with a built in Speech recognition system that is complex enough to recognise key words or commands.
  • The avatar will have the ability to respond to a command and/or question with output via the Home Automation network.
Additional functionality will be built in if all of the above are achieved.

 *// Hardware Research Removed - Pending Tutor Comments.

Hardware/Software:The following Hardware all turned up today so it’s time for another blog update. (I was keen to test this so most of the technical specifications can be found here: http://www.letsautomate.com/ )


AM12U X10
 AM12U X10 - UK Plug-in Appliance Modules:
This plug-in module will allow you to remotely control just about any plug-in mains device. You can plug it into any plug socket in the house and control the unit attached to it via X10 commands. The Appliance Module can switch loads of up to 13 Amps.

•On/Off function to control a table lamp, heater, fan, coffee maker, etc.
•Designed to operate with 230V AC loads of up to 500W (incandescent lamps and halogen light) or 230W (motors) or 3600W (resistive loads)
•There's no re-wiring to do. Simply set the X10 address, un-plug the lamp or appliance, put the plug into the AM12U module, and plug the module into your mains socket. You instantly have X10 control of the device.

This Module does not work on its own. You needs an X10 transmitter, such as IR7243 , HomeVision , CM12U , Mini Timer , Maxi Controller , Mini Controller , or SM10. (See below)


CM12U X10 Transmitter
CM12U X10 - Transmitter:
The CM12U X10 allows for macros to be created. In using a single X10 command you can trigger a sequence of X10 commands. Standard on-screen representation allows you full control of X10 devices directly from a computer.



-Now available as either 9 Pin Serial, or USB Connection -Let's you control X10 devices directly from your PC -Set up Timed Events that run at specific times
-
Set up Dawn/Dusk Events to run at sunrise or sunset

- Compatible with Windows 95, 98, ME, XP, Vista 32, Windows 7 32bit, Vista 64 bit* and Windows 7 64 bit*     

The CM12U has a limited memory at 1K for standalone operation. The CM12U plugs into the serial port of any PC running Windows.

FM10U X10 Filter




FM10U X10 – Filter: The filter was purchased just encase the house interferes with the X10 transmission. This can be unusual but for certain devices e.g. TV’s this can stop all X10 activity. A solution is to plug the said device causing the issue into the FM10 Filter.

I wasn't sure if I would have issues with any current devices within my house so made sure that I got one of these.


Viglen MPC-L
Viglen MPC-L:
I managed to obtain a Viglen MPC-L by ‘donation’ for this project. This is a small fanless PC with the following specs: 256MB RAM, 60GB Hard Disk and a 400 MHz AMD Geode processor with 6 USB Ports. The Viglen MPC-L only uses £1 a year for electric!
Further information can be found here:
http://www.viglen.co.uk/viglen/Products_Services/Product_Range/Product_file.aspx?eCode=XUBUMPCL&Type_Info=Description&Type=Desktops


I'm still considering on upgrading the 256MB RAM to 512MB. This depends on if a GUI OS is required or if I'm going to remain with command line.


*// OS Research Removed - Pending Tutor Comments


Xubuntu 8.0.4 (Hardy Heron)

Following on from the rather low specification, I decided to run Linux on the Viglen MPC-L. Then it was a hard decision regarding if a GUI was indeed necessary or if command line would suffice - Xubuntu 8.0.4 (Hardy Heron) was installed using USB and Unetbootin. A full break down of Xubuntu 8.0.4 (Hardy Heron) can be seen below including specs:
http://cdimage.ubuntu.com/xubuntu/releases/8.04/release/
A direct link to Unetbootin for both Windows, Linux and Mac OS X users:
http://unetbootin.sourceforge.net/

It’s worth mentioning for the write up later on that I ran into an issue with the kernel perm here. It seems that as default the Viglen MPC-L has ‘noacpi acpi=off’ when this should be ‘pci=noacpi’ instead. This was modified within the ACPI boot options so that it will be added automatically to future kernel updates.

This process took a fair while due to the USB ports on the back of the Viglen MPC-L being USB 1.0 with the USB 2.0 on the front useless until the drivers was installed. A long while later a quick ‘sudo apt – get update’ and ‘sudo apt – get upgrade’ was done via command line to update the box with updates and upgrades.


SSH Server was then setup using the following command line code ‘sudo apt-get install ssh’. To test that this does work you can type ‘ssh localhost’. This shows it worked but was missing the ssh client key for the server.

In reviewing the X10 devices that had arrived and wanting to know what software would work with Xubuntu 8.0.4 I decided to use the latest version of Bottlerocket (Version 0.05b3) direct link can be seen here:
http://www.linuxha.com/bottlerocket/
Bottlerocket was installed alongside RocketLauncher and Wish TK8.4. This would be the main software used to control the X10 devices that I have purchased.



Display Head:
The idea behind the project is to have an Avatar. To do this I decided to buy a Manikin head that I could install the Arduino VR (Voice Recognition) chipset inside. The entire Home Automation System could then be controlled via the Head itself like Star Trek and 'Computer' then say command example below:
http://www.youtube.com/watch?v=tpKx7Oi0oeM

In researching this, I found 'Stephanie' created using Microsoft SAPI and constructed by Brian Baker. The full project can be seen below:
http://absolutemaximumratings.com/projects_stephanie.php


I decided to be different and use a  Tigal Voice Recognition Development Kit chipset within the head itself. The full specification for this can be seen below:
http://www.robotshop.com/eu/tigal-voicegp-voice-recognition-development-kit-2.html
















I'm sorry that I haven't had a chance to update this further. I'm currently having a nightmare here waiting for some equipment to arrive for the hardware side.


 The first update is I managed to get myself some Tenvis WI-FI IP Cameras. These come with the following included - Pan/tilt function/ Day and Night vision/ HQ video/ Alarms/ Snapshot pictures/ Recording both video + Audio/ Mobile compatible. Including some brief pictures below - Interesting how in 'night mode' the lights to the human eye are red however below on a camera they are white -

Picture quality isn't bad and 'Motion Sensors' picking up the following picture.






Tenvis WI-FI IP Camera

(This also shows the Admin interface panel - so it's easy to setup and configure the cameras). 


Tenvis IP Camera - Motion Sensor
I'm going to be honest, I heard that Tenvis was a rip-off of another brand. I'm trying to limit the £££'s spent on this project so this is why I initally went with Tenvis products. I didn't have many issues with these apart from the initial install download that Tenvis provided. I ended up having to find a different install package and wing it from there after spending over an hour on Skype to Tenvis customer support!

The main point to note is to install these as 'wired' devices using an Ethernet cable direct to the router. Then once done - configure it via the admin panel as a wireless setup and remove the Ethernet Cable. I also did a rookie mistake in clicking 'Obtain IP Address from DHCP Server' this rendering the camera useless untill I re-installed the software.

I also got some more hardware to scatter across the house on various different devices. Nothing outstanding to mention here - Just plug and play once I have done the coding side of things. I'm still waiting on alot more to arrive and plan to create a map/floor plan to demonstrate where all the devices are located across the house.



X10 Devices -

I had fantastic issues with Bottle Rocket/Rocket Launcher on my test VM. Apparently as I installed the version with the interface the old faithful server has major issues!

I would send the command to turn on a light and 10mins later, it would eventually turn on. So, I'm currently installing a text version called HEYU which also works with X10 devices. In talking with my project supervisor my project had too much scope and I was advised to use an Open Source mobile phone application instead of coding my own. I have also been testing a few this week with 'domus' being my number 1 for Android platform which is basically just a 'Front End' for HEYU. More information can be found here: http://domus.link.co.pt/


Old RAM removed from Server
In changing software I also decided to give in and upgrade the RAM from 128mb to a huge 512mb so it was out with the old and in with the new. Power!

I also failed to mention that I will be using some Perl. I have been looking here: http://misterhouse.sourceforge.net/ and then good old 'How hard could it be' was said. I plan to link this with my head and arduino chip set for more functionality. (Once it arrives) - I'm currently thinking about using festival instead at the moment if I'm pushed as a backup plan.

I'm also doing paperwork behind the scenes for research which has involved alot of reading as I'm new to X10, Linux and Home Automation hence all the errors along the way!

At present the server is up and running with Xubuntu 8.0.4 (Hardy Heron), Lampp is also installed with Domus Link and HeyU also up and running/working. I'm currently at the design stage designing the control layout (which I can change in the HeyU configuration file) and a floor plan diagram so I can physically layout everything mentally. To give a better understanding these can be seen below:



Downstairs floorplan

Floorplan idea - (Incomplete, devices/furniture etc not added and downstairs only for now). Although this looks rather simple this will help when I come to completing the .config file/.schedule files on the server. (This file is mad the first time you view it) To give you a 'simple' example of how the files are structured you have the following:

Alias Gadget Name House Code/Unit X10 Type
Alias Rob_Win7_Comp A4 stdAM

When you start thinking that each file contains every electronic device that's being controlled. A good naming convention/structure is required to save time.




Following on from the above I have started to draw a map showing what devices link up where and where the X10 devices go with the Unit Codes shown. This is incomplete at the moment as I'm still testing and changing at the moment.






This has also been split into rooms so 'Study', 'Bedroom', 'Living Room', 'Kitchen' and 'Garden' are all shown.








I'm always open to questions and one that came in was:
'Why are you using X10 instead of Z-wave wireless?'


- The main initial reason was cost. X10 has been out longer and is an industry standard so more common thus cheaper than Z-wave. I also had no experience with Home Automation so wanted to use something with plenty of documentation!

A main point to note I found in doing my written research is that Z-Wave is a proprietary protocol where as X10 is open source. I don't really want to focus my limited time on having to worry about the 'can do' and 'can't do' aspects of the project.

I plan to have all the design sections and paperwork side completed by the end of this month. I will then focus on bringing everything together and getting some videos of the functionality.

Many thanks for the continued support.









I have now Setup the basic functionality now with the 'network' as such. It's just a question of attaching an X10 device to the appliance and then configuring them within the X10.Conf and X10.sched files or via the Domus Link.

The following should demonstrate that it is now all working. This is an energy saving bulb within the lamp which doesn't give the best results when trying to show the additional 'dimming' functionality. To confirm, I can control anything within my house now which has a plug from the server, my computer and my phone using an app. (Pictures to follow)

Home Automation demo!  (Sorry for the random music!)

Whilst the above doesn't look impressive at all - This is running from a CM12U device as a command. This can be scheduled with little/no effort at all and is working on local host with a fancy interface at the moment. The web interface allows for me to add these modules quickly as the write up and development of 'Auto' is taking alot of my time.


The only issue so far has been permission errors with the lampp server picking up the CM12U device on ttyusb() and then dropping it a second later. Permissions were the root cause (pardon the pun) here with crw-rw---- set for the user 'nobody'. This was figured out after a dmesg| grep tty.


I'm also getting simple <php> errors on the site itself. Currently modifying the /opt/lampp/etc/php.ini file to 'hide' these as they are impacting the project.... Honest.


Initial Design Concept
The 'head' now has a name 'Auto' taken from 'Home Automation' or from the film WALL-E. 

I'm really pushing on with the development side and 'Auto' is currently in bits having some fancy upgrades including mounted arduino chipset, LED Diodes within the eyes, Speaker mounted to the arduino audio port, hollowed out base to fit the server in, hole for cooling/cables and a polish of all things!  

The work is being done using an air powered hacksaw, smoothing the edges and then mounting custom clips to attach the rear on. A few 'Design images' done for the project -


LED Diodes/Cables

Where next? I have a slight problem in linking 'Auto' to the server and X10 devices. This requires Python so I'm currently learning that as I have never used it before and would class myself as a complete novice.

Common sense is telling me it would be a matter of a writing via the serial connection to the server which then reads it and executes the command.










Wireframe Diagram
Arduino + Cables




-Auto- Complete
































View Robert Shaw's profile on LinkedIn











 














No comments:

Post a Comment