Thermostat hacking help needed!

Discussion in 'Wireless & RF Design' started by paulsoulsby, Oct 24, 2014.

  1. paulsoulsby

    Thread Starter New Member

    Jan 9, 2013
    20
    0
    I've been trying to hack my thermostat so I can create a home automation system. The thermostat is a British Gas RC2 and the receiver is a British Gas WR1. There is virtually no documention about these, but they are identical to the Drayton Digistat range which does have documentation. I found this google group thread which provided some clues.

    I know that the system is 433MHz (I even pulled apart the thermostat and looked at the datasheet for the transmitter to be sure!).

    I bought a cheap 433Mhz receiver and transmitter pair off eBay.
    [​IMG]
    I tested txing and rxing between the pair (using Arduinos + VirtualWire library) and this worked very well. I then tried transmitting the code off the Google group from the Arduino + transmitter to the WR2 receiver with no joy.

    The next step was to listen to what the thermostat was transmitting. I recorded the output of the receiver into Audacity via this circuit. Below is the recording of the data burst when the thermostat transmits. It sends this message 3 times. I've aligned multiple transmissions, so you can see how the data correlates.
    [​IMG]
    As you can see the data correlates very well towards the end of the transmission, but is poor towards the start of the transmission. It's worth noting that my thermostat successfully turns on the boiler every time I click the button, so it's puzzling that there is so little correlation at the start of the data.

    The next step was to try recording the signal from the 433MHz transmitter that came with the receiver. I know that these 2 can communicate together successfully, so wanted to see how the signal differed.
    [​IMG]
    You can see that the test signal from the transmitter (top) is very clear and the thermostat signal (bottom) is very weak at the start of the transmission.

    The test signal transmits "HELLO" via the Arduino's VirtualWire library. There's nothing to say that this protocol will be the same as what the thermostat uses. However I would expect both to produce clear signals.

    So my question is.... why is the signal from the thermostat so weak and inconsistent at the start of the transmission?

    Do I need a better/different receiver? Am I not reading the data in the correct way?

    Any help would be appreciated.

    Paul
     
  2. Alec_t

    AAC Fanatic!

    Sep 17, 2013
    5,789
    1,103
    I think charging/discharging of the two capacitors in your interface circuit may be part of the problem re the initial part of the waveform. Are you using a line-in level socket or a mic socket for the recording?
     
  3. paulsoulsby

    Thread Starter New Member

    Jan 9, 2013
    20
    0
    It's a line level input. I could try removing the caps. It's just weird that it's having an effect on one transmitters signal and not the other.

    The other thing I'm really struggling with is deciphering the 0s and 1s from the thermostat signal. The lengths of the highs and lows are really inconsistent. I have no idea how the thermostat receiver can work out what the message could be!! Could this also be to do with the caps? The lengths of the highs and lows of the "HELLO" test (top pic) are really clear.
     
  4. Alec_t

    AAC Fanatic!

    Sep 17, 2013
    5,789
    1,103
    Perhaps the thermostat transmitter 'wakes up' periodically to send its messages, and the wake-up brings up the supply voltage from zero gradually?
    Are you sure it's a digital signal? Looks to me like an FM signal?
     
    Last edited: Oct 24, 2014
  5. paulsoulsby

    Thread Starter New Member

    Jan 9, 2013
    20
    0
    The "Hello" test is definitely digital. The Virtual Wire library does it's own special encoding of the data. I can't work out exactly what it is (something possibly a bit like Manchester encoding), but the signal is definitely digital.
    The thermostat could literally be transmitting anything. The Google Groups info suggests that it should be plain digital serial data. This info could be wrong though. I'm expecting their Drayton system to work in the same way for my British Gas RC2, but it's not 100% guaranteed.
    I've tried storing the data from the thermostat transmitter recordings in memory and then reproducing it through my transmitter, but the Thermostat receiver doesn't recognise it. Even when the signal looks totally identical! I'm totally stumped!
     
  6. Alec_t

    AAC Fanatic!

    Sep 17, 2013
    5,789
    1,103
    Can you post a link to datasheets for your Tx and Rx?
    Rx AGC might be messing with the initial part of the waveform. Have a look at this?
     
    Last edited: Oct 25, 2014
  7. paulsoulsby

    Thread Starter New Member

    Jan 9, 2013
    20
    0
    Wow that link is PERFECT! I think that Worcester thermostat is yet another clone of my one. Exactly same LED display, features, enclosure etc. OK. Next thing I'll do is follow exactly what he did. I'll use his sound card o'scope setup which doesn't have caps, then see if I can capture the data in the same way. I'll let you know how I get on. Thanks!
    P.S. my transmitter/receiver is exactly same as his. It's a XY-MK-5V. Unfortunately no manufacturer or datasheet (that I can find).
     
  8. Alec_t

    AAC Fanatic!

    Sep 17, 2013
    5,789
    1,103
    Good luck. Keep us posted.
     
Loading...