 #define RELAY_OFF 0 // GPIO value to write to turn off attached relay
 #define PUSH_TIMEOUT 500 // Simulate push button on AC with a relay (milliseconds)
 
+// LDR SENSOR
+#define LDR_PIN A2
+
 // ----- TEMPERATURE SENSOR
 #define ONE_WIRE_BUS 3 // Pin where dallas sensor is connected 
 const float TEMPERATURE_DELTA = 0.2; // Change of temperature to notify
-const unsigned int READ_INTERVAL = 13; //READ Interval in seconds
+const unsigned int READ_INTERVAL = 3; //READ Interval in seconds
 const unsigned long SLEEP_TIME = READ_INTERVAL * 1000; // Sleep time between reads (in milliseconds)
 
 const unsigned int MAX_ITERATION = (60 / READ_INTERVAL) * 3; // 3 minutes
 unsigned int iteration = 0;
 
+// Initialize message LDR
+MyMessage msgLDR(CHILD_ID_LDR, V_LEVEL);
+
 // Initialize temperature message
 MyMessage msgTemperature(CHILD_ID_TEMP, V_TEMP);
+
+// Initialize RELAY message
+MyMessage msgRelay(CHILD_ID_RELAY, V_LIGHT);
 
 OneWire oneWire(ONE_WIRE_BUS);
 DallasTemperature temperatureSensor(&oneWire);

}

void incomingMessage(const MyMessage &message) {
  processHeatingMessage(message);
  processACMessage(message);
  processModeMessage(message);
}

void processHeatingMessage(const MyMessage &message) {

  if ((iteration == 0) || temperatureChanged(lastTemperature, temperature)) {
    debug(PSTR("Send temperature %s\n"), dtostrf(temperature, 2, 1, outstr));
    lastTemperature= temperature;
    sendValue(msgTemperature.set(temperature, 1));
  }
}


void sendLDRStatus(uint8_t value) {
   if ((iteration == 0) || (lastLDR - value) != 0) {
    debug(PSTR("Send LDR value %s\n"), dtostrf(value, 2, 1, outstr));
    lastLDR= value;
    sendValue(msgLDR.set(value, 1));
   }   
}

uint8_t sendValue(MyMessage &msg)
