OH2 thermostat über mqtt steuern

Einrichtung der openHAB Umgebung und allgemeine Konfigurationsthemen.

Moderatoren: seppy, udo1toni

Antworten
Benutzeravatar
djuscha
Beiträge: 130
Registriert: 14. Mai 2016 00:12
Answers: 0

OH2 thermostat über mqtt steuern

Beitrag von djuscha »

Ich wollte schon lange weg von RWE Smarthome hab mittlerweile nicht viele Geräte da nur Heizkörperthermostate und Fenstersensoren.
Für Fenstersensoren hab ich sehr gute alternative gefunden Xiaomi über zigbee2mqtt und jetzt hab ich Zigbee Thermostat von Hama gekauft ,gerade im Angebot bei MM
Der ist genauso wie Saswell SEA802-Zigbee
in Zigbee2mqtt hab ich ihn eingebunden
Anzeigen gehen über OH nur mit comand hab ich Problem weiss nicht wie ich das richtig mache . mit dem Switch ist alle klar .Aber wie mache ich das mit

Code: Alles auswählen

current_heating_setpoint und system_mode

So sieht Thing aus

Code: Alles auswählen

Thing mqtt:topic:mosquitto:0x60a423fffe8cf6dd  "Hama wohnen" (mqtt:broker:mosquitto) @ "MQTT"   {
        Channels:
	Type number : temperatureloc "Temp local" 
         [ stateTopic="zigbee2mqtt/0x60a423fffe8cf6dd", transformationPattern="JSONPATH:$.local_temperature" ]	
        Type number : temperature "Temp current_heating_setpoint" 
         [ stateTopic="zigbee2mqtt/0x60a423fffe8cf6dd", transformationPattern="JSONPATH:$.current_heating_setpoint",commandTopic="zigbee2mqtt/0x60a423fffe8cf6dd/set" ]                        
        Type number : linkquality "RSSI linkquality" 
         [ stateTopic="zigbee2mqtt/0x60a423fffe8cf6dd", transformationPattern="JSONPATH:$.linkquality" ]
        Type string : battery "Batterie low" 
         [ stateTopic="zigbee2mqtt/0x60a423fffe8cf6dd", transformationPattern="JSONPATH:$.battery_low" ] 
        Type switch : window "Window detection" 
         [ stateTopic="zigbee2mqtt/0x60a423fffe8cf6dd", transformationPattern="JSONPATH:$.window_detection",commandTopic="zigbee2mqtt/0x60a423fffe8cf6dd/set",on="ON", off="OFF" ] 
        Type string : system "System_mod" 
         [ stateTopic="zigbee2mqtt/0x60a423fffe8cf6dd", transformationPattern="JSONPATH:$.system_mode",commandTopic="zigbee2mqtt/0x60a423fffe8cf6dd/set",heat="heat", off="off",auto="auto" ] 
} 

  
Ithems

Code: Alles auswählen

Number HamaW1_Temploc     "Temperatur Im Zimmer[%d] "   <temperature>           {channel="mqtt:topic:mosquitto:0x60a423fffe8cf6dd:temperatureloc"}
Number HamaW1_Temp     "Temperatur Heizung [%d]"       <temperature>            {channel="mqtt:topic:mosquitto:0x60a423fffe8cf6dd:temperature"}
Number HamaW1_RSSI     "Linkquality [%d]" <network>                {channel="mqtt:topic:mosquitto:0x60a423fffe8cf6dd:linkquality"}
String HamaW1_Batt     "Batterie " <battery>                  {channel="mqtt:topic:mosquitto:0x60a423fffe8cf6dd:battery"[profile="transform:battery"]}
Switch HamaW1          "Fenster detektor"     <action>        {channel="mqtt:topic:mosquitto:0x60a423fffe8cf6dd:window"}
String HamaW1_Sys       "System modus"         <action>                {channel="mqtt:topic:mosquitto:0x60a423fffe8cf6dd:system_mode"[profile="transform:system_mode"]}
wie mache ich das richtig unter command rein?

Code: Alles auswählen

current_heating_setpoint: Temperature setpoint. 
To control publish a message to topic zigbee2mqtt/FRIENDLY_NAME/set with payload {"current_heating_setpoint": VALUE}
 where VALUE is the °C between 5 and 30. 
To read send a message to zigbee2mqtt/FRIENDLY_NAME/get with payload {"current_heating_setpoint": ""}.
system_mode: Mode of this device.
 To control publish a message to topic zigbee2mqtt/FRIENDLY_NAME/set with payload {"system_mode": VALUE}
  where VALUE is one of: off, heat, auto. 
  To read send a message to zigbee2mqtt/FRIENDLY_NAME/get with payload {"system_mode": ""}.
hab schon vieles ausprobiert und gegoogelt finde kein Rat :(

was noch nicht klappt ist die Baterie Anzeige , wollte einfach Voll und Leer
das ist battery.map

Code: Alles auswählen

false=Voll
true=Leer
-=-
undefined=-
uninitialized=-
NULL=-
Sitemap

Code: Alles auswählen

Text label="Hama Termostat"icon=ino{

Frame{
Text item=HamaW1_Temploc
Text item=HamaW1_Temp
Text item=HamaW1_RSSI
Text item=HamaW1_Batt label="Baterie[MAP(battery.map):%s]"  // mappings=[false="Voll",true="Leer"]

Switch item=HamaW1
Text item=HamaW1_Sys
Setpoint item=HamaW1_Temp   minValue=5 maxValue=30 step=1
hab auch ohne battery.map probiert mit mappings in der Sitemap das geht auch nicht.:(
Ich mache was falsch weiss aber nicht was .

das bekomme ich von dem Thermostat über mqtt

Code: Alles auswählen

0x60a423fffe8cf6dd = {"anti_scaling":"ON","away_mode":"OFF","battery_low":false,
"child_lock":"LOCK","current_heating_setpoint":5,"frost_detection":"ON","linkquality":18,
"local_temperature":21.4,"local_temperature_calibration":0,"preset_mode":"none",
"system_mode":"off","window_detection":"ON"}

Benutzeravatar
djuscha
Beiträge: 130
Registriert: 14. Mai 2016 00:12
Answers: 0

Re: OH2 thermostat über mqtt steuern

Beitrag von djuscha »

Hab lange gekämpft und soweit alles hingekriegt :)
Vielleicht braucht das einer
Weiss nur noch nicht ob das mit Fenster Offen Thermostatt aus gehen wird oder ich ne Rule schreiben soll aber das kann ich testen wenn Heizung wieder an ist.
Vielleicht kann man das auch verbessern für Vorschläge bin ich offen :)
Thing

Code: Alles auswählen

Thing mqtt:topic:mosquitto:0x60a423fffe8cf6dd  "Hama wohnen" (mqtt:broker:mosquitto) @ "MQTT"   {
        Channels:
	Type number : temperatureloc "Temp local" 
         [ stateTopic="zigbee2mqtt/0x60a423fffe8cf6dd", transformationPattern="JSONPATH:$.local_temperature" ]	
        Type number: temp_set "Temp current_heating_setpoint"     
        [ stateTopic="zigbee2mqtt/0x60a423fffe8cf6dd", commandTopic="zigbee2mqtt/0x60a423fffe8cf6dd/set", transformationPattern="JSONPATH:$.current_heating_setpoint", formatBeforePublish="{ \"current_heating_setpoint\": %s }", min=5, max=30, step=1 ]
        Type number : linkquality "RSSI linkquality" 
         [ stateTopic="zigbee2mqtt/0x60a423fffe8cf6dd", transformationPattern="JSONPATH:$.linkquality" ]
        Type string : battery "Batterie low" 
         [ stateTopic="zigbee2mqtt/0x60a423fffe8cf6dd", transformationPattern="JSONPATH:$.battery_low" ] 
        Type switch : window "Window detection" 
         [ stateTopic="zigbee2mqtt/0x60a423fffe8cf6dd", transformationPattern="JSONPATH:$.window_detection",commandTopic="zigbee2mqtt/0x60a423fffe8cf6dd/set",on="ON", off="OFF" ] 
        Type string : system "System_mod" 
         [ stateTopic="zigbee2mqtt/0x60a423fffe8cf6dd", transformationPattern="JSONPATH:$.system_mode",commandTopic="zigbee2mqtt/0x60a423fffe8cf6dd/set/system_mode",heat="heat", off="off",auto="auto" ] 
        Type string : locking "Lock " 
         [ stateTopic="zigbee2mqtt/0x60a423fffe8cf6dd", transformationPattern="JSONPATH:$.child_lock" ]


} 
Ithems

Code: Alles auswählen

Number HamaW2_Temploc     "Temperatur Im Zimmer[%d] "   <temperature>           {channel="mqtt:topic:mosquitto:0x847127fffe1b6181:temperatureloc"}
Number HamaW2_Temp     "Temperatur Heizung [%d]"       <temperature>            {channel="mqtt:topic:mosquitto:0x847127fffe1b6181:temp_set"}
Number HamaW2_RSSI     "Linkquality [%d]" <network>                {channel="mqtt:topic:mosquitto:0x847127fffe1b6181:linkquality"}
String HamaW2_Batt     "Batterie " <battery>             {channel="mqtt:topic:mosquitto:0x847127fffe1b6181:battery"[profile="transform:MAP", function="battery.map", sourceFormat="%s"]}
Switch HamaW2          "Fenster detektor"     <action>        {channel="mqtt:topic:mosquitto:0x847127fffe1b6181:window"}
String HamaW2_Sys       "Modus[]"       {channel="mqtt:topic:mosquitto:0x847127fffe1b6181:system"[profile="transform:MAP", function="system_mode.map", sourceFormat="%s"]}
String HamaW2_Lock     "Child_Lock "             {channel="mqtt:topic:mosquitto:0x847127fffe1b6181:locking"}

Code: Alles auswählen

Text item=HamaW1_Temploc
Setpoint item=HamaW1_Temp   minValue=5 maxValue=30 step=1
Slider item=HamaW1_Temp label="Temperatur [%1.0f °C]" icon="temperature" minValue=5 maxValue=30 step=1
Text item=HamaW1_Temp
Text item=HamaW1_RSSI
Text item=HamaW1_Batt
Switch item=HamaW1
Switch item=HamaW1_Sys mappings=[off="off",heat="heat",auto="auto"] 
Text item=HamaW1_Lock


system_mode map

Code: Alles auswählen

off=off
heat=heat
auto=auto
-=-
undefined=-
uninitialized=-
NULL=-

Antworten