HTTPMOD Beispielkonfiguration zur Anbindung einer Daikin Klimaanlage mit WLAN-Modul
Dieser Wiki Beitrag beschreibt wie mit Hilfe des HTTPMOD Modules eine Daikin Klimaanlage mit WLAN-Modul an FHEM angebunden werden kann.
Es gibt inzwischen auch ein FHEM-Modul HVAC_DaikinAC (Commandref; derzeit nur englisch), das auf die Daikin-Klimaanlagen spezialisiert ist. Dieses ist etwas einfacher zu konfigurieren und unterstützt alle bekannten Funktionen der API.
Die Konfiguration besteht aus zwei HTTPMOD Konfigurationen.
Die Konfiguration für die Sensor-Abfrage:
define AC_s_WZ HTTPMOD http://192.168.0.321/aircon/get_sensor_info 600
attr AC_s_WZ userattr reading01Name reading01Regex reading02Name reading02Regex reading03Name reading03Regex reading04Name reading04Regex reading05Name reading05Regex reading06Name reading06Regex
attr AC_s_WZ enableControlSet 1
attr AC_s_WZ group AC
attr AC_s_WZ icon frost
attr AC_s_WZ reading01Name ret
attr AC_s_WZ reading01Regex ret=([^,]*)
attr AC_s_WZ reading02Name htemp
attr AC_s_WZ reading02Regex htemp=([^,]*)
attr AC_s_WZ reading03Name hhum
attr AC_s_WZ reading03Regex hhum=([^,]*)
attr AC_s_WZ reading04Name otemp
attr AC_s_WZ reading04Regex otemp=([^,]*)
attr AC_s_WZ reading05Name err
attr AC_s_WZ reading05Regex err=([^,]*)
attr AC_s_WZ reading06Name cmpfreq
attr AC_s_WZ reading06Regex cmpfreq=([^,]*)
attr AC_s_WZ room Wohnzimmer
attr AC_s_WZ stateFormat Innen: htemp °C Außen: otemp °C
define FileLog_AC_s_WZ FileLog ./log/AC_s_WZ-%Y-%m.log AC_s_WZ
attr FileLog_AC_s_WZ logtype temp4hum6:Temp/Hum,text
attr FileLog_AC_s_WZ room Wohnzimmer
define SVG_AC_s_WZ SVG FileLog_AC_s_WZ:SVG_AC_s_WZ:CURRENT
attr SVG_AC_s_WZ label "Daikin WZ Min $data{min1}, Max $data{max1}, Last $data{currval1} , Daikin Dach Min $data{min2}, Max $data{max2}, Last $data{currval2}"
attr SVG_AC_s_WZ room Plots,Wetter
und die Konfiguration für die Betriebsparameter:
define AC_c_WZ HTTPMOD http://192.168.0.321/aircon/get_control_info 60
attr AC_c_WZ userattr reading10Name reading10Regex reading11Name reading11OMap reading11Regex reading12Name reading12OMap reading12Regex reading13Name reading13Regex reading14Name reading14Regex reading15Name reading15Regex reading16Name reading16Regex reading17Name reading17Regex reading18Name reading18Regex reading19Name reading19Regex reading20Name reading20Regex reading21Name reading21Regex reading22Name reading22Regex reading23Name reading23Regex reading24Name reading24Regex reading25Name reading25Regex reading26Name reading26Regex reading27Name reading27Regex reading28Name reading28Regex reading29Name reading29Regex reading30Name reading30Regex reading31Name reading31Regex reading32Name reading32Regex reading33Name reading33OMap reading33Regex reading34Name reading34OMap reading34Regex reading35Name reading35OMap reading35Regex reading36Name reading36OMap reading36Regex reading37Name reading37Regex reading38Name reading38Regex reading39Name reading39Regex reading40Name reading40Regex reading41Name reading41Regex reading42Name reading42Regex reading43Name reading43Regex reading44Name reading44Regex reading45Name reading45Regex reading46Name reading46Regex reading47Name reading47Regex reading48Name reading48Regex reading49Name reading49Regex reading50Name reading50Regex reading51Name reading51Regex reading52Name reading52Regex replacement01Mode:reading,internal,text,expression,key replacement01Regex replacement01Value set01Data set01Hint set01Max set01Min set01Name set03Data set03Hint set03Max set03Min set03Name set03URL setURL
attr AC_c_WZ devStateIcon off.*:frost@grey:on on.*:frost@blue:off
attr AC_c_WZ enableControlSet 1
attr AC_c_WZ group AC
attr AC_c_WZ icon frost
attr AC_c_WZ reading10Name ret
attr AC_c_WZ reading10Regex ret=([^,]*)
attr AC_c_WZ reading11Name pow
attr AC_c_WZ reading11Regex pow=([^,]*)
attr AC_c_WZ reading12Name mode
attr AC_c_WZ reading12Regex mode=([^,]*)
attr AC_c_WZ reading13Name adv
attr AC_c_WZ reading13Regex adv=([^,]*)
attr AC_c_WZ reading14Name stemp
attr AC_c_WZ reading14Regex stemp=([^,]*)
attr AC_c_WZ reading15Name shum
attr AC_c_WZ reading15Regex shum=([^,]*)
attr AC_c_WZ reading16Name dt1
attr AC_c_WZ reading16Regex dt1=([^,]*)
attr AC_c_WZ reading17Name dt2
attr AC_c_WZ reading17Regex dt2=([^,]*)
attr AC_c_WZ reading18Name dt3
attr AC_c_WZ reading18Regex dt3=([^,]*)
attr AC_c_WZ reading19Name dt4
attr AC_c_WZ reading19Regex dt4=([^,]*)
attr AC_c_WZ reading20Name dt5
attr AC_c_WZ reading20Regex dt5=([^,]*)
attr AC_c_WZ reading21Name dt7
attr AC_c_WZ reading21Regex dt7=([^,]*)
attr AC_c_WZ reading22Name dh1
attr AC_c_WZ reading22Regex dh1=([^,]*)
attr AC_c_WZ reading23Name dh2
attr AC_c_WZ reading23Regex dh2=([^,]*)
attr AC_c_WZ reading24Name dh3
attr AC_c_WZ reading24Regex dh3=([^,]*)
attr AC_c_WZ reading25Name dh4
attr AC_c_WZ reading25Regex dh4=([^,]*)
attr AC_c_WZ reading26Name dh5
attr AC_c_WZ reading26Regex dh5=([^,]*)
attr AC_c_WZ reading27Name dh7
attr AC_c_WZ reading27Regex dh7=([^,]*)
attr AC_c_WZ reading28Name dhh
attr AC_c_WZ reading28Regex dhh=([^,]*)
attr AC_c_WZ reading29Name b_mode
attr AC_c_WZ reading29Regex b_mode=([^,]*)
attr AC_c_WZ reading30Name b_stemp
attr AC_c_WZ reading30Regex b_stemp=([^,]*)
attr AC_c_WZ reading31Name b_shum
attr AC_c_WZ reading31Regex b_shum=([^,]*)
attr AC_c_WZ reading32Name alert
attr AC_c_WZ reading32Regex alert=([^,]*)
attr AC_c_WZ reading33Name f_rate
attr AC_c_WZ reading33Regex f_rate=([^,]*)
attr AC_c_WZ reading34Name f_dir
attr AC_c_WZ reading34Regex f_dir=([^,]*)
attr AC_c_WZ reading35Name b_f_rate
attr AC_c_WZ reading35OMap A:auto, B:silent, 3:very_low, 4:low, 5:medium, 6:high, 7:very_high
attr AC_c_WZ reading35Regex b_f_rate=([^,]*)
attr AC_c_WZ reading36Name b_f_dir
attr AC_c_WZ reading36Regex b_f_dir=([^,]*)
attr AC_c_WZ reading36OMap 0:stopped, 1:vertical, 2:horizontal, 3:vertical&horizontal
attr AC_c_WZ reading37Name dfr1
attr AC_c_WZ reading37Regex dfr1=([^,]*)
attr AC_c_WZ reading38Name dfr2
attr AC_c_WZ reading38Regex dfr2=([^,]*)
attr AC_c_WZ reading39Name dfr3
attr AC_c_WZ reading39Regex dfr3=([^,]*)
attr AC_c_WZ reading40Name dfr4
attr AC_c_WZ reading40Regex dfr4=([^,]*)
attr AC_c_WZ reading41Name dfr5
attr AC_c_WZ reading41Regex dfr5=([^,]*)
attr AC_c_WZ reading42Name dfr6
attr AC_c_WZ reading42Regex dfr6=([^,]*)
attr AC_c_WZ reading43Name dfr7
attr AC_c_WZ reading43Regex dfr7=([^,]*)
attr AC_c_WZ reading44Name dfrh
attr AC_c_WZ reading44Regex dfrh=([^,]*)
attr AC_c_WZ reading45Name dfd1
attr AC_c_WZ reading45Regex dfd1=([^,]*)
attr AC_c_WZ reading46Name dfd2
attr AC_c_WZ reading46Regex dfd2=([^,]*)
attr AC_c_WZ reading47Name dfd3
attr AC_c_WZ reading47Regex dfd3=([^,]*)
attr AC_c_WZ reading48Name dfd4
attr AC_c_WZ reading48Regex dfd4=([^,]*)
attr AC_c_WZ reading49Name dfd5
attr AC_c_WZ reading49Regex dfd5=([^,]*)
attr AC_c_WZ reading50Name dfd6
attr AC_c_WZ reading50Regex dfd6=([^,]*)
attr AC_c_WZ reading51Name dfd7
attr AC_c_WZ reading51Regex dfd7=([^,]*)
attr AC_c_WZ reading52Name dfdh
attr AC_c_WZ reading52Regex dfdh=([^,]*)
attr AC_c_WZ replacement01Mode expression
attr AC_c_WZ replacement01Regex {{([^}]+)}}
attr AC_c_WZ replacement01Value ReadingsVal($name, $1, "")
attr AC_c_WZ room Wohnzimmer
attr AC_c_WZ set01Data pow=$val&mode={{mode}}&stemp={{stemp}}&shum=0&f_rate={{f_rate}}&f_dir={{f_dir}}
attr AC_c_WZ set01Hint 0,1
attr AC_c_WZ set01Max 1
attr AC_c_WZ set01Min 0
attr AC_c_WZ set01Name power
attr AC_c_WZ set03Data pow={{pow}}&mode={{mode}}&stemp=$val&shum=0&f_rate={{f_rate}}&f_dir={{f_dir}}
attr AC_c_WZ set03Max 41
attr AC_c_WZ set03Min 10
attr AC_c_WZ set03Name stemp
attr AC_c_WZ setURL http://192.168.0.321/aircon/set_control_info?
attr AC_c_WZ stateFormat {(ReadingsVal($name,"pow","") == 1) ? ("on") : ("off") }
attr AC_c_WZ webCmd stemp
attr AC_c_WZ widgetOverride stemp:slider,10,1,41
dann noch zwei cmdalias Devices, die aus "set AC_c_WZ power 1" ein "set AC_c_WZ on" machen (und Daten/Status aktualisieren):
define AC_on_CMD cmdalias set AC_c_WZ on AS set AC_c_WZ power 1;;sleep 0.25;;set AC_c_WZ reread;;sleep 30;;set AC_s_WZ reread
attr AC_on_CMD group AC_CMD
attr AC_on_CMD room Wohnzimmer
define AC_off_CMD cmdalias set AC_c_WZ off AS set AC_c_WZ power 0;;sleep 0.25;;set AC_c_WZ reread
attr AC_off_CMD group AC_CMD
attr AC_off_CMD room Wohnzimmer
Von den sechs Betriebsparametern die über das REST-API gesteuert werden können (pow, mode, stemp, shum, f_rate, f_dir) ermöglicht diese Konfiguratuion die Steuerug von zweien: Ein/Aus (pow) und die Soll Temperatur (stemp).
Und so sieht das dann im Webinterface aus:
Optional schaltet dieses DOIF die Klimaanlage, wenn sie sich im Kühlbetrieb (mode 3) befindet, aus, wenn die Außentemperatur (otemp) auf die soll Temperatur (stemp) gesunken ist:
define AC_autoOff_WZ DOIF ([AC_c_WZ] eq "on" and [AC_s_WZ:otemp] ne "-" and [AC_c_WZ:mode] eq "3" and [AC_s_WZ:otemp] <= [AC_c_WZ:stemp] ) (set AC_c_WZ off)
attr AC_autoOff_WZ do always
attr AC_autoOff_WZ room Wohnzimmer
Beschreibung der Parameter und die möglichen Werte:
[1]