 void delayTimers() {
   delay_400ms.start(400, AsyncDelay::MILLIS);
   delay_30s.start(30000, AsyncDelay::MILLIS);
-}
+  delay_5s.start(5000, AsyncDelay::MILLIS);
+}
+
 void  publishStates() {
   for (int thisPin = 0; thisPin < pinCount; thisPin++) {
     char* state = relayStates[thisPin] == HIGH ? "0" : "1";

int value = 0;
AsyncDelay delay_400ms;
AsyncDelay delay_30s;

//MutuallyExclude the 'on' state between pairs of relays (for shutter to prevent up and down at the same time)
//ask R1 to turn on while R2 = on -> turns off R2 first (and broadcasts 'domogik/in/relay/r2 0')

    reconnect();
  }

  if (delay_5s.isExpired()) {
    int analogSensor = analogRead(SMOKE_PIN);
    char bufferSensor[6];
    sprintf(bufferSensor, "%d", analogSensor);
    client.publish("domogik/smoke", bufferSensor);
    delay_5s.repeat();
  }


  if (delay_400ms.isExpired()) {
    setStates();
    delay_400ms.repeat();
