 #define BLYNK_CLOUD                 // Comment to totally ignore Blynk Cloud
 // #define BLYNK_NOTIFY_TEMP           // Uncomment to send Blynk push notifications
 #define BLYNK_SIGNAL_TEMP           // Uncomment to use Blynk LED signalling
+
+#define MQTT_CLOUD                  // Comment to totally ignore MQTT broker
+#define MQTT_PUBLISH                // Uncomment to enable publishing to MQTT topics
+#define MQTT_SUBSCRIBE              // Uncomment to enable subscribing to MQTT topics
+
 
 // Libraries
 #include "watchdogs/watchdogs.h"

    }
}

//-------------------------------------------------------------------------
// Publishing to Particle
//-------------------------------------------------------------------------
#ifdef PARTICLE_CLOUD
void publishParticle()
{
    static unsigned long timeStamp;

#endif


#ifdef MQTT_CLOUD
//-------------------------------------------------------------------------
// MQTT configuration
//-------------------------------------------------------------------------
const unsigned int PERIOD_PUBLISH_MQTT = 2000;
byte MQTT_BROKER_IP[] = {192, 168, 0, 9};
const unsigned int MQTT_BROKER_PORT = 1883;

const String MQTT_PREFIX_DEVICE = String("Chalupa/Interior/"); 

const String MQTT_VAR_RESET = String("Reset");
const String MQTT_VAR_GET = String("Get");
const String MQTT_VAR_INITIALS = String("Initials");
const String MQTT_VAR_STATISTICS = String("Statistics");

const String MQTT_VAR_VALUE = String("Value");
const String MQTT_VAR_MINIMUM = String("Minimum");
const String MQTT_VAR_MAXIMUM = String("Maximum");
const String MQTT_VAR_DIFF = String("Diff");
const String MQTT_VAR_STATUS = String("Status");

#ifdef MQTT_PUBLISH
const String MQTT_TOPIC_PUB_STATUS = String(MQTT_PREFIX_DEVICE + MQTT_VAR_STATUS);

const String MQTT_TOPIC_PUB_RSSI = String(MQTT_PREFIX_DEVICE + "RSSI");

const String MQTT_TOPIC_PUB_TEMP = String(MQTT_PREFIX_DEVICE + "Temperature/");
const String MQTT_TOPIC_PUB_TEMP_VALUE   = String(MQTT_TOPIC_PUB_TEMP + MQTT_VAR_VALUE);
const String MQTT_TOPIC_PUB_TEMP_STATUS  = String(MQTT_TOPIC_PUB_TEMP + MQTT_VAR_STATUS);
const String MQTT_TOPIC_PUB_TEMP_DIFF    = String(MQTT_TOPIC_PUB_TEMP + MQTT_VAR_DIFF);
const String MQTT_TOPIC_PUB_TEMP_MINIMUM = String(MQTT_TOPIC_PUB_TEMP + MQTT_VAR_MINIMUM);
const String MQTT_TOPIC_PUB_TEMP_MAXIMUM = String(MQTT_TOPIC_PUB_TEMP + MQTT_VAR_MAXIMUM);
#endif

#ifdef MQTT_SUBSCRIBE
const String MQTT_TOPIC_SUB_RESET = String(MQTT_PREFIX_DEVICE + MQTT_VAR_RESET);
const String MQTT_TOPIC_SUB_GET = String(MQTT_PREFIX_DEVICE + MQTT_VAR_GET);
#endif

MQTT MqttClient(MQTT_BROKER_IP, MQTT_BROKER_PORT, subscriptionMqtt);
#endif


//-------------------------------------------------------------------------
// SETUP
//-------------------------------------------------------------------------
