 #include <ESP8266WiFi.h>
 #include <ESP8266httpUpdate.h>
 
+#include <ESPiLight.h>
 #include <PubSubClient.h>
-#include <ESPiLight.h>
 
 #include "src/SHAauth/SHAauth.h"
 #include "src/Heartbeat/Heartbeat.h"

    mqtt.publish(topic.c_str(), message.c_str(), true);
  }
  if (logMode) {
    String topic = mainTopic + String(F("/log/")) + String(status) + String('/') + protocol;
    mqtt.publish(topic.c_str(), message.c_str());
  }
}

void rfRawCallback(const uint16_t* pulses, int length) {
  if (rawMode) {
    String data = rf.pulseTrainToString(pulses, length);
    if (data.length() > 0) {

    Serial.println(F("Change raw mode."));
    if (payload[0] == '1') {
      rawMode = true;
    } else {
      rawMode = false;
    }
  }
