Da ich nur noch Tasmota flashe, weiss ich nicht mehr genau, wie ESPEasy da tickt, aber könnte es sein, dass das Problem an der Switch-Definition liegt.
Lass mal das "GPIO,14, 0" und "GPIO,14, 1" weg. In diesem Zusammenhang wäre auch noch deine Item-Definition interressant.
Zum Vergleich mal ein Thing von einem ESP32 in Code-Syntax:
Code: Alles auswählen
UID: mqtt:topic:vera:esp3201
label: ESP32 01
thingTypeUID: mqtt:topic
configuration: {}
bridgeUID: mqtt:broker:vera
location: MQTT2
channels:
- id: relay1
channelTypeUID: mqtt:switch
label: Relay 1
description: null
configuration:
retained: false
postCommand: false
formatBeforePublish: "%s"
commandTopic: cmnd/esp32_01/POWER1
stateTopic: stat/esp32_01/POWER1
off: "0"
on: "1"
- id: relay2
channelTypeUID: mqtt:switch
label: Relay 2
description: null
configuration:
retained: false
postCommand: false
formatBeforePublish: "%s"
commandTopic: cmnd/esp32_01/POWER2
stateTopic: stat/esp32_01/POWER2
off: "0"
on: "1"
- id: relay3
channelTypeUID: mqtt:switch
label: Relay 3
description: null
configuration:
retained: false
postCommand: false
formatBeforePublish: "%s"
commandTopic: cmnd/esp32_01/POWER3
stateTopic: stat/esp32_01/POWER3
off: "0"
on: "1"
- id: relay4
channelTypeUID: mqtt:switch
label: Relay 4
description: null
configuration:
retained: false
postCommand: false
formatBeforePublish: "%s"
commandTopic: cmnd/esp32_01/POWER4
stateTopic: stat/esp32_01/POWER4
off: "0"
on: "1"
- id: relay5
channelTypeUID: mqtt:switch
label: Relay 5
description: null
configuration:
retained: false
postCommand: false
formatBeforePublish: "%s"
commandTopic: cmnd/esp32_01/POWER5
stateTopic: stat/esp32_01/POWER5
off: "0"
on: "1"
- id: rssi
channelTypeUID: mqtt:number
label: WiFi Signal Strength
description: null
configuration:
retained: false
postCommand: false
step: 1
formatBeforePublish: "%s"
stateTopic: tele/esp32_01/STATE
transformationPattern: JSONPATH:$.Wifi.RSSI
- id: version
channelTypeUID: mqtt:string
label: "Firmware Version "
description: null
configuration:
retained: false
postCommand: false
formatBeforePublish: "%s"
stateTopic: stat/esp32_01/STATUS2
transformationPattern: JSONPATH:$.StatusFWR.Version
- id: reachable
channelTypeUID: mqtt:switch
label: Reachable
description: null
configuration:
retained: false
postCommand: false
formatBeforePublish: "%s"
stateTopic: tele/esp32_01/LWT
transformationPattern: MAP:reachable.map
off: "0"
on: "1"
- id: hardware
channelTypeUID: mqtt:string
label: "Chip Set "
description: null
configuration:
retained: false
postCommand: false
formatBeforePublish: "%s"
stateTopic: stat/esp32_01/STATUS2
transformationPattern: JSONPATH:$.StatusFWR.Hardware
- id: ipaddress
channelTypeUID: mqtt:string
label: "IP Address "
description: null
configuration:
retained: false
postCommand: false
formatBeforePublish: "%s"
stateTopic: stat/esp32_01/STATUS5
transformationPattern: JSONPATH:$.StatusNET.IPAddress
- id: ssid
channelTypeUID: mqtt:string
label: WiFi
description: null
configuration:
retained: false
postCommand: false
formatBeforePublish: "%s"
stateTopic: tele/esp32_01/STATE
transformationPattern: JSONPATH:$.Wifi.SSId
- id: temp
channelTypeUID: mqtt:number
label: Temp. DHT11 ESP32 01
description: null
configuration:
retained: false
postCommand: false
step: 1
formatBeforePublish: "%s"
stateTopic: tele/esp32_01/SENSOR
transformationPattern: JSONPATH:$.DHT11.Temperature
- id: hum
channelTypeUID: mqtt:number
label: Hum. DHT11 ESP32 01
description: null
configuration:
retained: false
postCommand: false
step: 1
formatBeforePublish: "%s"
stateTopic: tele/esp32_01/SENSOR
transformationPattern: JSONPATH:$.DHT11.Humidity
- id: dew
channelTypeUID: mqtt:number
label: Tau. DHT11 ESP32 01
description: null
configuration:
retained: false
postCommand: false
step: 1
formatBeforePublish: "%s"
stateTopic: tele/esp32_01/SENSOR
transformationPattern: JSONPATH:$.DHT11.DewPoint
- id: smoke1
channelTypeUID: mqtt:number
label: Gas Sensor ESP32 01
description: null
configuration:
retained: false
postCommand: false
step: 1
formatBeforePublish: "%s"
bzw. das Gleiche in Textform, da ich noch mit Text-Dateien "spiele"
.things:
Code: Alles auswählen
Thing mqtt:topic:vera:esp3201 "ESP32 01" (mqtt:broker:vera ) @ "MQTT2" {
Channels:
Type switch : relay1 "Relay 1" [ stateTopic="stat/esp32_01/POWER1", commandTopic="cmnd/esp32_01/POWER1" ]
Type switch : relay2 "Relay 2" [ stateTopic="stat/esp32_01/POWER2", commandTopic="cmnd/esp32_01/POWER2" ]
Type switch : relay3 "Relay 3" [ stateTopic="stat/esp32_01/POWER3", commandTopic="cmnd/esp32_01/POWER3" ]
Type switch : relay4 "Relay 4" [ stateTopic="stat/esp32_01/POWER4", commandTopic="cmnd/esp32_01/POWER4" ]
Type switch : relay5 "Relay 5" [ stateTopic="stat/esp32_01/POWER5", commandTopic="cmnd/esp32_01/POWER5" ]
Type number : rssi "WiFi Signal Strength" [ stateTopic="tele/esp32_01/STATE", transformationPattern="JSONPATH:$.Wifi.RSSI"]
Type string : version "Firmware Version " [ stateTopic="stat/esp32_01/STATUS2", transformationPattern="JSONPATH:$.StatusFWR.Version"]
Type switch : reachable "Reachable" [ stateTopic="tele/esp32_01/LWT", transformationPattern="MAP:reachable.map" ]
Type string : hardware "Chip Set " [ stateTopic="stat/esp32_01/STATUS2", transformationPattern="JSONPATH:$.StatusFWR.Hardware"]
Type string : ipaddress "IP Address " [ stateTopic="stat/esp32_01/STATUS5", transformationPattern="JSONPATH:$.StatusNET.IPAddress"]
Type string : ssid "WiFi" [ stateTopic="tele/esp32_01/STATE", transformationPattern="JSONPATH:$.Wifi.SSId"]
Type number : temp "Temp. DHT11 ESP32 01" [ stateTopic="tele/esp32_01/SENSOR", transformationPattern="JSONPATH:$.DHT11.Temperature"]
Type number : hum "Hum. DHT11 ESP32 01" [ stateTopic="tele/esp32_01/SENSOR", transformationPattern="JSONPATH:$.DHT11.Humidity"]
Type number : dew "Tau. DHT11 ESP32 01" [ stateTopic="tele/esp32_01/SENSOR", transformationPattern="JSONPATH:$.DHT11.DewPoint"]
Type number : smoke1 "Gas Sensor ESP32 01" [ stateTopic="tele/esp32_01/SENSOR", transformationPattern="JSONPATH:$.ANALOG.A1"]
}
Ich gehe auch davon aus, dass du "JSONPath Transformation" installiert hast. Aber soweit ich mich noch erinnern kann liefert ESPEasy direkte Werte und keine JSON-Strings, die noch aufgelöst werden müssen.