ECMD Support

Begonnen von bgewehr, 17 September 2014, 20:53:45

Vorheriges Thema - Nächstes Thema

bgewehr

Hallo, Boris,

ich fürchte, ich brauche einige Anregungen, wie ich vorgehen muss.
Lorenz hat eine Lösung gefunden, um den EMS-Bus von Buderus per Telnet zu belauschen und diese Ausgaben als Readings eines ECMDDevice mit entsprechender Classdef zu lesen.

Hat funktioniert, bis zu diesem Update.

Nun kommen die Daten nicht mehr durch die regex-Regeln durch in die Readings.

Was kann ich tun?

Vielen Dank!

Hier die Defines:

define EMS ECMD telnet 192.168.178.45:7778
attr EMS classdefs ems_messages=./FHEM/emsmessages.classdef
attr EMS devStateIcon opened:on closed:off

define EMSClient ECMDDevice ems_messages ww_currenttemp heater_currenttemp returnflow_currenttemp outdoor_temp heaterpump_currentmodulation ww_targettemp heater_targettemp warmwaterpreparationactive zirkpumpactive flameactive heateractive ignitionactive heater_pumpactive 3wayonww ww_daymode burner_targetmodulation burner_currentmodulation flamecurrent
attr EMSClient IODev EMS
attr EMSClient event-on-change-reading ww_currenttemp:0.3,heater_currenttemp:0.3,returnflow_currenttemp:0.3,outdoor_temp:0.3,heaterpump_currentmodulation,ww_targettemp:0.3,heater_targettemp:0.3,warmwaterpreparationactive,zirkpumpactive,flameactive,heateractive,ignitionactive,heater_pumpactive,3wayonww,ww_daymode,burner_targetmodulation,burner_currentmodulation,flamecurrent
attr EMSClient verbose 2


Hier der Telnet-Mitschnitt:

ww targettemperature 60
                       ww currenttemperature 55.8
                                                 warmwaterminutes 274685
                                                                        warmwaterpreparations 14056
                   ww daymode on
                                ww onetimeload off
                                                  ww desinfectionactive off
                                                                           warmwaterpreparationactive on
                        ww boostcharge off
                                          warmwatertempok off
                                                             zirkpump daymode on
                                                                               zirkpumpactive off
                 warmwatersystemtype large
                                          heater targettemperature 75
                                                                     heater currenttemperature 75.2
                   ww currenttemperature 55.8
                                             returnflow currenttemperature 66.9
                                                                               burner targetmodulation 123
                          burner currentmodulation 83
                                                     flamecurrent 24.3
                                                                      pressure 1.3
  servicecode =H
                errorcode 201
                             flameactive on
                                           heateractive on
                                                          ignitionactive off
                                                                            heater pumpactive on
                3wayonww on
                           zirkpumpactive off
                                             systemtime 2014-09-17 20:34:52


Hier die Classdef:

params ww_currenttemp heater_currenttemp returnflow_currenttemp outdoor_temp heaterpump_currentmodulation ww_targettemp heater_targettemp warmwaterpreparationactive zirkpumpactive flameactive heateractive ignitionactive heater_pumpactive 3wayonww ww_daymode burner_targetmodulation burner_currentmodulation flamecurrent
reading ww_currenttemp match "[ww currenttemperature ](\d+.\d)\n"
reading ww_currenttemp postproc { s/(ww\scurrenttemperature\s)(\d+.+)\n/$2/;; $2 }
reading heater_currenttemp match "[heater currenttemperature ](\d+.\d)\n"
reading heater_currenttemp postproc { s/(heater\scurrenttemperature\s)(\d+.+)\n/$2/;; $2 }
reading returnflow_currenttemp match "[returnflow currenttemperature ](\d+.\d)\n"
reading returnflow_currenttemp postproc { s/(returnflow\scurrenttemperature\s)(\d+.+)\n/$2/;; $2 }
reading outdoor_temp match "[outdoor currenttemperature ](\d+.\d)\n"
reading outdoor_temp postproc { s/(outdoor\scurrenttemperature\s)(\d+.+)\n/$2/;; $2 }
reading heaterpump_currentmodulation match "[heaterpump currentmodulation ](\d+)\n"
reading heaterpump_currentmodulation postproc { s/(heaterpump\scurrentmodulation\s)(\d+)\n/$2/;; $2 }
reading ww_targettemp match "[ww targettemperature ](\d+.\d)\n"
reading ww_targettemp postproc { s/(ww\stargettemperature\s)(\d+.+)\n/$2/;; $2 }
reading heater_targettemp match "[heater targettemperature ](\d+)\n"
reading heater_targettemp postproc { s/(heater\stargettemperature\s)(\d+)\n/$2/;; $2 }
reading warmwaterpreparationactive match "[warmwaterpreparationactive ](on|off)\n"
reading warmwaterpreparationactive postproc { s/(warmwaterpreparationactive\s)(on|off)\n/$2/;; $2 }
reading zirkpumpactive match "[zirkpumpactive ](on|off)\n"
reading zirkpumpactive postproc { s/(zirkpumpactive\s)(on|off)\n/$2/;; $2 }
reading flameactive match "[flameactive ](on|off)\n"
reading flameactive postproc { s/(flameactive\s)(on|off)\n/$2/;; $2 }
reading heateractive match "[heateractive ](on|off)\n"
reading heateractive postproc { s/(heateractive\s)(on|off)\n/$2/;; $2 }
reading ignitionactive match "[ignitionactive ](on|off)\n"
reading ignitionactive postproc { s/(ignitionactive\s)(on|off)\n/$2/;; $2 }
reading heater_pumpactive match "[heater pumpactive ](on|off)\n"
reading heater_pumpactive postproc { s/(heater\spumpactive\s)(on|off)\n/$2/;; $2 }
reading 3wayonww match "[3wayonww ](on|off)\n"
reading 3wayonww postproc { s/(3wayonww\s)(on|off)\n/$2/;; $2 }
reading ww_daymode match "[ww daymode ](on|off)\n"
reading ww_daymode postproc { s/(ww\sdaymode\s)(on|off)\n/$2/;; $2 }
reading burner_targetmodulation match "[burner targetmodulation ](\d+)\n"
reading burner_targetmodulation postproc { s/(burner\stargetmodulation\s)(\d+)\n/$2/;; $2 }
reading burner_currentmodulation match "[burner currentmodulation ](\d+)\n"
reading burner_currentmodulation postproc { s/(burner\scurrentmodulation\s)(\d+)\n/$2/;; $2 }
reading flamecurrent match "[flamecurrent ](\d+)\n"
reading flamecurrent postproc { s/(flamecurrent\s)(\d+)\n/$2/;; $2 }
FritzBox 7590, Synology DS216+II mit Docker
Docker: FHEM mit hmlan, Homebridge, node-red, mosquitto, ems-collector für Buderus EMS mit AVR Net-IO
Gartenwasser über MQTT auf R/Pi A+
Volkszaehler.org auf R/Pi 2B mit Pi_Erweiterung
Raspberrymatic auf R/Pi 4B mit RPI-RF-MOD u. CUL868

Dr. Boris Neubert

Hallo,

neu ist, dass match auf das komplette Datagramm passen muss. Sieht mir nach einem fehlendem zweiten \n am Ende aus. Genaueres findest Du mit logTraffic heraus.

Grüße
Boris
Globaler Moderator, Developer, aktives Mitglied des FHEM e.V. (Marketing, Verwaltung)
Bitte keine unaufgeforderten privaten Nachrichten!

bgewehr

#2
Zitatneu ist, dass match auf das komplette Datagramm passen muss.

Das sieht für mich eher so aus, als ob es bei dieser Methode der Interpretation nicht mehr funktionieren kann, oder?
Logtraffic:

2014.09.17 21:26:54 5: EMS: read "on\nzirkpumpactive on\n"
2014.09.17 21:26:54 5: EMS: Spontaneously received "on\nzirkpumpactive on\n"
2014.09.17 21:26:54 5: EMS dispatch on
zirkpumpactive on

2014.09.17 21:26:59 5: EMS: read "ww targettemperature 60\nww currenttemperature 54.2\n"
2014.09.17 21:26:59 5: EMS: Spontaneously received "ww targettemperature 60\nww currenttemperature 54.2\n"
2014.09.17 21:26:59 5: EMS dispatch ww targettemperature 60
ww currenttemperature 54.2

2014.09.17 21:26:59 5: EMS: read "warmwaterminutes 274699\nwarmwaterpreparations 14057\nww daymode on\nww onetimeload off\nww desinfectionactive off\nwarmwaterpreparationactive on\nww boostcharge off\nwarmwatertempok off\nzirkpump daymode on\nzirkpumpactive on\nwarmwatersystemtype large\n"
2014.09.17 21:26:59 5: EMS: Spontaneously received "warmwaterminutes 274699\nwarmwaterpreparations 14057\nww daymode on\nww onetimeload off\nww desinfectionactive off\nwarmwaterpreparationactive on\nww boostcharge off\nwarmwatertempok off\nzirkpump daymode on\nzirkpumpactive on\nwarmwatersystemtype large\n"
2014.09.17 21:26:59 5: EMS dispatch warmwaterminutes 274699
warmwaterpreparations 14057
ww daymode on
ww onetimeload off
ww desinfectionactive off
warmwaterpreparationactive on
ww boostcharge off
warmwatertempok off
zirkpump daymode on
zirkpumpactive on
warmwatersystemtype large

2014.09.17 21:26:59 5: EMS: read "heater targettemperature 75\nheater currenttemperature 74.8\nww currenttemperature 54.2\nreturnflow currenttemperature 66.9\nburner targetmodulation 123\nburner currentmodulation 79\nflamecurrent 22.2\npressure 1.3\nservicecode =H\nerrorcode 201\nflameactive on\nheat"
2014.09.17 21:26:59 5: EMS: Spontaneously received "heater targettemperature 75\nheater currenttemperature 74.8\nww currenttemperature 54.2\nreturnflow currenttemperature 66.9\nburner targetmodulation 123\nburner currentmodulation 79\nflamecurrent 22.2\npressure 1.3\nservicecode =H\nerrorcode 201\nflameactive on\nheat"
2014.09.17 21:26:59 5: EMS dispatch heater targettemperature 75
heater currenttemperature 74.8
ww currenttemperature 54.2
returnflow currenttemperature 66.9
burner targetmodulation 123
burner currentmodulation 79
flamecurrent 22.2
pressure 1.3
servicecode =H
errorcode 201
flameactive on
heat
2014.09.17 21:26:59 5: EMS: read "eractive on\nignitionactive off\nheater pumpactive on\n3wayonww on\nzirkpumpactive on\n"
2014.09.17 21:26:59 5: EMS: Spontaneously received "eractive on\nignitionactive off\nheater pumpactive on\n3wayonww on\nzirkpumpactive on\n"
2014.09.17 21:26:59 5: EMS dispatch eractive on
ignitionactive off
heater pumpactive on
3wayonww on
zirkpumpactive on

2014.09.17 21:26:59 5: EMS: read "outdoor dampedtemperature 21\n"
2014.09.17 21:26:59 5: EMS: Spontaneously received "outdoor dampedtemperature 21\n"
2014.09.17 21:26:59 5: EMS dispatch outdoor dampedtemperature 21
FritzBox 7590, Synology DS216+II mit Docker
Docker: FHEM mit hmlan, Homebridge, node-red, mosquitto, ems-collector für Buderus EMS mit AVR Net-IO
Gartenwasser über MQTT auf R/Pi A+
Volkszaehler.org auf R/Pi 2B mit Pi_Erweiterung
Raspberrymatic auf R/Pi 4B mit RPI-RF-MOD u. CUL868

Dr. Boris Neubert

split und partial verwenden!

Dann sollte es sogar vollständig richtig funktionieren (im Gegensatz zu vorher).




Viele Grüße
Boris
Globaler Moderator, Developer, aktives Mitglied des FHEM e.V. (Marketing, Verwaltung)
Bitte keine unaufgeforderten privaten Nachrichten!

bgewehr

OK, mit Split \n und Partial 3 bekomme ich folgendes Ergebnis:


2014.09.17 23:07:27 5: EMS: read " offoptimization off\nhk1 onoptimization off\nhk1 wwoverride off\nhk1 floordrying off\nhk1 frostsafemodeactive off\nhk1 summermode off\nhk1 daymode off\nhk1 partymode off\nhk1 pausemode off\nhk1 vacationmode off\nhk1 holidaymode off\nhk1 switchpointactive off\n"
2014.09.17 23:07:27 5: EMS: Spontaneously received " offoptimization off\nhk1 onoptimization off\nhk1 wwoverride off\nhk1 floordrying off\nhk1 frostsafemodeactive off\nhk1 summermode off\nhk1 daymode off\nhk1 partymode off\nhk1 pausemode off\nhk1 vacationmode off\nhk1 holidaymode off\nhk1 switchpointactive off\n"
2014.09.17 23:07:27 5: EMS dispatch  offoptimization off
hk1 onoptimization off
hk1 wwoverride off
hk1 floordrying off
hk1 frostsafemodeactive off
hk1 summermode off
hk1 daymode off
hk1 partymode off
hk1 pausemode off
hk1 vacationmode off
hk1 holidaymode off
hk1 switchpointactive off


Trotzdem kommen keine Readings an, warum nicht?
FritzBox 7590, Synology DS216+II mit Docker
Docker: FHEM mit hmlan, Homebridge, node-red, mosquitto, ems-collector für Buderus EMS mit AVR Net-IO
Gartenwasser über MQTT auf R/Pi A+
Volkszaehler.org auf R/Pi 2B mit Pi_Erweiterung
Raspberrymatic auf R/Pi 4B mit RPI-RF-MOD u. CUL868

Dr. Boris Neubert

Hallo,

die regex in Deinen match-Anweisungen haben eckige statt keine Klammern.

Das soll jemals funktioniert haben?

Fang doch mal klein an mit

reading ww_currenttemp match "ww currenttemperature \d+\.\d+\n"
reading ww_currenttemp postproc { s/ww currenttemperature (\d+\.\d+)\n/$1/;; $_ }


Grüße
Boris
Globaler Moderator, Developer, aktives Mitglied des FHEM e.V. (Marketing, Verwaltung)
Bitte keine unaufgeforderten privaten Nachrichten!

bgewehr

Hallo, Boris, dank Dir und Lorenz läuft es nun wieder, hier die Konfig:
http://forum.fhem.de/index.php?topic=25688

Vielen Dank!


Sent from my iPhone using Tapatalk
FritzBox 7590, Synology DS216+II mit Docker
Docker: FHEM mit hmlan, Homebridge, node-red, mosquitto, ems-collector für Buderus EMS mit AVR Net-IO
Gartenwasser über MQTT auf R/Pi A+
Volkszaehler.org auf R/Pi 2B mit Pi_Erweiterung
Raspberrymatic auf R/Pi 4B mit RPI-RF-MOD u. CUL868