     }
   }
 
-  if (millis() - last_temp_millis > 5000) {
+  // Update temperature every TMP_INTER minutes
+  if (millis() - last_temp_millis > TMP_INTER*60000) {
     updateTemperature();
   }
 }

#include "Adafruit_MQTT.h"
#include "Adafruit_MQTT_Client.h"

#define WLAN_SSID   "FRITZ!Box 7272"
#define WLAN_PASS   "Aezakmi123!"

#define SERVER      "minibian"
#define SERVERPORT  1883

#define LED         4
#define DS18B20     5 // Dallas DS18B20 digital thermometer

// Setup a oneWire instance to communicate with any OneWire devices (not just Maxim/Dallas temperature ICs)
OneWire oneWire(DS18B20);


  // Setup MQTT subscription for onoff feed.
  mqtt.subscribe(&onoffsw);

  // Initial temperature reading
  updateTemperature();
}

