MQTT Thing online obwohl offline
Verfasst: 4. Okt 2020 20:37
Hallo zusammen,
ich beschäftige mich seit kurzem mit MQTT. Ich habe ein paar Steckdosen von Gosund eingebunden. Das funktioniert auch soweit. Leider werden die Steckdosen "things" im Paper UI immer als online angezeigt, obwohl diese ausgesteckt (also stromlos) sind.
Hier ist meine Konfiguration.
Mqtt.things:
ich beschäftige mich seit kurzem mit MQTT. Ich habe ein paar Steckdosen von Gosund eingebunden. Das funktioniert auch soweit. Leider werden die Steckdosen "things" im Paper UI immer als online angezeigt, obwohl diese ausgesteckt (also stromlos) sind.
Hier ist meine Konfiguration.
Mqtt.things:
Code: Alles auswählen
Bridge mqtt:broker:Mosquitto "Mosquitto" @ "mqtt" [
host="192.168.2.202", // anpassen
port=1883,
clientID="openhab",
username="openhabian",
password="openhabian"
] {
Thing topic Steckdose1 "Steckdose 1" @ "mqtt" {
Channels:
Type switch : PowerSwitch "Steckdose 1 Schalten" [ stateTopic="stat/Steckdose1/POWER" , transformationPattern="JSONPATH:$.POWER" , commandTopic="cmnd/Steckdose1/POWER", on="ON", off="OFF" ]
Type string : SSID "WLAN SSID" [ stateTopic= "tele/Steckdose1/STATE", transformationPattern="JSONPATH:$.Wifi.SSId" ]
Type number : RSSI "WLAN Signalstärke" [ stateTopic= "tele/Steckdose1/STATE", transformationPattern="JSONPATH:$.Wifi.RSSI" ]
Type string : Uptime "Uptime" [ stateTopic= "tele/Steckdose1/STATE", transformationPattern="JSONPATH:$.Uptime" ]
Type number : EnergyTotal "Energie in kwH" [ stateTopic= "tele/Steckdose1/SENSOR", transformationPattern="JSONPATH:$.ENERGY.Total" ]
Type number : Voltage "Spannung in V" [ stateTopic= "tele/Steckdose1/SENSOR", transformationPattern="JSONPATH:$.ENERGY.Voltage" ]
}