 }
 
 void incomingMessage(const MyMessage &message) {
+  processHeatingMessage(message);
+  processACMessage(message);
+}
+
+void processHeatingMessage(const MyMessage &message) {
   // We only expect one type of message from controller. But we better check anyway.
-  if (message.type == V_LIGHT) {
+  if (message.sensor == CHILD_ID_RELAY && message.type == V_LIGHT) {
     // Change relay state
     digitalWrite(RELAY_PIN, message.getBool() ? RELAY_ON : RELAY_OFF);
     // Store state in eeprom

  }
}



#include <UIPServer.h>
#include <UIPEthernet.h>
#include <ethernet_comp.h>
#include <UIPClient.h>
#include <Dhcp.h>
#include <UIPUdp.h>
#include <Dns.h>


#include <MySensor.h>
#undef DEBUG
