es funktioniert ja jetz alles , nur ich hab ne Verständniss Frage irgentwas verstehe ich nicht. Wenn ich Openhab neustarte bekommen meine Schalter mit Tasmota kein Status .Erst wenn ich einmal schalte dann ist alles ok, oder wenn ich Tasmota Gerät neustarte andere Werte sind gleich da.
Wenn Tasmotaschalter länger online ist steht in der Konsole nur tele/STATE und tele/SENSOR, der stat/POWER ,mein stateTopic= wird nur bei neustart oder beim einschalten gesendet.
was kann ich einstelle das nach dem openHab neustart die Schalter gleich den richtigen status bekommen?
Das war beim MQTT1 nicht so ,da hatte ich gleich den richtigen Status
mein Thing
Code: Alles auswählen
Thing topic Sonoffth16 "Sonoffth16 Licht Terasse"(mqtt:broker:mosquitto) @ "MQTT" {
Channels:
Type switch : switch "Sonoffth16 Switch"
[stateTopic="Draussen/sonoffth16/stat/POWER",commandTopic="Draussen/sonoffth16/cmnd/POWER",ON="ON",OFF="OFF"]
Type string : wifi-rssi "Sonoffth16 RSSI"
[stateTopic="Draussen/sonoffth16/tele/STATE",transformationPattern="JSONPATH:$.Wifi.RSSI"]
Type string : devicestate"Sonoffth16 State"
[stateTopic="Draussen/sonoffth16/tele/LWT"]
Type number : temperature "Temperature SI7021 "
[stateTopic="Draussen/sonoffth16/tele/SENSOR", transformationPattern="JSONPATH:$.SI7021.Temperature"]
Type number : humidity "Humidity"
[stateTopic="Draussen/sonoffth16/tele/SENSOR", transformationPattern="JSONPATH:$.SI7021.Humidity"]
Code: Alles auswählen
Switch Sonoffth16 "Licht Terasse"<lightbulb> (GR_Lichtdr,GR_Lichtdr1) {channel="mqtt:topic:mosquitto:Sonoff3:switch"}
String Sonoffth16_WifiRssi "Licht Terasse RSSI [%d %%] "<network> {channel="mqtt:topic:mosquitto:Sonoffth16:wifi-rssi"}
String Sonoffth16_DeviceState "Sonoffth16 State"<qualityofservice> {channel="mqtt:topic:mosquitto:Sonoffth16:devicestate"}
Number Sonoffth16_Temperature "Temperature Terasse[%d °C]" <temperature> { channel="mqtt:topic:mosquitto:Sonoffth16:temperature" }
Number Sonoffth16_Humidity "Humidity Terasse [%d %%]" <humidity> { channel="mqtt:topic:mosquitto:Sonoffth16:humidity" }
Code: Alles auswählen
Switch item=Sonoffth16
Text item=Sonoffth16_WifiRssi
Text item=Sonoffth16_DeviceState valuecolor=[Offline="red",undefined="orange",Online="green"]
Text item=Sonoffth16_Temperature valuecolor=[<=21="blue", >21="green"]
Text item=Sonoffth16_Humidity valuecolor=[<=60="green", >60="red"]