     Serial.println(dimmerParams.Level);
     Serial.print(F("  Value: "));
     Serial.println(dimmerParams.nvalue);
+#endif
+    
     setOutput(dimmerParams.Color_r, dimmerParams.Color_g, dimmerParams.Color_b, (!dimmerParams.nvalue)?0:dimmerParams.Level);
+    
+#ifdef DEBUG    
     Serial.println(F("Releasing resources..."));
+#endif    
+
     freeDomoticzRGBDimmer(&dimmerParams);
+
+#ifdef DEBUG    
     Serial.print(F("Resources released. Fragmentation [%]: "));
+#endif    
+
     fragPercent = ESP.getHeapFragmentation();
+
+#ifdef DEBUG    
     Serial.println(fragPercent);
+#endif
+    
     if (fragPercent > 80) {
       Serial.println(F("Fragmentation is too high! Rebooting..."));
       ESP.reset();

#include <ArduinoJson.h>          //https://github.com/bblanchon/ArduinoJson
#include <PubSubClient.h>
#include <strings.h>

#include "DomoticzRGBDimmer.h"

/*
 * TODO: PWM value storage
 *   - store the values into EEPROM before OFF state
*/ 

/* Program states and the current state */


    int fragPercent = 0;
    
    DomoticzRGBDimmer dimmerParams = parseDomoticzRGBDimmer((const char*)payload);
#ifdef DEBUG    
    Serial.println(F("Payload target is this device. Processing payload..."));
    Serial.println(F("Setting PWM levels to: "));
    Serial.print(F("  R:     "));
    Serial.println(dimmerParams.Color_r);
