 const char* clientName = secret_clientName; // Client to report to MQTT
 const char* mqtt_username = secret_mqtt_username; // MQTT Username
 const char* mqtt_password = secret_mqtt_password; // MQTT Password
-boolean willRetain = true; // MQTT Last Will and Testament
+bool willRetain = true; // MQTT Last Will and Testament
 const char* willMessage = "offline"; // MQTT Last Will and Testament Message
 const int json_buffer_size = 256;
 

  // Check the status and do actions
  checkState();
  // Publish MQTT
  mqttPublishData(false);
  //Call on the background functions to allow them to do their thing.
  yield();
  // Check for Over The Air updates

  }
}

// MQTT Publish with normal or immediate option.
void mqttPublishData(bool ignorePublishInterval) {
  // Only run when publishInterval in milliseonds expires or ignorePublishInterval == true
  unsigned long currentMillis = millis();
  if (currentMillis - previousMillis >= publishInterval || ignorePublishInterval == true) {
    previousMillis = currentMillis; // Save the last time this ran
    // Check conenction to MQTT server
    if (mqttClient.connected()) {
      // Publish node state data
      publishNodeState();

      // JSON data method
      StaticJsonBuffer<json_buffer_size> jsonBuffer;
      JsonObject& root = jsonBuffer.createObject();
      // INFO: the data must be converted into a string; a problem occurs when using floats...
