Hi Dirk,
would be great if you can share your rule File.
I also still edit my whole configuration in the files.
So far everything works with the ESP32 at the AirCon and openhab/mqtt. Thanks for your Picture from the breadboard.
My Issue right now is, that I have understood JsonPath as a two way Path to get and push the Data transformed to and from my items. That is where I am stuck right now if I want to keep the rules in the file version. I have successfully implemented the javascript ruleset via the Openhab GUI which i do not like to have an mix of GUI and file configuration.
My Things file:
Bridge mqtt:broker:openhab [host="192.168.1.10",secure="OFF"]{
Thing topic acsalon {
Channels:
Type number : acsalon_mode "AC Salon Modus" [stateTopic="esp32/acsalon/state", commandTopic="esp32/acsalon/POURRI", transformationPattern="JSONPATH:$.[0]conf.mode"]
Type number : acsalon_temperature "AC Salon Temperature" [stateTopic="esp32/acsalon/state", commandTopic="esp32/acsalon/POURRI", transformationPattern="JSONPATH:$.[0]conf.soll"]
Type switch : acsalon_onoff "AC Salon ON Off" [stateTopic="esp32/acsalon/state", commandTopic="esp32/acsalon/com", on="true", off="false", transformationPattern="JSONPATH:$.[0]conf.on" ]
Type switch : acsalon_eco "AC Salon ECO" [stateTopic="esp32/acsalon/state", commandTopic="esp32/acsalon/POURRI", on="true", off="false", transformationPattern="JSONPATH:$.[0]conf.eco" ]
Type switch : acsalon_turbo "AC Salon Turbo" [stateTopic="esp32/acsalon/state", commandTopic="esp32/acsalon/POURRI", on="true", off="false", transformationPattern="JSONPATH:$.[0]conf.turbo" ]
Type string : acsalon_fan "Ac Salon FAN" [stateTopic="esp32/acsalon/state", commandTopic="esp32/acsalon/POURRI", transformationPattern="JSONPATH:$.[0]conf.fan"]
Type switch : acsalon_lamelle "AC Salon LAMELLE" [stateTopic="esp32/acsalon/state", commandTopic="esp32/acsalon/POURRI", on="true", off="false", transformationPattern="JSONPATH:$.[0]conf.lamelle"]
Type number : acsalon_temperature_ist "AC Salon Temperature IST" [stateTopic="esp32/acsalon/state", commandTopic="esp32/acsalon/POURRI", transformationPattern="JSONPATH:$.[0].ist"]
Type number : acsalon_temperature_aussen "AC Salon Temperature Außen" [stateTopic="esp32/acsalon/state", commandTopic="esp32/acsalon/POURRI", transformationPattern="JSONPATH:$.[0].aussen"]
}
}
My Items file
Number klima_eg_modus "Klima EG Modus" { channel="mqtt:topic:openhab:acsalon:acsalon_mode" }
Number klima_eg_soll_temperatur "Klima EG Solltemperatur" { channel="mqtt:topic:openhab:acsalon:acsalon_temperature" }
Switch klima_eg_onoff "Klima EG Ein/Aus" { channel="mqtt:topic:openhab:acsalon:acsalon_onoff" }
Switch klima_eg_eco "Klima EG ECO Modus" { channel="mqtt:topic:openhab:acsalon:acsalon_eco" }
Switch klima_eg_turbo "Klima EG Turbo Modus" { channel="mqtt:topic:openhab:acsalon:acsalon_turbo" }
Number klima_eg_fan "Klima EG Lüfter Modus" { channel="mqtt:topic:openhab:acsalon:acsalon_fan" }
Switch klima_eg_lamelle "Klima EG Lamelle" { channel="mqtt:topic:openhab:acsalon:acsalon_lamelle" }
Number klima_eg_innen "Klima EG Ist-Temperatur Innen" { channel="mqtt:topic:openhab:acsalon:acsalon_temperature_ist" }
Number klima_eg_aussen "Klima EG Ist-Temperatur Außen" { channel="mqtt:topic:openhab:acsalon:acsalon_temperature_aussen" }
My Sitemap file (including KNX Binary output Switch )
Frame label="Klimaanlage" {
Switch item=AMS_13_Kanal_C_Schalten label="Klimaanlage Hauptstrom" icon=switch
Switch item=klima_eg_onoff icon=climate
Text item=AMS_13_Kanal_C_Leistungswert label="Leistungswert [%.0f W]" icon=energy
Text item=AMS_13_Kanal_C_KiloWattStunden label="kWh [%.0f kWh]" icon=price
Text item=klima_eg_aussen icon=temperature
Text item=klima_eg_innen icon=temperature
Setpoint item=klima_eg_soll_temperatur minValue=18 maxValue=25 step=1 icon=temperature
Selection item=klima_eg_modus mappings=[1="AUTO", 2="KÜHLEN", 3="TROCKNEN", 4="HEIZEN", 5="LÜFTEN"] icon=pump
Selection item=klima_eg_fan icon=fan mappings=[0="AUTO", 1="LOW", 2="MEDIUM", 3="HIGH"]
Switch item=klima_eg_eco icon=bedroom mappings=[OFF="Aus", ON="An"]
Switch item=klima_eg_turbo icon=flowpipe mappings=[OFF="Aus", ON="An"]
Switch item=klima_eg_lamelle icon=flow mappings=[OFF="Aus", ON="An"]
}