Hurricane Sandy


This post will start of with a live blog of the current power situation due to the hurricane. After this I’ll be concluding the post with an overview of the utility and power line situation is Connecticut.

Live Blog

Providing live blogs when possible of the current situation here:

2:15 pm Monday – I was working from home today. Our office was shutting down at 1pm and it was safer to work from home and avoid the roads. At around 2:15 the power went out . We will shortly be cranking up the generator. Currently posting from iPhone while G3 is still available.

7:05pm Monday – Our power came back on again around 4:30. It has gone out then come back on again twice. It’s now dark and from what we can see, one tree has split in two in the back yard (thankfully it turned out to just be a large tree limb), and the garden shed is wrecked.

8:16pm Monday – We’ve had a fire truck on the street visiting one of the houses, hopefully it was nothing serious. Plenty of debris flying about including numerous signs from people yards for election candidates.

One of neighbors cars has had a basketball net that was cemented into the ground land on it.

10:15pm Monday – The power has gone out again.

Tuesday Morning– The worst of the weather is gone now. Taking a drive we can see power lines and trees down all over the place. The snow storm last year seems to have taken out a lot of the dead trees, so it could have been lot worst. Compared to New York, New Jersey and Long Island sound  we have gotten off very very lightly.

Damaged Tree Line

Damaged Tree Line

McDonalds appears to be the only place open.

Tuesday Afternoon – No power all day. I spent some of the day moving location trying to find an Internet connection. Went to my in-laws business and we had power for most of the morning, then around 1:30 it cut out.

Eventually made it via detours to the office for a couple of hours.

Cleaned up a lot of the debris in the garden and managed to jam the shed doors back on. Time for a new shed though.

Found door number 1

Found door number 1

The lawn guy is going to come and take care of the tree.

Broken Tree Limb

Broken Tree Limb

Thankfully garbage collection is coming Wednesday so we threw out some of the food from the refrigerator.

Tuesday Evening – Still no power. We have now cranked up he generator and are running some of the house off of it. A few places are open for food so we are going to heat out.

Finished a chapter of the ook but can’t submit it via email until the morning.

Hoping for power back on Wednesday

Wednesday  8am – Power is still out. Checking the utility company’s website I can see that 35% of the town are still down. Hopefully they can resolve this today.

Thursday Evening  – We got a our power back on finally Thursday evening. The lawn guy is coming Saturday to take down the dead tree and remove the branch.


Parts of Connecticut really got hit badly by the storm (the coast), but I think overall as a state inland we got off very lightly.

The CT Air National Guard released this video of the coast line which shows the severity:

It looks like the power companies will have most people (around 98%) back up with power by the end of day tomorrow.

I’m sure the question is going to be asked about why cables aren’t being run underground and how the grid can be made more resilient to storms.

I’m also going to be looking into the pros and cons of a solar system to act as a backup for black outs – this is the third major storm we have had since August last year where we have had power knocked out for days on end.

EEG Headsets

Just a quick post on something worth checking out.

Canadian Tech company InteraXon will be releasing their EEG powered headset called Muse next year. You can read more about the device here.

They are currently raising funds from the tech community via IndieGoGo. The process basically involves making a pledge of a certain amount of dollars up front, in return for a Muse headset after the first production run.

More details can be found on the funding section of their website here

To quote from the indieGoGo crowdfunding website:

Introducing Muse, our brainwave-sensing headband.

It’s a comfortable, sleek, four-sensor headband that allows you to control applications, games, reduce stress, improve memory and concentration, and eventually control devices directly with your mind.

Muse measures your brainwaves in real-time. It sends those brainwaves to your smart phone or tablet showing you how well your brain is performing and also translates your brainwaves into instructions to interact with content on your iOS or Android device.


This device obviously offers some excellent opportunities for home automation, a post will be in the works exploring some possibilities.

In the meantime check out their promo video:

Thermostats – Part 3 – The Ethernet Model prototyping


As part of my heating system I have discussed how I am building a set of thermostats that can control the baseboard heaters in my house. The vast majority of these heaters are not located near my PC, electrical box or any of my other computer hardware.

However there is one, that is located in my office close enough to my router that I can connect it up via Ethernet rather than WiFi.

This post will begin looking at prototyping the Ethernet model. A prototype is a handy way of testing the components we have purchased and experimenting with the equipment before we solder it together.

Components required

For the Ethernet model of the thermostat the following components are required:

  1. Arduino Uno
  2. Temeprature sensor
  3. Visual display unit
  4. Ethernet shield
  5. Buttons/manual method of input
  6. Power supply
  7. Ethernet cable
  8. Relays

The picture below shows a group of components I purchased to build the Ethernet model and to prototype with. It includes:

  1. An Arduino Uno
  2. Seeed Studio Ethernet Shield
  3. Temperature sensor purchased from Adafuit – AM2302
  4. All in one TFT screen + button joystick – 1.8″ TFT
Thermostat components

Thermostat components

First steps are prototyping

The prototype we will be exploring below will build a simple thermometer.

For the prototyping I will not  be using the TFT Shield to start with. This is primarily because I am evaluating screen types, which are the best and which ones are better suited for certain locations in the house.

There is a separate post in the works for this, and the outcome of that evaluation will result in the chosen screen type when I blog about turning the Ethernet prototype into the production model.

So to start with we will hook up Arduino, Ethernet shield and temperature sensor and test it works.

For the temperature sensor there is code available via the Adafruit site for testing purposes. This can be downloaded here, along with the instructions for wiring up your equipment.

The picture below shows the temperature sensor wired up.

Temperature sensor

Temperature sensor

Once the sensor was wired up I tried out a few of the test sketches that could be downloaded from the above link. Once I was happy this worked, I then attached the Ethernet shield to the Arduino and attached the temperature sensor to the Ethernet shield.

The picture below shows this setup. Note: At this point I haven’t done any soldering.

Ethernet shield

Ethernet shield

File->Examples->Ethernet->Web server


Modify the settings in the code to assign it an IP# for your local network and upload it to your Arduino. Once done, you can plug in the Ethernet shield to your router and access the IP# you assigned it via a browser on a home computer or tablet.

If you receive the “analog input” message on your screen as a web page, your test has been successful.

For our next test we are going to merge some of the code from the web server example and the temperature example that you downloaded from the Adafruit website.

First, attach your Arduino back to your PC if it isn’t already setup.

Ethernet and Thermostat

Ethernet and Thermostat

Take the following test code and paste it into the Arduino IDE.

Test code.

 Web Server

 A simple web server that shows the value of the analog input pins.
 using an Arduino Wiznet Ethernet shield. 

 * Ethernet shield attached to pins 10, 11, 12, 13
 * Analog inputs attached to pins A0 through A5 (optional)

 created 18 Dec 2009
 by David A. Mellis
 modified 4 Sep 2010
 by Tom Igoe
 modified 18 Oct 2012
 by Andy Dennis

 DHT test

 Returns temperature and humidity.

 modified 18 Oct 2012
 by Andy Dennis  

#include "DHT.h"
#include <spi.h>
#include <ethernet.h>
#define DHTPIN 2 // what pin we're connected to
#define DHTTYPE DHT22 // DHT 22 (AM2302)
// Enter a MAC address and IP address for your controller below.
// The IP address will be dependent on your local network:
byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };
IPAddress ip(192,168,1, 177);
// Initialize the Ethernet server library
// with the IP address and port you want to use 
// (port 80 is default for HTTP):
EthernetServer server(80);
void setup()
  // start the Ethernet connection and the server:
  Ethernet.begin(mac, ip);
void loop()
  float h = dht.readHumidity();
  float t = dht.readTemperature();

  // listen for incoming clients
  EthernetClient client = server.available();
  if (client) {
   // an http request ends with a blank line
   boolean currentLineIsBlank = true;
   while (client.connected()) {
     if (client.available()) {
       char c =;
      // if you've gotten to the end of the line (received a newline
      // character) and the line is blank, the http request has ended,
      // so you can send a reply
      if (c == '\n' && currentLineIsBlank) {
        // send a standard http response header
        client.println("HTTP/1.1 200 OK");
        client.println("Content-Type: text/html");

        // check if returns are valid, if they are NaN (not a number) then something went wrong!
        if (isnan(t) || isnan(h)) {
        client.println("Failed to read from DHT");
     } else {
        client.print("Humidity: "); 
        client.print(" %\t");
        client.print("Temperature: "); 
        client.println(" *C");

   if (c == '\n') {
     // you're starting a new line
     currentLineIsBlank = true;
   else if (c != '\r') {
     // you've gotten a character on the current line
     currentLineIsBlank = false;
 // give the web browser time to receive the data
 // close the connection:

The above code is simply a combination on the Web server sketch and DHTester sketch combined.

You can modify the IP# on this to assign it one on your home network and change the output message if you like.

Now upload this to your Arduino and hook it back up to your router.

With your PC/Tablet, now hit the IP# you assigned it via your web browser. You should see something like the following (provided you didn’t modify the message)

Humidity: 52.3% Temperature: 26 C

This confirms that the temperature sensor is working, and the data can be output via HTTP over Ethernet.

Next Steps

Obviously this is a very simple example, and doesn’t do what we need it to yet. However it demonstrates some of the technologies we plan to use, and also confirms that our components are working. We also have a working thermometer as a by-product of our tests.

Our next steps will be as follows:

1.) Choose the correct VDU (visual display unit)

2.) Test the VDU alongside the prototype code

3.) Write the code to output the temperature over HTTP and to send the data back to the Raspberry Pi

4.) Write the code to manipulate the baseboard heaters

5.) Solder the components together

6.) Place them in a case

7.) Wire the new thermostat unit into the baseboard heater, and attach it to the wall.

I’ll be blogging on the above to provide an easy guide to completing the production model, and also adding the code to BitBucket.


The above example has shown that a quick prototype can be used to test our components before writing a lot of code and soldering equipment together.

The next post in this series will be dedicated to testing the VDU and assigning one to the prototype that is easy to use and displays the data we need it to.

A quick update

This month has been extremely busy so time for blogging has been tight.

Here is a quick update of what is going on with the heating and associated projects:

Book deal

There is now currently a book in the works covering some of the topics on this website using a new technology available for the raspberry Pi. I won’t give too much away in this post, other than to say, if you are interested in the subjects blogged about here, then this is a book for you. More details on this as I can release them.

Change in temperature

As October has rolled in, the temperature has started to drop. This is perfect timing for testing one of my first thermostats – the thernet model. More on this thermostat in a separate post to follow

Database server

Over the next couple of months I will be sourcing the hardware to set up my permanent Postgres DB server. If you followed my earlier post on the prototype DB server I showed how we can set up a Postgres DB for storing temperature readings and then query it with HTSQL. Going forward I will document the setting up process of the actual production server, the database architecture and HTSQL server configuration. All of code will be available via BitBucket which leads me too….

BitBucket account

I will be setting up a BitBucket account where you can download copies of the bash scripts, code and documentation for your own projects.

Index/ToC page for the blog

Expect to see an Index/ToC page for the blog. This will provide a page where posts are grouped by topic and thread, so you can read a set of posts on a particular subject in logical order when working on that aspect of your heating system.

Other subjects

There are some posts in line discussing:

  • MagPi – the Raspberry Pi fanzine
  • Arduino visual display components – a comparison of TFT and LCD components for thermostats
  • Some good books worth reading
  • X10 – A look at the X10 standard, thanks to stillwaternc for the discussion on this over on the About page.

So keep your eyes on this space for more posts to come.

Punching cable Part 1 – Patch panel, cables, switches


The other weekend I got the opportunity to practice my cable punching skills and learn a little more about the wiring behind networks and phone systems. In this post I’ll briefly give a quick overview of a project I had the chance to work on and part 2 will look at how this can translate into the home environment.

Part 2 will also look at how these home applications can be used with the intelligent heating system I am building.

Punching cable

My wife’s family business is currently going through the process of building a new office, and as a result of this there is a substantial amount of phone and network cabling that is required in order to support the staff. Along with one of the employees I spent a weekend hooking up the cables the electricians had run from the network and phone sockets to the patch boards in the phone room.



As you can see in the photo above there was a substantial amount of work to be done.

In total we had a trunk cable with 50 pair leading from the PBX to a patch board, 48 cables running from phone sockets (these are the white cables) to the same patch board as the trunk and another 48 Cat-5 cables (the blue) which will be used for ethernet.

Our first job was to take the loose end of the Cat-5 and punch this into the patch panel.

Patch board

Patch board

Patch panels are relatively cheap and can be picked up at Home Depot for example. For most home projects a 12 port patch panel should do the trick, and only set you back around $30

In order to attach the cable you will need a punch down cable installation tool.

TRIPPLITE TrippLite 110/66 Punch Down Cable Installation Kit

Dell – TRIPPLITE TrippLite 110/66 Punch Down Cable Installation Kit

These can be picked up online, or at most good stores that stock electronic/electrical products.

For this project we were following the B standard (T568B) of Cat-5 termination. There are two standards you can following, T568A and T568B, Wikipedia provides a more in-depth look at the differences.

The process of punching the cable itself for the B standard is relatively straight forward.

You simply match up the cable pair by color with the schematic on the back of the panel and then punch the cable into place using the tool shown above.

Once the cable was punched into place, the next task was to test our work to ensure the cable was sending a signal from the wall socket to the patch panel.

Testing the cable

Testing the cable

The photo above shows both the phone line toner and the network line tester. Both of these devices work in a similar manner. You hook one end up to the wall socket, and then in the case of the network tester, plug it into the patch board, and in the case of the toner, hold the sensor tip over the phone line on the patch board.

When you hit the test button on the network tester you should see all the light go green to indicate that the connection is good. With the toner, when you hold the sensor tip over the connected phone line on the patch board you’ll hear a sound that indicates you have a signal.

You can see some example of these tool here.

We repeated the above process of punching and testing until the 48 phone lines, trunk cable and 48 Cat-5 cables were complete.

You can see the finished work below on the phone patch board with the phone lines and the Trunk hooked up:

Phone patch board

Phone patch board

And here is the completed job, ready for the switches to be attached to the network patch board.

Punching cable complete

Punching cable complete


The above process has given me a good overview of how to set up cables and get them in punched in ready to use. As with most things in electronics, practice makes perfect. Once you get the hang of punching cable it is relatively easy. It will also give you the ability to cable Cat-5 in your own home taking some of the load of your Wi-Fi connection if you have hardware that needs a good solid, strong connection.

In Part 2 we will look at the home application of installing a network switch and implementing a patchboard.