     case IDLE :
     {
       // Do nothing and check the following state
-      if (tReadTime.residualTime(READ_SENSOR_PERIOD) == 0)
+      if (tReadTime.residualTime(tRead /*READ_SENSOR_PERIOD*/) == 0)
       {
         state = READ_SENSORS;
       }
-      else if (tNtpUpdateTime.residualTime(UPDATE_TIME_PERIOD) == 0)
+      else if (tNtpUpdateTime.residualTime(tNtpUpdate/*UPDATE_TIME_PERIOD*/) == 0)
       {
         state = NTPUPDATE;
       }
       MTTQClient.loop();
-      
+#ifdef CONFIGURATION      
+      if ( checkNewConfig() )
+      {
+        updateConfig();
+        loadConfig();
+      }
+#endif
+
     } break;
     
     default : 

#ifdef WIFI

//! Wireless network SSID (name)
//! Wireless network SSID (name)
const char w_ssid[] PROGMEM = WIRELESS_SSID;

//! Wireless network password

 *                     to use standard SDP JSON. 
 *                      to use standard SDP JSON. 
 * CONFIGURATION      : change configuration runtime receiving the new one from the broker
 *                      MQTT (work in progress)
 ******************************************************************************************/
//! Global macro value to define if network connection is cable or Wi-Fi
#define WIFI 1
