Tag Archive: Home Automation Hub


Now my 2nd Raspberry Pi has turned up I can (re)start work on my home automation project.

Previously I’ve setup a wireless sensor network (WSN) comprised of a number of jeenodes (http://www.jeelabs.org) using the RFM12B to connect back to central jeelink usb plugged into a repurposed orange livebox router (running http://www.homeautomationhub.com). Additionally I installed a number of CurrentCost individual appliance monitors (iams) and a EnviR energy monitor plugged into the home automation hub (hah) to monitor and log household and appliance level energy consumption. Refer to some old blog entries: https://tickett.wordpress.com/category/home-automation/. All of the data was being sent to pachube for logging.

I wasn’t too keen on the home automation hub as I didn’t really fully understand it and couldn’t push it where I wanted to go (although the community was really good and I imagine I will be seeking assistance from them in connection with the new project :)

In my new setup I intend to use a Raspberry Pi the "hub"- with a "full blown" linux distribution (debian?) I should hopefully be able to accomplish everything I am looking for. As python is the first language discussed in conjunction with the raspi I’ve started playing with that, but eventually may move to a LAMP solution (php with mysql backend for logging and apache web front end).

Here’s a high level summary of the steps I’ve covered:

The python example from the link above didn’t produce any output for me so I modified it slightly:

import serial, sys
ser = serial.Serial('/dev/ttyUSB0', 57600)
while 1 :
sys.stdout.write(ser.readline())

That’s all I have time for now- watch this space.

L

Advertisements

I have been making a lot of changes the network recently so thought it was time to sketch it out:

The left hand stack is housed in the A/V rack/closet and the right stack is housed in the garage rack. To clarify a few points:

  • The two switches are linked using a 2 x 1 gigabit fibre trunk
  • The ESX servers and file servers are connected to the switch using 2 x 1 gigabit ethernet trunks
  • There ET9000, XBMC, Apple TV 2, HDMI Matrix and Sonos devices can all be controlled from smartphones, pcs etc
  • The ET9000 records to the file server
  • The Sonos Connect / ZonePlayer 90 is connected to the Onkyo Amp to allow Sonos to output to my home theatre
  • The Sonos Connect / ZonePlayer 90 is connected to the Apple TV to allow streaming from iTunes/iOS devices to all zones
  • I haven’t bothered to include my router, wireless access points, client pcs, smartphones, printers and various other devices in the diagram

The wireless sensor network provides:

  • Whole house power consumption currently using a CurrentCost EnviR
  • Individual appliance power consumption (currently monitoring 6 appliances using CurrentCost IAMs)
  • Environment information (temperature, light, humidity) using Jeelabs Jeenodes in multiple zones

This is a good reference point for where I’m headed (not much progress since I last listed but alas, still the way forward):

  • Further appliance monitoring and more importantly control (potentially through upcoming project/device: HexaBus – https://github.com/mysmartgrid/hexabus/wiki or plugwise – http://www.plugwise.com/idplugtype-g/)
  • Security cameras (and doorbell integration)
  • Environmental information (I have pulse counters for my gas meter and water/central heating system that need installing)
  • XBMC hardware replacement (once the Raspberry Pi – http://www.raspberrypi.org/ is available to buy I’d like to replace my Acer Revo)
  • Home Automation Hub replacement (once the Raspberry Pi is available to buy I’d like to try Domitiga – http://www.domotiga.nl/ or my own custom solution)
  • Web Interface (to bring all of the information together from the wireless sensor network, along with the state of all network devices (from bandwidth to free space etc) and most importantly allow central control- so instead of me having to use different methods to switch on the ET9000, change the channel on the HDMI matrix, power on the amp etc, I can do it all with one button)

As usual- I imagine I’ve missed a few bits out from the above but it hopefully provides a good overview of my network.

L

More Home Automation Chat

I’m away from home at the moment so not much to report. I’ve not had a chance to install the water meters with my friend yet nor connect the gas meter to the hah but I have taken delivery of a bunch more jeenodes and room plugs:

Starting to put one together:

I now have 3 nodes collection temperature, light and humidity data and posting to pachube along with my total household power consumption and appliance level detail for 6 devices:

Whole house power consumption:

An example of individual device consumption (this happens to be the boiler):

Room data:

I’ve tried to create a "naming convention" where the data stream id contains the nodeid (first digit) followed by 1 for temperature, 2 for light and 3 for humidy.

You can quite clearly see where the temperature rises in line with the boiler coming on. You can also see the light pattern during the day (wow- it’s getting dark real early!!!). Humidity isn’t really of much interest.

Interestingly I think node 2 is in the same room as the receiver/hahcentral/hub but seems to drop out every few hours. Node 3 in the room next door is rock solid. And node 5 in the room next to that is extremely flakey! Brett from over at hah has suggested lengthening the antenna on the nodes to resolve these issues- I will do some experiments when I have a little more time on my hands :)

And one final note- whilst on the topic of "home automation". I have replaced my sky boxes in recent months with the Clarke Tech ET9000: https://tickett.wordpress.com/2011/09/20/getting-started-with-clarke-tech-xtrend-et9000-and-sky-hd-uk/ and pipe the picture round the house from these and my home theatre pc (htpc) running xbmc with a cheap 4×4 HDMI matrix I picked up off eBay. I now have full control over these devices from my mobile phone (iPhone):

DreaMote Lite (for Enigma2 satellite receivers):

And XBMoteC (for XBMC):

All slow, but steady progress toward a completely integrated/automated home!

L

Home Automation Progress

An update since last week.

I decided I’d like to keep my CurrentCost netsmart pro posting electricity consumption data to pachube so spliced into the cable to see if I could pickup on the serial data using my home automation hub without disrupting communication between the enviR (CC128) and the bridge.

Taking the leftmost pin of the two connectors with the notch/clip facing downwards the pins are joined as so:

RJ45 -> RJ11
1 -> 1 (Yellow)
4 -> 2 (White)
7 -> 3 (Blue)
8 -> (White)

Rather annoying that they used white for 2 of the cores! On my USB serial cable for the enviR the pinout was as so:

RJ45
4 (Red) -> Spliced into White (pin2)
7 (Green) -> Spliced into Blue
8 (Yellow) -> Spliced into White (pin8)

After hooking the bridge, enviR and usb up to the laptop I could see data coming in over through the serial port- voila!

I punched the CurrentCost details into the hah web interface:

Then configured the extra data streams to pachube:

Just waiting for a few hours for some data but it appears to be flowing in nicely:

<eeml xmlns="http://www.eeml.org/xsd/005"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xsi:schemaLocation="http://www.eeml.org/xsd/005 http://www.eeml.org/xsd/005/005.xsd" version="5"><environment><data id="2"><tag>Light</tag><value>0.00</value></data><data id="3"><tag>Humidity</tag><value>0.00</value></data><data id="1"><tag>Temperature</tag><value>0.00</value></data><data id="13"><tag>CCIAM3</tag><value>44.00</value></data><data id="12"><tag>CCIAM2</tag><value>157.00</value></data><data id="11"><tag>CCIAM1</tag><value>5.00</value></data><data id="15"><tag>CCIAM5</tag><value>0.00</value></data><data id="14"><tag>CCIAM4</tag><value>82.00</value></data><data id="10"><tag>CCTotal</tag><value>415.00</value></data><data id="16"><tag>CCIAM6</tag><value>0.00</value></data></environment></eeml>

I took delivery of the two water meters today- just waiting for a friend to help me fit them and my additional jeenodes to arrives so I can get the data into the hah!

The crazy looking squid thing is the cheapest usb hub I could find to allow me to plug both the jeelink and currentcost enviR into the hah at the same time- hideous but does the job :)

L

After getting my first few jeenodes flashed earlier: https://tickett.wordpress.com/2011/12/02/my-first-jeenodes/ it was time to get them to actually do something. With the sketches from the hah wiki http://www.dbzoo.com/livebox/hah_hahnode#flashing_from_the_hah I had hoped to start seeing traffic straight away but needed to know where to look.

I plugged the jeelink back into my laptop and fired up Arduino IDE- I’d hoped to use the serial monitor but serial port wasn’t listed. Fortunately Brett over on the hah forum quickly pointed me in the right direction of the usb/serial drivers: http://www.prolific.com.tw/eng/downloads.asp?ID=31 and I was up and running!

I could see the jeelink output: [HAHCentral.1] D i4 g212 @ 433 MHz

And knew that the frequency/band needed changing to 868 Mhz- so I issued the 8b command. Now it was time to check the jeenode- unfortunately serial output isn’t enabled using the default hah sketch. I flashed the RF12demo sketch and set the group and band to match that of my jeelink. I believe these configuration settings are stored in the EEPROM so after flashing the hah roomnode2.hex back the id, group and band will remain unchanged.

With the hahcentral plugged into the laptop and the serial monitor fired up I was starting to see some data coming in from the roomnode:

[HAHCentral.1] D i4 g212 @ 868 MHz
OK 2 0 0 0 0
OK 2 0 0 0 0

2 is the node id but for some reason the temperature, humidity and light values are all 0 (there is no PIR attached so I’d expect motion to return 0). Thanks again to Brett over on the hah forum for pointing out that the roomnode2 sketch support the DS18B20 temperature sensor and not the jeelabs room plug I was trying to use with the SHT11 temp sensor.

Meanwhile I tried to get the Serial SCHEMA service and plugboard scripting engine working on the hah. I created the jeenodeApplet.lua on my laptop and used wget to move it into /etc/plugboard but running top the xap-plugboard service didn’t appear to be running. I tried to launch it via ssh:

# xap-plugboard
lua: error loading module 'jeenodeApplet' from file '/etc/plugboard/jeenodeApplet.lua':
/etc/plugboard/jeenodeApplet.lua:4: unexpected symbol near '?'
stack traceback:
[C]: ?
[C]: in function 'require'
/etc_ro_fs/plugboard/plugboard.lua:23: in function 'fun'
/usr/share/lua/5.1/pl/tablex.lua:365: in function 'foreach'
/etc_ro_fs/plugboard/plugboard.lua:71: in main chunk
[C]: ?
Loading /etc/plugboard/jeenodeApplet.lua #

So it looks like a problem with the jeenodeApplet.lua. I spent quite some time puzzling over it till messing around with VI I noticed a few vanishing/invisible question marks ? In the file. I guess this is something to do with the various character sets and binary/ascii conversions that took place moving the file from my laptop (osx) to my webserver (some flavour of linux) and then to the hah! Now the file was fixed I was able to get the service up and running! Excellent- what next?

I tried using xFXviewer to pickup the xAP broadcasts but all I could see was local feedback:

Again- a lot of playing, checking firewalls etc but to no avail. Eventually I installed xFXviewer on another virtual machine and picked up the broadcasts:

Now with Brett’s help I’d flashed the jeelabs roomnode3 sketch onto the roomnode and was getting "a bit more" data back for temperature, humidity and light: ROOM 0 0 0 -396 0 but something’s still not right! This time after fiddling I tried another jeenode with the room plug and bingo:

[roomNode.3] B i2 g212 @ 868 Mhz
ROOM 7 0 51 228 0
ROOM 64 0 59 230 0

Now to try building my graphics board :)

Seemed pretty painlesss- now let’s get the glcd_demo onto the board and give it a go:

Doh- yet another "not gone according to plan"- but as ever, I will persist :) Thanks to a suggestion from martynj on the jeelabs forum I decided the contrast was the problem and as pointed out, this is controlled by the software so I had a look at the code:

glcd.st7565_set_brightness(0x15);

Bit of a stab in the dark… but let’s trying bringing that down considerably:

glcd.st7565_set_brightness(0x05);

Hallelujah!

One last task before I call it a day: Get some data posting to pachube. Luckily the hah web interface allows this to be configured relatively easily: http://www.dbzoo.com/livebox/hah?s[]=pachube#xap_pachube but as expected I ran into technical difficulties. I forgot to take a note of the message but it was because of a blank row in the config:

The trash can doesn’t seem to work to delete the record so I had to manually fix the /etc/xap-livebox.ini via ssh (see the count=X setting under the [pachube] section). And after a few hours running:

Voila! I’m not quite sure what’s responsible for the drop-outs but I will get to that later. Hopefully I’ve learnt the basics whilst troubleshooting the various problems and as I find the time to get additional hardware/software up and running it’ll all go a lot more according to plan!

Here’s some ideas of what I’d like to do in a rough order (some of it is unrealistic):

  • Hookup a node in the main rooms of the house for monitoring temperature, humidity, light and in some also motion
  • Hookup a pulse counter to my gas meter (Schlumberger R5 which fortunately already has an RJ11 or RJ12 socket)
  • Hookup flow meters to my mains water supply and central heating output from the boiler (I’ve already ordered the parts for this)
  • Hookup some rf sockets/mains switching (to remotely turn lights and some other mains devices on/off- currently investigating solutions: plugwise seems to be one of the only 2-way solutions but the reliability is reportedly flakey unless you have a lot of devices)
  • Retire my CurrentCost bridge/netsmart in favour of directly connecting the EnviR CC128 to the hah (there’s no real urgency for this as the data is already being sent to pachube)
  • Attempt to interface with smoke alarms (it’d be nice to house the roomnode for measuring temperature, light, humidity and motion all in one neat package)
  • Collect data from other areas of my network to send to pachube (bandwidth stats from my pfSense virtual appliance, disk usage from my fileserver etc)
  • Build a database to house additional info & potential some of the existing data (depending on how easily I can query pachube)
  • Build a website to display the various information housed by pachube & my custom database
  • Add "security" devices: A few high resolution outdoor cameras and a few devices to detect open/close doors.
  • I’m sure I’ve missed some stuff off…

Some inspiration from these ideas has come from: http://bwired.nl/ and http://www.hekkers.net/domotica/

L

My first Jeenode(s)!

My order was delivered today and I found time to solder one of the jeenodes and a room board (yes- another poor camera phone photo):

I then plugged it into my livebox flashed as a home automation hub: https://tickett.wordpress.com/2011/11/27/orange-livebox-flashed-with-home-automation-hub-firmware/

And followed the instructions on the hah site to flash the room node program: http://www.dbzoo.com/livebox/hah_hahnode#flashing_from_the_hah

# /etc/init.d/xap stop serial
# cd /root
# ls
HAHcentral.hex roomnode2.hex
# stty -F /dev/ttyUSB0 hupcl
# avrdude -v -c arduino -p m328p -P /dev/ttyUSB0 -b 57600 -Uflash:w:roomnode2.he
x

avrdude: Version 5.10, compiled on Nov 25 2011 at 11:22:59
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2009 Joerg Wunsch

System wide configuration file is "/etc_ro_fs/avrdude.conf"
User configuration file is "/root/.avrduderc"
User configuration file does not exist or is not a regular file, skipping

Using Port : /dev/ttyUSB0
Using Programmer : arduino
Overriding Baud Rate : 57600
avrdude: stk500_recv(): programmer is not responding

avrdude done. Thank you.

Damn- what does that mean? I googled a little and found some articles suggesting other services may already be using the USB port. One such service is gpsd- let’s try stopping it:

# service gpsd stop
-ash: service: not found

Doh- no service command. Let’s try top to see if gpsd is running:

Mem: 11992K used, 1888K free, 0K shrd, 2224K buff, 4428K cached
CPU:   0% usr   1% sys   0% nice  97% idle   0% io   0% irq   0% softirq
Load average: 0.05 0.23 0.12
  PID  PPID USER     STAT   VSZ %MEM %CPU COMMAND
  193   184 root     R     2248  16%   1% top 
  183   110 root     S     1740  13%   1% dropbear -p 22 
  178     1 root     S     3552  26%   0% lua /etc_ro_fs/plugboard/plugboard.lua 
  145   140 root     S     5012  36%   0% /usr/bin/kloned 
  156   140 root     S     5012  36%   0% /usr/bin/kloned 
  140     1 root     S     5000  36%   0% /usr/bin/kloned 
  142     1 root     S     2584  19%   0% /usr/bin/xap-currentcost -s /dev/ttyUSB0 -i br0
  184   183 root     S     2268  16%   0% -ash 
    1     0 root     S     2256  16%   0% init 
   95     1 root     S     2248  16%   0% udhcpc -T 10 -i br0 
  123     1 root     S     2240  16%   0% inetd 
  110     1 root     S     1668  12%   0% dropbear -p 22 
  132     1 root     S     1068   8%   0% /usr/bin/xap-livebox -s /dev/ttyS0 -i br0 
  129     1 root     S     1028   7%   0% /usr/bin/xap-hub -i br0 
    7     1 root     SW       0   0%   0% [mtdblockd]
    3     0 root     SWN      0   0%   0% [ksoftirqd_CPU0]
    8     1 root     SW       0   0%   0% [khubd]
    2     1 root     SW       0   0%   0% [keventd]
    5     0 root     SW       0   0%   0% [bdflush]
    6     0 root     SW       0   0%   0% [kupdated]

Ah hah! CurrentCost is enabled and configured on the same USB port:

So I disabled it and tried again:

# stty -F /dev/ttyUSB0 hupcl
# avrdude -v -c arduino -p m328p -P /dev/ttyUSB0 -b 57600 -Uflash:w:roomnode2.hex

avrdude: Version 5.10, compiled on Nov 25 2011 at 11:22:59
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2009 Joerg Wunsch

         System wide configuration file is "/etc_ro_fs/avrdude.conf"
         User configuration file is "/root/.avrduderc"
         User configuration file does not exist or is not a regular file, skipping

         Using Port                    : /dev/ttyUSB0
         Using Programmer              : arduino
         Overriding Baud Rate          : 57600
         AVR Part                      : ATMEGA328P
         Chip Erase delay              : 9000 us
         PAGEL                         : PD7
         BS2                           : PC2
         RESET disposition             : dedicated
         RETRY pulse                   : SCK
         serial program mode           : yes
         parallel program mode         : yes
         Timeout                       : 200
         StabDelay                     : 100
         CmdexeDelay                   : 25
         SyncLoops                     : 32
         ByteDelay                     : 0
         PollIndex                     : 3
         PollValue                     : 0x53
         Memory Detail                 :

                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           eeprom        65     5     4    0 no       1024    4      0  3600  3600 0xff 0xff
           flash         65     6   128    0 yes     32768  128    256  4500  4500 0xff 0xff
           lfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           hfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           efuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           lock           0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           calibration    0     0     0    0 no          1    0      0     0     0 0x00 0x00
           signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00

         Programmer Type : Arduino
         Description     : Arduino
         Hardware Version: 2
         Firmware Version: 1.16
         Vtarget         : 0.0 V
         Varef           : 0.0 V
         Oscillator      : Off
         SCK period      : 0.1 us

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.00s

avrdude: Device signature = 0x1e950f
avrdude: safemode: lfuse reads as 0
avrdude: safemode: hfuse reads as 0
avrdude: safemode: efuse reads as 0
avrdude: NOTE: FLASH memory has been specified, an erase cycle will be performed
         To disable this feature, specify the -D option.
avrdude: erasing chip
avrdude: reading input file "roomnode2.hex"
avrdude: input file roomnode2.hex auto detected as Intel Hex
avrdude: writing flash (10600 bytes):

Writing | ################################################## | 100% 3.45s

avrdude: 10600 bytes of flash written
avrdude: verifying flash memory against roomnode2.hex:
avrdude: load data flash data from input file roomnode2.hex:
avrdude: input file roomnode2.hex auto detected as Intel Hex
avrdude: input file roomnode2.hex contains 10600 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 2.69s

avrdude: verifying ...
avrdude: 10600 bytes of flash verified

avrdude: safemode: lfuse reads as 0
avrdude: safemode: hfuse reads as 0
avrdude: safemode: efuse reads as 0
avrdude: safemode: Fuses OK

avrdude done.  Thank you.

Voila!

Now let’s try flashing the hahcentral program onto the jeelink usb v3:

# stty -F /dev/ttyUSB0 hupcl
# avrdude -v -c arduino -p m328p -P /dev/ttyUSB0 -b 57600 -Uflash:w:HAHcentral.hex

avrdude: Version 5.10, compiled on Nov 25 2011 at 11:22:59
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2009 Joerg Wunsch

         System wide configuration file is "/etc_ro_fs/avrdude.conf"
         User configuration file is "/root/.avrduderc"
         User configuration file does not exist or is not a regular file, skipping

         Using Port                    : /dev/ttyUSB0
         Using Programmer              : arduino
         Overriding Baud Rate          : 57600
avrdude: stk500_getsync(): not in sync: resp=0x20

avrdude done.  Thank you.

Doh! Google time again… this time it looks like the settings for the flasher are incorrect (i.e. the chip isn’t m328p?). I double checked the jeenode usb v3 spec and confirmed the chip is ATMEGA 328. But noticed a comment about the OptiBoot loader. With a little more research I confirmed that the baud rate has increased from 57600 to 115200. Let’s try again:

# avrdude -v -c arduino -p m328p -P /dev/ttyUSB0 -b 115200 -Uflash:w:HAHcentral.hex

avrdude: Version 5.10, compiled on Nov 25 2011 at 11:22:59
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2009 Joerg Wunsch

         System wide configuration file is "/etc_ro_fs/avrdude.conf"
         User configuration file is "/root/.avrduderc"
         User configuration file does not exist or is not a regular file, skipping

         Using Port                    : /dev/ttyUSB0
         Using Programmer              : arduino
         Overriding Baud Rate          : 115200
         AVR Part                      : ATMEGA328P
         Chip Erase delay              : 9000 us
         PAGEL                         : PD7
         BS2                           : PC2
         RESET disposition             : dedicated
         RETRY pulse                   : SCK
         serial program mode           : yes
         parallel program mode         : yes
         Timeout                       : 200
         StabDelay                     : 100
         CmdexeDelay                   : 25
         SyncLoops                     : 32
         ByteDelay                     : 0
         PollIndex                     : 3
         PollValue                     : 0x53
         Memory Detail                 :

                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           eeprom        65     5     4    0 no       1024    4      0  3600  3600 0xff 0xff
           flash         65     6   128    0 yes     32768  128    256  4500  4500 0xff 0xff
           lfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           hfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           efuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           lock           0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           calibration    0     0     0    0 no          1    0      0     0     0 0x00 0x00
           signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00

         Programmer Type : Arduino
         Description     : Arduino
         Hardware Version: 3
         Firmware Version: 3.3
         Vtarget         : 0.3 V
         Varef           : 0.3 V
         Oscillator      : 28.800 kHz
         SCK period      : 3.3 us

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.01s

avrdude: Device signature = 0x1e950f
avrdude: safemode: lfuse reads as 0
avrdude: safemode: hfuse reads as 0
avrdude: safemode: efuse reads as 0
avrdude: NOTE: FLASH memory has been specified, an erase cycle will be performed
         To disable this feature, specify the -D option.
avrdude: erasing chip
avrdude: reading input file "HAHcentral.hex"
avrdude: input file HAHcentral.hex auto detected as Intel Hex
avrdude: writing flash (6668 bytes):

Writing | ################################################## | 100% 2.57s

avrdude: 6668 bytes of flash written
avrdude: verifying flash memory against HAHcentral.hex:
avrdude: load data flash data from input file HAHcentral.hex:
avrdude: input file HAHcentral.hex auto detected as Intel Hex
avrdude: input file HAHcentral.hex contains 6668 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 2.34s

avrdude: verifying ...
avrdude: 6668 bytes of flash verified

avrdude: safemode: lfuse reads as 0
avrdude: safemode: hfuse reads as 0
avrdude: safemode: efuse reads as 0
avrdude: safemode: Fuses OK

avrdude done.  Thank you.

Sorted. Hopefully another update later tonight :)

L

Everything went relatively according to plan following instructions from: http://www.dbzoo.com/livebox/livebox

I only hit one snag- trying to take a shortcut and not bother changing the ip address of the router to 10.0.0.1 and the pc running the http/ftp server to 10.0.0.2. The reason appears to be that the livebox name field takes a maximum of maybe 32 characters so ;cd /etc;wget ftp://192.168.0.111/u for example does not work.

Now just waiting of delivery of a couple of Jeenodes: http://www.dbzoo.com/livebox/hah_hahnode

A few Airwick’s: http://www.dbzoo.com/livebox/hah_hahnode#airwick_hahnode have already been delivered :)

And I’m still researching various remote switching options: http://www.domoticaforum.eu/viewforum.php?f=55 looks to be a good source of information. The plugwise http://www.plugwise.com/idplugtype-g/ devices look quite promising as they’re one of the only options that support two way communication. They also come with an added bonus of monitoring power consumption of the device(s) attached to them. The shortfalls being reliability (read some bad reports from the domoticaforum) and cost (but the functionality might justify it). I’m not sure if/how well they would integrate with the HAH.

L

Home Automation

I’ve been doing a lot of research into home automation, a/v distribution and data capture/monitoring recently and whilst I’ve found a endless amounts of information there seemed to be a few issues present across all solutions:

-Price
-Standards
-Availability
-Support

I did mention the Home Automation Hub (http://www.homeautomationhub.com/) project I stumbled across last month in a blog post but had initially dismissed because it appeared that the project had been abandoned. However, Derek, part of the project fortunately dropped me an e-mail to inform me the project is very much still alive! This solution therefore hopefully doesn’t fall short on any of the fronts the others (Control4, Crestron etc) do.

-Price: The central hub itself is a repurposed livebox router which I found on eBay for about £5. The additional hardware I need to control, collect and display data appears to vary but it’s modular and most modules appear to be very reasonably priced.
-Standards: The software running on the central hub is open source and can interface with existing devices using a whole host of standards. Support for additional standards could be developed at a later date.
-Availability: I found plenty of live box routers on eBay- I’m not sure if they’re still sold commercially but I imagine if there was a point in the future when they’re no longer available the image will be ported so it can be flashed onto alternative hardware. There are a number of options for the modules required for control, collect and display data so I think there will always be something available.
-Support: As the project is open source the community support is great and there appears to be activity on the hah forum everyday!

Initially I was going to order the hah parts bundle from the shop http://www.homeautomationhub.com/content/hah-parts-bundle but the pcb is currently out of stock so I’m researching for a bit longer :)

It looks like most of what I want to collect / control can be handled by Jeenodes http://www.dbzoo.com/livebox/hah_hahnode – RF enabled AVR328P boards using the same development tools as the Arduino. In addition to:

-Room Board (for monitoring temperature, light and humidity)
-Expander Plug (for general purpose digital I/O)
-Input Plug (for general purpose analog input)
-Infrared Plug (possibly to interface with a/v equipment or maybe add light/mains control to my harmony remotes?)
-Relay Plug (in the hope to control lights and potentially sockets- I don’t think the board currently uses latching relays so this would probably drain the batteries far too quickly- hmm…)
-OOK 433 Plug (in the hope to hijack the data from my weather stations and maybe the current cost energy monitoring devices)
-Graphics Board (display some of the info without having to access a mobile/computer and open a web browser)
-Extension Cables & Plug Headers and Battery Holders to hook everything up

The hahnode article on the hah website shows a novell way of repurposing an Airwick Freshmatic Compact http://www.dbzoo.com/livebox/hah_hahnode#airwick_hahnode to house the jeenode, provide power and detect motion- so I’ve ordered a few of these too. Shopping List (prices include p&p):

£10.00- Livebox Router (eBay)
£11.25- TTL Connection / Programming Cable (HAH)
£18.00- 3x Airwick Freshmatic Compact (eBay)

I’ve yet to place my order with jeelabs but my cart is looking something like:

Things I’m still yet to think about:

-Doorbell (integrate with the system? http://www.bwired.nl has inspired me- I love the idea of having a camera capture a photo when the doorbell is pressed)
-Security (Cameras, Door/window open/close/lock/unlock?)
-Boiler
-A/V distribution (my satellite receiver(s) are on the network as is my 4×4 HDMI matrix)
-Phone (I don’t currently have a phone connected to my landline but I do have some ip phones I’ve been playing with… I also like the idea of adding a mobile to send/receive sms but this might be overkill as twitter or something could be potentially be implemented more cheaply)

The cameras which are currently looking most appealing: http://www.ebay.com/itm/ws/eBayISAPI.dll?ViewItem&item=220875730715&ssPageName=ADME:X:RTQ:US:1123

Lots to still think about!

L

Energy Monitoring Update

So I’ve neglected the whole energy monitoring interest for a few months but spotted the new CurrentCost Individual Appliance Monitors (IAMs) are finally available (http://www.ebay.co.uk/itm/Current-Cost-IAM-Pack-1-UK-Version-Only-/170673700726?pt=UK_AudioElectronicsVideo_Video_TelevisionSetTopBoxes&hash=item27bcf1ff76) so ordered a few and started playing again.

In addition to monitoring overall household consumption I now have the fridge, servers and living room a/v equipment each giving their own power readings BUT these are not currently posted to the internet using my original CurrentCost bridge. After doing a little reading it appears a new bridge has been released now branded as the CurrentCost "NetSmart". You can send off your existing device to be upgraded (presumably a firmware flash): http://currentcost.com/netsmart-upgrade.html or buy new.

Upgrade pricing:

£5.99- NetSmart 12 (12 month subscription with up to 3 additional energy data channels)
£7.99- NetSmart 24 (24 month subscription with up to 3 additional energy data channels)
£11.99- NetSmart Pro 12 (12 month subscription with up to 9 additional energy data channels)
£14.99- NetSmart Pro 24 (24 month subscription with up to 9 additional energy data channels)

New pricing:

£34.49- NetSmart 12
£37.49- NetSmart 24
£39.94- NetSmart Pro 12
£45.94- NetSmart Pro 24

I opted for the NetSmart Pro 24. I’ve yet to receive the device but I’ve seen a sneak peak of what to expect on the forum:

The other addition to my existing system I’ve been wanting to see is the ability to monitor gas and hopefully even water consumption. Neither have officially been delivered BUT a new device is available which may help achieve one or both of the aforementioned: Introducting the CurrentCost OptiSmart- http://currentcost.com/product-optismart.html

The OptiSmart can be used as an alternative to the clamp/transmitter that originally shipped with the energy monitor(s) if (and only if) your electricity meter is compatible. The same device can in theory be used to read gas and water meters should they contain a pulsing LED to indicate consumption. Unfortunately, mine do not! However, whilst examine my gas meter (Slumberger R5) I found an RJ11 socket which after some research appears to provide direct connectivity to the pulses! With a bit of luck the lead on the OptiSmart can be modified to plug in to this RJ11 socket. I’ve sent an e-mail to CurrentCost to see if they can confirm this before I order one. If that fails I may try with the CurrentCost development board.

I mentioned in a post a while back that Google were retiring their Powermeter service so I’m still on the lookout for a replacement service (or building something myself).

After a bit of research I discovered CurrentCost are already feeding the energy consumption and temperature to pachube. There is a nice little pachube app which utilizes google’s charting ability:

You can find your feed_id in the http://my.currentcost.com dashboard (on the right side in the devices section):

Unfortunately only a month’s data is currently retained (this may be a limitation with the free pachube account being used to post the monitor data?) and I really want years of data so I can compare same time last year figures etc. The search continues…

I also stumbled across the Home Automation Hub: http://www.homeautomationhub.com/ which is an open source project which involves ref lashing a Livebox to interact with various devices (including the CurrentCost energy monitor). I really like the idea of this as there’s so much more potential for two-way communication and other applications (linking in nicely with some of my other long term goals) but at the moment I’m going to shy away from it on account of the language being new to me and the apparent lack of current community support.

Expect another update once the NetSmart device comes through and potentially after a start logging gas consumption!

L

%d bloggers like this: