Insteon Thermostat

With winter on the way and the temperature dropping I thought it about time to upgrade my thermostat to allow a bit more control, especially good on those days you don’t want to get out of bed just to turn on the heater.

I was keen on getting a NEST however the $300+ price tag seemed a bit much just for a thermostat so I settled on the Insteon Thermostat which will link in with my other Insteon gear.

DSC_1258

DSC_1259

The first step was to run a new wire to the thermostat as the current one only uses two wires (+24 and Heat) wheres the Insteon Thermostat requires +24, common, heat and fan (and cooling if used)

For this reason it pays to check both your thermostat and also the heater control board as the “dumb” base thermostats may not use all the wires available even if they are present (Heater was not listed as being compatible based on the thermostat but works fine with the extra wires connected)

I pulled a length of CAT5 from the heater to the thermostat and set about rewiring the heater, lucky enough the manufacturer was nice enough to put the wiring diagram on the control board:

heaterwiring

As you can hopefully see below I’ve replaced the old wiring with CAT5 using four terminals now rather than two.

DSC_1266

And then matched up on the Insteon Thermostat:

DSC_1263

And up and running 🙂

DSC_1268

Setup with the Insteon hub and app was easy. Open the app -> add device -> thermostat. App will inform you to hold the Set button on the thermostat till it beeps then the two sync up. After it’s done you are presented with this screen allowing control:

Screenshot_2015-04-21-18-14-23

I then setup wake, leave, return and sleep programs for week days so the heater will come on just before my alarm, switch off as I’m leaving, turn back on as I’m leaving work and shut off when I go to bed.

Programming details were not included in the quick start guide in the box and I had to find a PDF of them on the Insteon website, I’ve uploaded a copy here.

Now to wait till morning and see if I wake up nice and warm 🙂

Weather Station

Been a good fortnight for deliveries it seems, my weather station arrived this morning 🙂

The unit is just a cheap station (~$90 eBay) but provides wind speed/direction, rain fall, temp, humidity and air pressure as well as a USB connection to pull data into a PC and should have enough accuracy for what I need.

Got the unit unpacked and put together and begun some testing:

Test Setup

The included software is rather simple but does include an upload function which can be used with Weather Underground for their PWS system or to a custom PHP, JSP, ASP file which I will use to import the data to my mysql system.

This will allow me to graph data from my radiation monitor, my own temp/humidity sensors and weather data.

Easyweather Software

After testing the unit worked correctly I set about mounting the hardware. The station I’ve mounted to my antenna poll on the roof giving it good height from the surrounding houses, etc and the display has been mounted next to my thermostat allowing easy viewing and a short distance to run the USB cable to my NAS for data collection.

Next step is to write a PHP script to interpret the data from the unit and store it in my database.

Display mounted on the wall

I’ve also ordered an Insteon Thermostat which should hopefully arrive in the next couple of days allowing my to control the heating/cooling in the house 🙂

Raspberry Pi Doorbell and Camera Part 2

After a session of lifting tin and climbing through the roof to run cables the camera has now made it’s way to it’s new home 🙂

After the cable was run I wired up the POE and Ethernet and found there was too much of a voltage drop over the line to keep the Raspberry Pi running while taking a picture so I changed out the 5v PSU for a 7.5v PSU to bring the line voltage up.

After I did this the Pi booted no worries and shot off a picture.

psu

My eBay case arrived and while not the most subtle case for the job it has more than enough room to house everything.

The Pi was mounted to the plastic board inside with a pair of zip ties and the camera with a good chunk of blue tack. I think I’ll eventually mount the camera better but with the camera board being so small it is a bit of a pain to mount.

case outside

case inside

camera

And after mounting the case out the front we have success:

front door

I made a few further changes to the software side as well as shown here:

run script

As you can see here upon the door bell being pressed the Pi:

1. Sends a pushover notification via the API

2. Captures two pictures. One low res and one hi res

3. Attaches and emails the low resolution picture

4. Inserts the date and time to a mysql database

5. Copies the hi resolution picture to my NAS

 

Here you can see the mysql table which simply contains the date and time the door bell was pressed, eventually I will do up a PHP interface to be able to view the data from mysql more easily.

mysql

 

And now onto the next project 🙂

Webserver, Mysql and Temp Sensors

A bit of work finally got done on the back end systems for home automation including setup of a new Debian VM for a web server and Mysql server to allow data collection from various sensors around the house as well as hosting the library data for Kodi (XBMC).

I now have two virtual machines running on the NAS. The Windows 7 machine runs Home control assistant which gives access to Insteon control as well as the USB relay boards from both PC and Phone.

The Debian machine is configured with Apache2 for web, Mysql database as well as running python scripts to poll the various sensors and insert the data into Mysql.

virtualbox

I currently am using two different sensors. The water proof DS18S20 temperature sensor and the DHT22 temperature/humidity sensor.

Further DHT22 sensors will be added to both the bathroom and en-suite to allow humidity based extraction fan toggling.

Sensor overview:

table

Temperature graph:

Temp

Humidity Graph:

Humidity

Currently all sensors are polled every 5 minutes and saved into Mysql. Graphing is done with jpgraph in PHP which I need to spend sometime on to get looking right/nice.

Another database keeps track of each time the door bell is pressed and I plan on making a PHP front end for it that will link to the pictures, etc.

I’ve also ordered a cheap weather station with wind speed, direction, rain collection, temp and humidity that allows USB data collection which I will add in as well which will hopefully give a good location weather overview and will allow me to control sprinklers, etc based on rain, etc.

Door bell system has been put into it’s new case and is ready to be mounted just need to run the CAT5 to it’s new home which should hopefully get done over the weekend.

Raspberry Pi Doorbell and Camera Part 1

After missing several people knocking at the door it was decided a doorbell was in order but I didn’t just want some annoying ringing bell to drive me nuts so after seeing Ahmad Khattab’s project on Hackaday here planning began on my own Raspberry Pi based door bell.

You can find Ahmad’s original Github repository here and Google doc with build instructions here.

Parts List:

Raspberry Pi Model B

Raspberry Pi Camera

Cheap wireless doorbell

Weather proof Case

 

I downloaded the complete SD image from here and used Win32 Disk Imager to put the image on an 8GB SD-Card after boot I went in and modified the code slightly by commenting out lines related to the LCD as I won’t be using it and have added support for Pushover a service that allows for push notifications to be sent to iOS, Android and also desktop browsers.

I also modified camera.py to take two pictures one at 800×600 which is emailed and a second at full resolution which is later copied to my NAS for storage.

launch.sh is used to start it monitoring the GPIO pin, I added this as a cron job on reboot.

Can download the modified files here.

The files that need to be customized for use are:

send_email_fast.py – Set your email address and SMTP server

send_email_attachment.py – Set your email address and SMTP server

pushover.py – Set your Pushover User and App Key’s

run.py – Un-comment and set path if you wish to copy the picture to a network share

There is also Google hangouts, twitter and Zapier support but I have not used them here.

 

With the software sorted it was onto the hardware:

DSC_1198

I stripped the circuit board from the receiver unit and un-soldered the speaker and battery connectors and replaced them with new leads. Someone was even nice enough to silk screen the board with all the appropriate labels.

DSC_1199

I then connected the battery leads to 3.3v (Pin 1) and Ground (Pin 9) and the speaker leads to GPIO7 (Pin 26) and Ground (Pin 25) for my build I omitted the 10K resister and am yet to have any issues.

gpio

DSC_1200

DSC_1222

A quick test and seconds later both a pushover notification and E-Mail arrived:

notification

Open up the email and we find the picture attached:

email

I’m still awaiting my case from China after it arrives the next step will be to mount all the hardware in the case, run a network cable to the location and wire up PoE for the unit.

I also intend to add support for the camera to be triggered by the motion sensor out the front for when I’m away or asleep for security.

 

Read on in Part 2