Tuesday, 7 October 2014

Guest post: Designing a house of the future past

Today's post written by HB Cranky, who has spent 18 months designing a house of the future with some software input from Lunarlite.

Heating in Winter

As shown by Nest and Hive, it is a common desire to have more control over home heating. In conversation with a friend in 2013 about the potential of nest (this was pre British Gas announcing hive) it was speculated on the potential of doing a low cost version. Both of our houses already utilised a wireless thermostat and so it was a question of whether we could (cheaply) replace them with something that would give us greater flexibility.
The first question was whether we could decode the signal being sent from the therm to the receiver:

Drayton (Old Thermostat) for boiler control. We sniffed this using a £0.99 433 receiver, two resistors and Audacity.
British Gas rebadged Drayton set. We also sniffed these.
We initially used audacity with a line in and a couple of resistor and listened to the broadcasts: , subsequently we discovered that a dvb tuner would do the same job.
It was discovered that the boiler control was relatively simple, namely either on or off sent to it every 5 minutes - the receiver would alarm otherwise. The signal itself was also simple, and we quickly progressed to constructing a new transmitter that would give us greater control.
Main requirements:
To gain any benefit over the existing thermostat the replacement would have to be more flexible. For it to be of use the following was required:
Remote control of temperature - via a web page / app
'Holiday' mode
Intelligent heating - based on external and internal temperatures.
The Central heating ideal temperature is stored in a Google calendar to allow the house temperature to be dictated.
The LCARS web interface is accessible from outside the house using port forwarding.
433 in-situ Transmitter board attached to Raspberry Pi

New Thermostat in situ
New Thermostat - Pygame based interface, based on Galilean Thermometer. The Right hand control sphere controls the temperature.

Bob Dobbs appears when the heating is on.
Thermostat LCARS (web) interface. Written in Django. The left two columns display temperature readouts (Attic, Barab and Cellar are inside, Eden and Forno are in the garden).

We use redis to record all the temperatures, queue up the boiler commands and work out how often we need to talk to the boiler. A Django front end provides an interface into the important redis values.

Cooling in Summer

Once the heating had been covered, we had the opposite problem in Summer. How to cool the house automatically. Given that when Velux windows are installed, a remote for each window is provided, there are 3 remotes for only two adults. We asked ourself what we could do with them. Velux use the io-homecontrol which is a proprietary two-way encrypted protocol. When attacked, techies always route around the damage. We decided to solder a load of relays to the remote.

We called this product velpi.

VelPi. Pi powered velux remote control.
Velpi during construction
with all boards exposed. Raspberry Pi in bottom right, 433 sender board to the left with Ciseco Slice of I/O on top. Sainsmart relay board above (blue), soldered PCB for cable sanity and finally bare VELUX remote. Individual buttons can be seen soldered.

Velpi: Much neater when the top perspex plate goes on

Switching on/off Garden features using 433 sender board

So what happened to the original plan of using the 433 sender board to power on/off the garden features? . The same 433 transmitter is being used (with a set of queueing commands in redis) to either send commands to the boiler or to switch on the monolith or the deck lighting. At Christmas time, extra plugs are used to switch on/off lights.
Energenie 433 receiver which switches on / off individual sockets.

More information and source code

1 comment:

gabfol said...

Good morning,
congratulations for the excellent tutorial.
Let me ask you a hand because I have too a raspberry, the module 8 relays and 3 velux installed. However, Velux has the pad and the remote control will not.
Do you think if I buy a remote control (so you can use the 433 frequencies) can do as you have done to operate the Velux?
thanks a lot for avaiablity