     Serial.println(F("Change log mode."));
     if (payload[0] == '1') {
       logMode = true;
-    }
-    else {
+    } else {
       logMode = false;
     }
   }
   if (topic == (mainTopic + F("/ota/url"))) {
     otaURL = String(payload);
-    mqtt.publish((mainTopic+ F("/ota/nonce")).c_str(), otaAuth.nonce().c_str());
+    mqtt.publish((mainTopic + F("/ota/nonce")).c_str(),
+                 otaAuth.nonce().c_str());
   }
   if ((topic == (mainTopic + F("/ota/passwd"))) && (otaURL.length() > 7)) {
     if (otaAuth.verify(payload)) {

  while (!mqtt.connected()) {
    Serial.print(F("Attempting MQTT connection..."));
    // Attempt to connect
    if (mqtt.connect(mainTopic.c_str(), mqttUser, mqttPassword, mainTopic.c_str(), 0, true, "offline")) {
      Serial.println(F("connected"));
      mqtt.publish(mainTopic.c_str(), "online", true);
      mqtt.subscribe((mainTopic + F("/set/+")).c_str());

  setupWifi();
  mqtt.setServer(mqttBroker, 1883);
  mqtt.setCallback(mqttCallback);
  pinMode(RECEIVER_PIN,
          INPUT_PULLUP);  // 5V protection with reverse diode needs pullup
  rf.setCallback(rfCallback);
  rf.setPulseTrainCallBack(rfRawCallback);
  rf.initReceiver(RECEIVER_PIN);
