Hier mal die Konfiguration meines TH16.
.things (Ausschnitt)
Code: Alles auswählen
//Gruppe TH10/16 Monitoring WiFi Smart Switch
Thing topic TH1601 "Sonoff TH16 01" @ "MQTT2" {
Channels:
Type switch : power "Power " [ stateTopic="stat/th16_01/POWER", commandTopic="cmnd/th16_01/POWER" ]
Type number : rssi "WiFi Signal Strength" [ stateTopic="tele/th16_01/STATE", transformationPattern="JSONPATH:$.Wifi.RSSI"]
Type string : version "Firmware Version" [ stateTopic="stat/th16_01/STATUS2", transformationPattern="JSONPATH:$.StatusFWR.Version"]
Type switch : reachable "Reachable" [ stateTopic="tele/th16_01/LWT", transformationPattern="MAP:reachable.map" ]
Type number : temperature "Temperature" [ stateTopic="tele/th16_01/SENSOR", transformationPattern="JSONPATH:$.AM2301.Temperature"]
Type number : humidity "Humidity" [ stateTopic="tele/th16_01/SENSOR", transformationPattern="JSONPATH:$.AM2301.Humidity"]
Type string : ssid "WiFi" [ stateTopic="tele/th16_01/STATE", transformationPattern="JSONPATH:$.Wifi.SSId"]
Type datetime : time "Time" [ stateTopic="tele/th16_01/STATE", transformationPattern="JSONPATH:$.Time"]
Type string : hardware "Chip Set " [ stateTopic="stat/th16_01/STATUS2", transformationPattern="JSONPATH:$.StatusFWR.Hardware"]
Type string : ipaddress "IP Address " [ stateTopic="stat/th16_01/STATUS5", transformationPattern="JSONPATH:$.StatusNET.IPAddress"]
}
Code: Alles auswählen
//**********************************************************************************************************************************************************************************************************************
//Gruppe TH10/16 Sensoren
//**********************************************************************************************************************************************************************************************************************
//192.168.178.xxx Steckdosenleiste/Power Strip TH16
Switch Sonoff_PowerStrip_01 "Steckdosenleiste 1 [MAP(de.map):%s]" <poweroutlet> (EG_Kind1,gPlugSwitch,gSonoff) { channel="mqtt:topic:hans:TH1601:power"}
Number Sonoff_PowerStrip_01_RSSI "Steckdosenleiste 1 RSSI [%s]" <qualityofservice> (EG_Kind1,gRSSI) { channel="mqtt:topic:hans:TH1601:rssi" }
String Sonoff_PowerStrip_01_Version "Steckdosenleiste 1 Version 63[%s]" <sonoff_pow> (gSonoffs,gVer) { channel="mqtt:topic:hans:TH1601:version" }
Switch Sonoff_PowerStrip_01_Unreach "Steckdosenleiste 1 Erreichbarkeit [%s]" <siren1> (EG_Kind1,gLWT) { channel="mqtt:topic:hans:TH1601:reachable" }
// For Fun and Test
String Sonoff_PowerStrip_01_Hardware "Steckdosenleiste 1 Hardware 63[%s]" <sonoff_pow> (gSonoffs,gHard) { channel="mqtt:topic:hans:TH1601:hardware" }
String Sonoff_PowerStrip_01_IPAddress "Steckdosenleiste 1 IP-Address [%s]" <sonoff_pow> (gSonoffs,gHard) { channel="mqtt:topic:hans:TH1601:ipaddress" }
Number Sonoff_PowerStrip_01_Temp "Steckdosenleiste 1 Temperatur[%.1f °C]" <temperature> (gSonoffs,EG_Kind1,gRtIstI) { channel="mqtt:topic:hans:TH1601:temperature"}
Number Sonoff_PowerStrip_01_Hum "Steckdosenleiste 1 Luftfeuchtigkeit[%.2f %%]" <humidity> (gSonoffs,EG_Kind1) { channel="mqtt:topic:hans:TH1601:humidity" }
String Sonoff_PowerStrip_01_SSID "Steckdosenleiste 1 Wlan [%s]" <chart> (gSonoffs) { channel="mqtt:topic:hans:TH1601:ssid" }
DateTime Sonoff_PowerStrip_01_Date "Steckdosenleiste 1 Refresh [ %1$tH:%1$tM]" <time> (gSonoffs) { channel="mqtt:topic:hans:TH1601:time" }
//**********************************************************************************************************************************************************************************************************************
Gerade fällt mir noch auf, dass ich das Mapping im Label mache und du keinen "Formatter ( [%s]) in deinem Label hast. Vielleicht probierst du das mit dem Formatter/Pattern (auch ohne Mapping) auch einmal aus.