 char subscribeTopic[ ] = MQTT_SUBSCRIBE_TOPIC; // Arduino will listen this topic for incoming MQTT messages from the Domoticz. The MQTT_SUBSCRIBE_TOPIC is defined in Arduino_Cottage_Monitoring_System.h header file
 
 //MQTT variables
-String topicID = MQTT_TOPIC; // MQTT topic used in data transmission to the Domoticz. The MQTT_TOPIC is defined in Arduino_Cottage_Monitoring_System.h header file
+//String topicID = MQTT_TOPIC; // MQTT topic used in data transmission to the Domoticz. The MQTT_TOPIC is defined in Arduino_Cottage_Monitoring_System.h header file
 int temperatureSensordtype = 80; // dtype (device type for temperature sensor) is used to help creating MQTT payload
 int switchdtype = 32; // dtype (device type for door switches and siren) is used to help creating MQTT payload
 const int temperatureSensorIDX = 18; // IDX number of temperature sensor

		Serial.println();
	}
	else
		Serial.println(F("Publishing to MQTT broker failed..."));
}

// mqttCallback function handles message arrived on subscribed MQTT topic(s)
void mqttCallback(char* topic, byte* payload, unsigned int length) {

  Serial.println("MQTT callback received");

  //Create a String from the received payload (char array)
  String callBackPayload = "";
  int i;

  for (i = 0; i < length; i++)
	{
		//Serial.print((char)payload[i]);
		callBackPayload += (char)payload[i];
	}

  // Act according to received payload
  if (callBackPayload == "On") // Siren to be set On
  {
	  Serial.println(F("Siren turned On"));
	  digitalWrite(sirenPin, HIGH);
	  Alarm.timerOnce(sirenWatchDogTimer, sirenOffFunction); // Timer is set which will turn off siren after sirenWatchDogTimer period has elapsed
  }
  else if (callBackPayload == "Off" && digitalRead(sirenPin) == LOW) // No actions needed if siren is already off
  {
	  Serial.println(F("Siren is already off. No actions needed!"));
  }
  else if (callBackPayload == "Off") // Siren to be set Off
    {
  	  sirenOffFunction();
    }
  else // Not valid state. No actions to be taken
  {
	  Serial.print(F("Following not valid data received. No actions to be taken:"));
	  Serial.println(callBackPayload);
  }
}


    }

	//Publish payload to MQTT broker
	if (mqttClient.publish(MQTT_TOPIC, msg))
	{
		Serial.print("Following data published to MQTT broker: ");
		Serial.print(topic);
