 ESPiLight rf(TRANSMITTER_PIN);
 SHAauth otaAuth(myOTA_PASSWD);
 
-const String hostName = String("rfESP_")+String(ESP.getChipId(), HEX);;
+const String mainTopic = String("rfESP_")+String(ESP.getChipId(), HEX);;
 const String rfTopic = "rf434";
 boolean logMode = false;
 boolean rawMode = false;

      rawMode = false;
    }
  }
  if(topic == (hostName + "/set/log")) {
    Serial.println("Change log mode.");
    if (payload[0] == '1') {
      logMode = true;

  while (!mqtt.connected()) {
    Serial.print("Attempting MQTT connection...");
    // Attempt to connect
    if (mqtt.connect(mainTopic.c_str(), mainTopic.c_str(), 0, true, "offline")) {
      Serial.println("connected");
      mqtt.publish(mainTopic.c_str(), "online", true);
      mqtt.subscribe((mainTopic + "/set/+").c_str());
      mqtt.subscribe((mainTopic + "/ota/+").c_str());
      mqtt.subscribe((mainTopic + "/send/+").c_str());
      mqtt.subscribe((rfTopic + "/send/+").c_str());
    } else {
      Serial.print("failed, rc=");
