Read data from wireless thermostat

I am trying to read the data sent from a Tower wireless thermostat.
I have taken out the 433mhz transmitter and connected to my logic analyser and get all the highs and lows, I have also connected the data and ground pin to serial in and ground on a Arduino mega and tried literally 100s of sketches trying to read the data string. I have tried each sketch at every baud rate and all I get is junk.
My goal is to replace the receiver half with a 12v relay and attiny85 and use HC-05s in place of the 433mhz modules, all I am missing is the data string the thermostat sends for on and off. I can send the commands for ON OFf from my windows phone with an app but these do not match the commands the thermostat sends.
Any pointers to a sketch that will decode the data that is sent every 20 seconds from the thermostat.
Thanks in advance

Reverse engineering a wireless thermostat | Scraplab maybe?

I use the techniques described in the following link to decode wireless sensors. The serial port is useless for this.

http://rayshobby.net/reverse-engineer-wireless-temperature-humidity-rain-sensors-part-1/

Well I never thought it was PWM or PPM! But sure enough exact same wave form
I can now with the help of a Uno and 433mhz transmitter send the data to turn the unit ON or OFF
What I want to do now, is use an Uno and 433mhz receiver to receive the commands from the LCD controller (head unit) to turn an LED ON or OFF.
Are there any ideas how to read the received data string ?

So using the code below, (@tom Taylor) I can turn the boiler on and off.
The issue I now have is getting the other half to work, where do I start receiving the data ?
Serial read will not work as it is transmitted in PPM format, all the PPM and PWM logging sketches do not appear to register anything accurate when the signal is sent.
I had hoped received data would represent something like 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1, 0, 1, 0, 1, 1, 1, 1, 0, 0 but all I receive is numbers ranging from 0 to 7000ish
Please help

#define transmitPin 4 // Digital Pin 4
 
// on
bool data[] = {
  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  1, 0, 1, 0, 1, 1, 1, 1, 0, 0
};
 
// off
//bool data[] = {
//  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
//  0, 0, 0, 0, 0, 0, 0, 0, 0, 0
//};
 
int shortDelay = 250;
int longDelay = 500;
int preambleDelay = 1000;
 
void setup() {
  Serial.begin(9600);
  pinMode(transmitPin, OUTPUT);
  delay(3000);
}
 
void loop() {
  sendPreamble();
  sendData();
  sendPreamble();
  sendData();
  delay(30000);
}
 
void sendPreamble() {
  for (int i = 0; i < 4; i++) {
    digitalWrite(transmitPin, HIGH);
    delayMicroseconds(preambleDelay);
    digitalWrite(transmitPin, LOW);
    delayMicroseconds(preambleDelay);
  }
}
 
void sendData() {
  for (int i = 0; i < sizeof(data); i++) {
    bool b = data[i];
    if (b == 1) {
      digitalWrite(transmitPin, HIGH);
      delayMicroseconds(longDelay);
      digitalWrite(transmitPin, LOW);
      delayMicroseconds(shortDelay);
    } else {
      digitalWrite(transmitPin, HIGH);
      delayMicroseconds(shortDelay);
      digitalWrite(transmitPin, LOW);
      delayMicroseconds(longDelay);
    }
  }
}