Tasmota über MQTT und Python steuern

Features:

  • Tasmota ein- und ausschalten
  • Status Werte von Tasmota abfragen
#Verbindung zum MQTT broker
Tasmota.connect(mqtt_broker, mqtt_port, mqtt_user, mqtt_password)
#Einschalten (bitte im Tasmota konfigurierten Topic Name verwenden)
Tasmota.on(topic_name)
#Ausschalten (bitte im Tasmota konfigurierten Topic Name verwenden)
Tasmota.off(topic_name)
#Status Information lesen (JSON in flache Struktur umgewandelt)
Tasmota.get(topic_name, "8", ["StatusSNS_SI7021_Temperature"])
Tasmota.get(topic_name, "8", ["StatusSNS_ENERGY_Power", "StatusSNS_ENERGY_Today"])

--

--

IT Architect

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store