WP-Steuerung Luxtronik 1 auslesen

Begonnen von Bernd, 29 November 2014, 14:50:26

Vorheriges Thema - Nächstes Thema

Bernd

Hallo FHEM-Gemeinde,

ich habe FHEM schon seit einiger Zeit am Laufen. Funktioniert alles super. Durch den Umzug von der FB7390 auf einen BananaPi haben sich weitere Möglichkeiten ergeben.

Ich würde mir nun gerne das Luxtronik2-Modul für die Luxtronik1-Steuerung anpassen. Die Luxtronik1 hat nur eine serielle Schnittstelle. Zum Zugriff über Netzwerk sitzt an dieser Schnittstelle ein Seriell2Lan-Adapter. Der Zugriff über eine Putty-Verbindung (Raw oder Telnet, jeweils auf Port 1002) funktioniert. Zum Auslesen der Luxtronik1 schickt man einen Zahlencode an die Steuerung, z.B. 1800, und erhält dann eine Reihen von Zeilen mit Steuerungsdaten. So z.B.:

1800;8
1100;12;256;254;267;392;20;390;450;192;237;750;200;0
1200;6;1;1;0;1;1;1
1300;13;0;0;1;1;0;1;0;0;0;0;0;0;0
1400;29;0;0;0;0;0;0;0;0;0;0;0;0;0;0;1;11;48;0;0;0;0;2;44;0;0;0;0;0;0
1450;9;30054298;11518;2609;0;0;0;403626;0;30054298
1500;5
1500;1500;6;729;21;12;11;22;56
1500;1501;6;729;26;2;12;21;58
1500;1502;6;729;9;1;13;19;13
1500;1503;6;729;19;3;13;14;9
1500;1504;6;745;21;3;14;17;54
1500;5
1600;5
1600;1600;6;010;28;11;14;19;20
1600;1601;6;010;28;11;14;23;34
1600;1602;6;010;29;11;14;4;3
1600;1603;6;010;29;11;14;8;51
1600;1604;6;010;29;11;14;13;19
1600;5
1700;12;14; V2.33;1;5;23;5;13;13;16;36,0,0
1800;8


Das das Ergebnis anders als bei der Luxtronik2 ist, ist klar. Da muss das Modul eben angepasst werden. Was mir schwerfällt ist, ist die eigentliche Datenabfrage. Ich habe mir verschiedene Module angesehen und mit Telnet aus dem Telent-Modul oder oder Socket aus dem Luxtronik2-Modul gebastelt. Ich bekomme aber keine Daten im Modul zu sehen.

  my $socket = new IO::Socket::INET ( 
                   PeerAddr => $host,
                   PeerPort => 1002,
                   Proto => 'tcp'
      );
  #$socket->send(pack("N", 1800));
  $socket->send(1800);

  $socket->recv($result,4);


oder

  my $telnet = new Net::Telnet ( Timeout=>15, Errmode=>'die', Port=>1002);
  $telnet->open($host);
  $telnet->print(1800);
 
  $result = $telnet->getline();


Hat jemand einen Tipp, wie man die 1800 (im Klartext) an die Steuerung schicken und die Antwort dann zeilenweise lesen kann?

Vielen Dank und Gruß aus Bremen

Bernd
FHEM auf BananaPi

Prof. Dr. Peter Henning


Bernd

#2
Danke für den Tipp  :)

Sieht auf den ersten Blick danach aus, wonach ich gesucht habe.

Es wirkt aber auch sehr kompliziert es einzurichten. Da habe ich ja nun etwas zu tun...

Gibt es irgendwo ein .classdef Datei als Beispiel? - Sorry der Nachfrage - in der Commandref stehen ja welche :).

Um nun 1800 an die Steuerung zu senden, reicht da so ein Konstrukt:

get readWP cmd {"1800"}

Gruß

Bernd
FHEM auf BananaPi

Bernd

Huhu zusammen,

irgendwie komme ich nicht weiter. Wenn ich mir ein ECMD Device mit

define LUXIO ECMD telnet wp:1002

erstelle sieht noch alles gut aus. Das Device wird angelegt und im STATE steht OPENED.

Nach der Beschreibung aus CommandRef habe ich dann ein

get LUXIO raw { "1800\n" }

eingegeben und hatte mir irgedwelche Daten als Ergebnis erhofft. Leider erhalte ich nichts als die Antwort

LUXIO raw => 18

Im Logfile taucht mir sehr kurzen Abständen ein Eintrag auf

2014.12.06 17:48:18.585 1: wp:1002 disconnected, waiting to reappear (LUXIO)
2014.12.06 17:48:18.620 1: wp:1002 reappeared (LUXIO)
2014.12.06 17:48:51.770 1: wp:1002 disconnected, waiting to reappear (LUXIO)
2014.12.06 17:48:51.792 1: wp:1002 reappeared (LUXIO)


Auch ein setzen des Attributs "logTraffic" auf 3 bringt mir keine zusätzlichen Daten.

Was kann ich noch machen. Wie schon geschrieben: Eine Eingabe von 1800 direkt in eine Telnet-Session auf die Adresse und den Port gibt Daten zurück.

Vielen Dank für einen weiteren Tipp

Gruß

Bernd
FHEM auf BananaPi

ChristianK.

FHEM: 5.5 auf NUC unter Ubuntu
1x RFXTRX433, 1x CUL868_V3.4 (fw1.58)
CUL-MAX: MAX! Funk-Heizkörperthermostat, Fensterschalter
IT: 2 AB440 kompatible :-)

Bernd

Hallo Christian,

danke für die Infos. Leider haperts bei mir immer noch mit der eigentlichen Kommunikation zwischen FHEM und Steuerung (s.o.) :( . Ich habe auf Anregung von pah mit ECMD und ECMD-Device Versuche durchgeführt  :) , bekomme aber leider keine vernünftigen Daten zurück  :( .
Das von dir genannte Modul kommuniziert scheinbar direkt über die serielle Schnittstelle. Ich habe da aber noch ein RS232<->LAN Konverter zwischen. Unter Windows lag dem Konverter ein Treiber bei, der einen virtuellen COM-Part einrichtete. Damit kann man dann mit entsprechender Software auf die Steuerung zugreifen. Ich betreibe FHEM aber auf einem BananaPI und habe diesen virtuellen Port nicht. Nachdem ich gemerkt habe, dass ich mit Putty direkt auf den Konverter zugreifen kann und Daten angezeigt bekomme, hatte ich mit ECMD eigentlich gehofft, dass es des Rätsels Lösung wäre. War es bisher aber nicht.

So muss ich weiterfummeln um eine Kommunikation hinzubekommen  :'( . Wenn das soweit ist, dann ist dein genanntes Modul goldrichtig um die Auswertung der Daten nicht erneut kodieren zu müssen.

Gruß

Bernd
FHEM auf BananaPi

ChristianK.

Hallo Bernd,

die Kommunikation läuft bei meinem bekannten auch über einen solchen Konverter...

Grüße

Christian
FHEM: 5.5 auf NUC unter Ubuntu
1x RFXTRX433, 1x CUL868_V3.4 (fw1.58)
CUL-MAX: MAX! Funk-Heizkörperthermostat, Fensterschalter
IT: 2 AB440 kompatible :-)

ChristianK.

Hallo Bernd,

ich bin nun bei meinem Bekannten auch am versuchen die Luxtronic mit dem FHEM zu greifen,
auch über einen Netzwerk-Seriell-Converter - er hat ein Perle IOLAN DS1.
Ich werde heute oder morgen versuchen per socat (http://www.dest-unreach.org/socat/doc/socat.html)
eine verbindung herzustellen... Hattest Du evtl. schon erfolg?

Grüße

Christian
FHEM: 5.5 auf NUC unter Ubuntu
1x RFXTRX433, 1x CUL868_V3.4 (fw1.58)
CUL-MAX: MAX! Funk-Heizkörperthermostat, Fensterschalter
IT: 2 AB440 kompatible :-)

Bernd

Hallo Christian,

ich war zuletzt der Meinung, dass ich auf socat verzichten kann. Wenn ich mit Putty via Telnet Daten zu sehen bekomme, dann sollte es eigentlich auch mit einem FHEM Modul funktionieren, dass via Telnet Daten abfragt.
Ich habe so manchen Syntax in ECMD versucht, bekomme aber leider keine Antwort auf der ich aufbauen könnte. Meine bisherigen Versuche hatte ich auch schon oben beschrieben. Ich bin auch nicht sicher, ob ich nur ECMD allein, oder ECMD und ECMDDevice brauche. Da mir der Syntax der Classdef für ECMDDevice immer noch unklar ist, habe ich fast immer nur mit ECMD und dem RAW Kommando Versuche durchgeführt.
Auf ein
define LUXIO ECMD telnet wp:1002
get LUXIO raw {"1800\n"}

erhalte ich immer nur
LUXIO raw => 18
Ich bin auch nicht wirklich sicher, ob nun {} und "" erforderlich sind. Alle Kombinationen mit und ohne haben nicht wirklich gefruchtet.
Auch die Infos im LOG mit verbose und logTraffic auf 5 helfen mir nicht:

2015.03.01 17:23:27.946 5: LUXIO: write "1800\n", expect .*
2015.03.01 17:23:27.946 5: SW: 313830300a
2015.03.01 17:23:27.950 5: LUXIO: read "18"
2015.03.01 17:23:27.954 5: LUXIO: read "00"
2015.03.01 17:23:27.954 5: LUXIO: Spontaneously received "00"
2015.03.01 17:23:27.955 5: LUXIO dispatch 00
2015.03.01 17:23:27.971 3: LUXIO: Unknown code 00, help me![\code]


Schade, aber im Moment komme ich leider nicht weiter...

Gruß

Bernd
FHEM auf BananaPi

Prof. Dr. Peter Henning

Natürlich braucht man sowohl ECMD, als auch ECMDDevice. Das ist aber alles in der commandref beschrieben - also einfach lesen. Andere haben das auch so gemacht.

pah

Bernd

Huhu,

nun gehts mit dem Lesen der Daten  :)

Mit dieser "classdef"
get WP2100 cmd {"2100\r"}
get WP2100 expect "2100.*\r"


und diesen "define"

define MyWP ECMD telnet wp:1002
attr   MyWP classdefs MyWPdef=./class.def
attr   MyWP partial 5
attr   MyWP verbose 5
attr   MyWP logTraffic 5

define MyWPdev ECMDDevice MyWPdef
attr MyWPdev IODev MyWP
attr MyWPdev verbose 5


bekomme ich nun Daten der WP ins Log geschrieben und als Reading im Device.

Nur stehen die Nutzdaten manchmal als eine Zeile

2015.03.08 17:13:15.178 5: ECMDDevice: Analyze command >{"2100\r"}<
2015.03.08 17:13:15.179 5: MyWP: sending command "2100\r"
2015.03.08 17:13:15.180 5: MyWP: write "2100\r", expect 2100.*\r
2015.03.08 17:13:15.180 5: SW: 323130300d
2015.03.08 17:13:20.202 5: MyWP: read "2100\r\n2100;16;560;20;30;50;-160;100;650;60;500;350;-200;-90;1250;20;-200;640\r\n"
2015.03.08 17:13:20.203 1: MyWP: unexpected answer "2100\r\n2100;16;560;20;30;50;-160;100;650;60;500;350;-200;-90;1250;20;-200;640\r\n" received (wrote "2100\r", expected 2100.*\r)
2015.03.08 17:13:20.203 5: MyWP: received answer "2100\r\n2100;16;560;20;30;50;-160;100;650;60;500;350;-200;-90;1250;20;-200;640\r\n"
2015.03.08 17:13:45.277 1: wp:1002 disconnected, waiting to reappear (MyWP)
2015.03.08 17:13:45.280 5: MyWP: read "<nothing>"
2015.03.08 17:13:45.285 1: wp:1002 reappeared (MyWP)


...und manchmal zerstückelt im Log:

2015.03.08 17:07:33.431 5: ECMDDevice: Analyze command >{"2100\r"}<
2015.03.08 17:07:33.432 5: MyWP: sending command "2100\r"
2015.03.08 17:07:33.432 5: MyWP: write "2100\r", expect 2100.*\r
2015.03.08 17:07:33.432 5: SW: 323130300d
2015.03.08 17:07:33.436 5: MyWP: read "2100\r\n"
2015.03.08 17:07:33.437 5: MyWP: received answer "2100\r\n"
2015.03.08 17:07:33.446 5: MyWP: read "2100;16;560;20;30;50;-160;100;650;60;"
2015.03.08 17:07:33.446 5: MyWP: Spontaneously received "2100;16;560;20;30;50;-160;100;650;60;"
2015.03.08 17:07:33.446 5: MyWP dispatch 2100;16;560;20;30;50;-160;100;650;60;
2015.03.08 17:07:33.448 5: MyWP: read "500;350;-200;"
2015.03.08 17:07:33.448 5: MyWP: Spontaneously received "500;350;-200;"
2015.03.08 17:07:33.448 5: MyWP dispatch 500;350;-200;
2015.03.08 17:07:33.449 5: MyWP: read "-90;125"
2015.03.08 17:07:33.449 5: MyWP: Spontaneously received "-90;125"
2015.03.08 17:07:33.449 5: MyWP dispatch -90;125
2015.03.08 17:07:33.450 5: MyWP: read "0;20;-"
2015.03.08 17:07:33.451 5: MyWP: Spontaneously received "0;20;-"
2015.03.08 17:07:33.451 5: MyWP dispatch 0;20;-
2015.03.08 17:07:33.453 5: MyWP: read "200;640\r\n"
2015.03.08 17:07:33.453 5: MyWP: Spontaneously received "200;640\r\n"
2015.03.08 17:07:33.454 5: MyWP dispatch 200;640


Da ist mit dem Timing wohl etwas noch zu verbessern  ;)

Jeder dieser gelesenen Werte steht für einen Heizungs-Parameter. Bei den Temperaturen muss der Wert noch durch 10 geteilt werden. Im nächsten Schritt muss ich diese Daten in einzelne Readings verpacken. Das wird wieder eine mäühevolle Sache...  :'(

Kann ich das grundsätzlich mit "postproc" machen, oder muss dazu eine externe Routine herhalten.

Wie baue ich den in einer classdef definierten Parameter im "expect" ein? Wenn ich den Parameter in "cmd" als %param verwende, dann wird der eingegebene Wert eingetragen. Im "expect" nicht. Warum?

Danke für die Hilfen oder anderen Kommentare

Bernd
FHEM auf BananaPi

Bernd

Hallo,

yippi, es geht. Danke für die Anstösse in alle Richtungen  :)

Mit einer etwas korrigierten classdef-Datei habe ich nun die Daten, die ich haben möchte:

get WP1100 cmd {"1100\r"}
get WP1100 expect "1100\r\n1100.*\r\n"
get WP1100 postproc {\
my $a = substr($_, 0);\
my $hash = $defs{%NAME};\
my @temperature = split "[ \;]+", $a;\
readingsSingleUpdate($hash, "PCount", $temperature[1], 1);\
readingsSingleUpdate($hash, "TVorl", $temperature[2] / 10, 1);\
readingsSingleUpdate($hash, "TRueI", $temperature[3] / 10, 1);\
readingsSingleUpdate($hash, "TRueS", $temperature[4] / 10, 1);\
readingsSingleUpdate($hash, "THeGa", $temperature[5] / 10, 1);\
readingsSingleUpdate($hash, "TAuss", $temperature[6] / 10, 1);\
readingsSingleUpdate($hash, "TBWIs", $temperature[7] / 10, 1);\
readingsSingleUpdate($hash, "TBWSo", $temperature[8] / 10, 1);\
readingsSingleUpdate($hash, "TWQEi", $temperature[9] / 10, 1);\
readingsSingleUpdate($hash, "TWQAu", $temperature[10] / 10, 1);\
readingsSingleUpdate($hash, "TM1Vo", $temperature[11] / 10, 1);\
readingsSingleUpdate($hash, "TM1So", $temperature[12] / 10, 1);\
readingsSingleUpdate($hash, "Ready", "OK", 1);\
}


Damit habe ich die Daten als Readings im Device.

Allerdings habe ich noch ein paar unklare Sachen. Ich habe im ECMD als auch im ECMDDevice "verbose" und "logTraffic" auf Null gesetzt. Dennoch werden im Logfile diese Zeilen


2015.03.14 14:17:30.011 0: MyWPcmd: write "1100\r", expect 1100\r\n1100.*\r\n
2015.03.14 14:17:30.030 0: MyWPcmd: read "1100\r\n1100;12;268;265;259;406;63;400;450;103;118;750;200;0\r\n"


geschrieben. Und da ich minütlich abfrage, wird das Logfile schnell sehr groß. Kann ich das noch abstellen? Zur Info hier "List MyWPcmd":


Internals:
   CFGFN      ./config/fhem_heating.cfg
   DEF        telnet wp:1002
   DeviceName wp:1002
   FD         56
   NAME       MyWPcmd
   NR         1017
   PARTIAL
   Protocol   telnet
   STATE      opened
   TYPE       ECMD
   Readings:
     2015-03-14 13:36:41   state           opened
   Fhem:
     Classdefs:
       Mywpdef:
         filename   ./config/WP.class
         Gets:
           Wp1100:
             cmd        {"1100\r"}
             expect     1100\r\n1100.*\r\n
             postproc   {my $a = substr($_, 0);my $hash = $defs{%NAME};my @temperature = split "[ \;]+", $a;readingsSingleUpdate($hash, "PCount", $temperature[1], 1);readingsSingleUpdate($hash, "TVorl", $temperature[2] / 10, 1);readingsSingleUpdate($hash, "TRueI", $temperature[3] / 10, 1);readingsSingleUpdate($hash, "TRueS", $temperature[4] / 10, 1);readingsSingleUpdate($hash, "THeGa", $temperature[5] / 10, 1);readingsSingleUpdate($hash, "TAuss", $temperature[6] / 10, 1);readingsSingleUpdate($hash, "TBWIs", $temperature[7] / 10, 1);readingsSingleUpdate($hash, "TBWSo", $temperature[8] / 10, 1);readingsSingleUpdate($hash, "TWQEi", $temperature[9] / 10, 1);readingsSingleUpdate($hash, "TWQAu", $temperature[10] / 10, 1);readingsSingleUpdate($hash, "TM1Vo", $temperature[11] / 10, 1);readingsSingleUpdate($hash, "TM1So", $temperature[12] / 10, 1);readingsSingleUpdate($hash, "Ready", "OK", 1);}
         Sets:
Attributes:
   classdefs  MyWPdef=./config/WP.class
   logTraffic 0
   partial    3
   room       07-WP
   verbose    0 [\code]


Das globale "verbose" steht auf 2. Ein paar Informationen möchte ich ja schon noch im Log finden. Oder habe ich das Logging falsch verstanden? Laut commandref sollte das Device-verbose doch das globale verbose überstimmen, sofern definiert.

Danke und Gruß

Bernd
FHEM auf BananaPi

ChristianK.

Hallo,

ich habe nun mal den Versuch gestartet, die FHEM-Umgebung meines Bekannten unter
Windows zum laufen zu bringen, wegen diesem Seriellen Konverter...
Nun habe ich mit der Luxtronic ein Problem... Hier mal der Log-Auszug...
2015.07.28 09:02:14 5: ECMDDevice: Analyze command >{"1100\r"}<
2015.07.28 09:02:14 5: MyWP: sending command "1100\r"
2015.07.28 09:02:14 5: MyWP: write "1100\r", expect 1100\r\n1100.*\r\n
2015.07.28 09:02:14 5: SW: 313130300d
2015.07.28 09:02:14 2: MyWP: first attempt to read timed out, trying to close and open the device.
2015.07.28 09:02:14 3: Opening MyWP device COM2
2015.07.28 09:02:14 3: Setting MyWP serial parameters to 9600,8,N,1
2015.07.28 09:02:14 3: MyWP device opened
2015.07.28 09:02:14 5: SW: 313130300d
2015.07.28 09:02:15 2: MyWP: second attempt to read timed out, this is an unrecoverable error.
2015.07.28 09:02:20 1: MyWP: no answer received (wrote "1100\r", expected 1100\r\n1100.*\r\n)
2015.07.28 09:02:20 5: MyWP: received answer ""
2015.07.28 09:02:20 5: Postprocessing "" with perl command {my $a = substr($_, 0);my $hash = $defs{MyWPdev};my @temperature = split "[ \;]+", $a;readingsSingleUpdate($hash, "PCount", $temperature[1], 1);readingsSingleUpdate($hash, "TVorl", $temperature[2] / 10, 1);readingsSingleUpdate($hash, "TRueI", $temperature[3] / 10, 1);readingsSingleUpdate($hash, "TRueS", $temperature[4] / 10, 1);readingsSingleUpdate($hash, "THeGa", $temperature[5] / 10, 1);readingsSingleUpdate($hash, "TAuss", $temperature[6] / 10, 1);readingsSingleUpdate($hash, "TBWIs", $temperature[7] / 10, 1);readingsSingleUpdate($hash, "TBWSo", $temperature[8] / 10, 1);readingsSingleUpdate($hash, "TWQEi", $temperature[9] / 10, 1);readingsSingleUpdate($hash, "TWQAu", $temperature[10] / 10, 1);readingsSingleUpdate($hash, "TM1Vo", $temperature[11] / 10, 1);readingsSingleUpdate($hash, "TM1So", $temperature[12] / 10, 1);readingsSingleUpdate($hash, "Ready", "OK", 1);}.
2015.07.28 09:02:20 1: PERL WARNING: Use of uninitialized value $temperature[2] in division (/) at (eval 27) line 1.
2015.07.28 09:02:20 3: eval: {my $a = substr($_, 0);my $hash = $defs{MyWPdev};my @temperature = split "[ \;]+", $a;readingsSingleUpdate($hash, "PCount", $temperature[1], 1);readingsSingleUpdate($hash, "TVorl", $temperature[2] / 10, 1);readingsSingleUpdate($hash, "TRueI", $temperature[3] / 10, 1);readingsSingleUpdate($hash, "TRueS", $temperature[4] / 10, 1);readingsSingleUpdate($hash, "THeGa", $temperature[5] / 10, 1);readingsSingleUpdate($hash, "TAuss", $temperature[6] / 10, 1);readingsSingleUpdate($hash, "TBWIs", $temperature[7] / 10, 1);readingsSingleUpdate($hash, "TBWSo", $temperature[8] / 10, 1);readingsSingleUpdate($hash, "TWQEi", $temperature[9] / 10, 1);readingsSingleUpdate($hash, "TWQAu", $temperature[10] / 10, 1);readingsSingleUpdate($hash, "TM1Vo", $temperature[11] / 10, 1);readingsSingleUpdate($hash, "TM1So", $temperature[12] / 10, 1);readingsSingleUpdate($hash, "Ready", "OK", 1);}
2015.07.28 09:02:20 1: PERL WARNING: Use of uninitialized value $temperature[3] in division (/) at (eval 27) line 1.
2015.07.28 09:02:20 3: eval: {my $a = substr($_, 0);my $hash = $defs{MyWPdev};my @temperature = split "[ \;]+", $a;readingsSingleUpdate($hash, "PCount", $temperature[1], 1);readingsSingleUpdate($hash, "TVorl", $temperature[2] / 10, 1);readingsSingleUpdate($hash, "TRueI", $temperature[3] / 10, 1);readingsSingleUpdate($hash, "TRueS", $temperature[4] / 10, 1);readingsSingleUpdate($hash, "THeGa", $temperature[5] / 10, 1);readingsSingleUpdate($hash, "TAuss", $temperature[6] / 10, 1);readingsSingleUpdate($hash, "TBWIs", $temperature[7] / 10, 1);readingsSingleUpdate($hash, "TBWSo", $temperature[8] / 10, 1);readingsSingleUpdate($hash, "TWQEi", $temperature[9] / 10, 1);readingsSingleUpdate($hash, "TWQAu", $temperature[10] / 10, 1);readingsSingleUpdate($hash, "TM1Vo", $temperature[11] / 10, 1);readingsSingleUpdate($hash, "TM1So", $temperature[12] / 10, 1);readingsSingleUpdate($hash, "Ready", "OK", 1);}
2015.07.28 09:02:20 1: PERL WARNING: Use of uninitialized value $temperature[4] in division (/) at (eval 27) line 1.
2015.07.28 09:02:20 3: eval: {my $a = substr($_, 0);my $hash = $defs{MyWPdev};my @temperature = split "[ \;]+", $a;readingsSingleUpdate($hash, "PCount", $temperature[1], 1);readingsSingleUpdate($hash, "TVorl", $temperature[2] / 10, 1);readingsSingleUpdate($hash, "TRueI", $temperature[3] / 10, 1);readingsSingleUpdate($hash, "TRueS", $temperature[4] / 10, 1);readingsSingleUpdate($hash, "THeGa", $temperature[5] / 10, 1);readingsSingleUpdate($hash, "TAuss", $temperature[6] / 10, 1);readingsSingleUpdate($hash, "TBWIs", $temperature[7] / 10, 1);readingsSingleUpdate($hash, "TBWSo", $temperature[8] / 10, 1);readingsSingleUpdate($hash, "TWQEi", $temperature[9] / 10, 1);readingsSingleUpdate($hash, "TWQAu", $temperature[10] / 10, 1);readingsSingleUpdate($hash, "TM1Vo", $temperature[11] / 10, 1);readingsSingleUpdate($hash, "TM1So", $temperature[12] / 10, 1);readingsSingleUpdate($hash, "Ready", "OK", 1);}
2015.07.28 09:02:20 1: PERL WARNING: Use of uninitialized value $temperature[5] in division (/) at (eval 27) line 1.
2015.07.28 09:02:20 3: eval: {my $a = substr($_, 0);my $hash = $defs{MyWPdev};my @temperature = split "[ \;]+", $a;readingsSingleUpdate($hash, "PCount", $temperature[1], 1);readingsSingleUpdate($hash, "TVorl", $temperature[2] / 10, 1);readingsSingleUpdate($hash, "TRueI", $temperature[3] / 10, 1);readingsSingleUpdate($hash, "TRueS", $temperature[4] / 10, 1);readingsSingleUpdate($hash, "THeGa", $temperature[5] / 10, 1);readingsSingleUpdate($hash, "TAuss", $temperature[6] / 10, 1);readingsSingleUpdate($hash, "TBWIs", $temperature[7] / 10, 1);readingsSingleUpdate($hash, "TBWSo", $temperature[8] / 10, 1);readingsSingleUpdate($hash, "TWQEi", $temperature[9] / 10, 1);readingsSingleUpdate($hash, "TWQAu", $temperature[10] / 10, 1);readingsSingleUpdate($hash, "TM1Vo", $temperature[11] / 10, 1);readingsSingleUpdate($hash, "TM1So", $temperature[12] / 10, 1);readingsSingleUpdate($hash, "Ready", "OK", 1);}
2015.07.28 09:02:20 1: PERL WARNING: Use of uninitialized value $temperature[6] in division (/) at (eval 27) line 1.
2015.07.28 09:02:20 3: eval: {my $a = substr($_, 0);my $hash = $defs{MyWPdev};my @temperature = split "[ \;]+", $a;readingsSingleUpdate($hash, "PCount", $temperature[1], 1);readingsSingleUpdate($hash, "TVorl", $temperature[2] / 10, 1);readingsSingleUpdate($hash, "TRueI", $temperature[3] / 10, 1);readingsSingleUpdate($hash, "TRueS", $temperature[4] / 10, 1);readingsSingleUpdate($hash, "THeGa", $temperature[5] / 10, 1);readingsSingleUpdate($hash, "TAuss", $temperature[6] / 10, 1);readingsSingleUpdate($hash, "TBWIs", $temperature[7] / 10, 1);readingsSingleUpdate($hash, "TBWSo", $temperature[8] / 10, 1);readingsSingleUpdate($hash, "TWQEi", $temperature[9] / 10, 1);readingsSingleUpdate($hash, "TWQAu", $temperature[10] / 10, 1);readingsSingleUpdate($hash, "TM1Vo", $temperature[11] / 10, 1);readingsSingleUpdate($hash, "TM1So", $temperature[12] / 10, 1);readingsSingleUpdate($hash, "Ready", "OK", 1);}
2015.07.28 09:02:20 1: PERL WARNING: Use of uninitialized value $temperature[7] in division (/) at (eval 27) line 1.
2015.07.28 09:02:20 3: eval: {my $a = substr($_, 0);my $hash = $defs{MyWPdev};my @temperature = split "[ \;]+", $a;readingsSingleUpdate($hash, "PCount", $temperature[1], 1);readingsSingleUpdate($hash, "TVorl", $temperature[2] / 10, 1);readingsSingleUpdate($hash, "TRueI", $temperature[3] / 10, 1);readingsSingleUpdate($hash, "TRueS", $temperature[4] / 10, 1);readingsSingleUpdate($hash, "THeGa", $temperature[5] / 10, 1);readingsSingleUpdate($hash, "TAuss", $temperature[6] / 10, 1);readingsSingleUpdate($hash, "TBWIs", $temperature[7] / 10, 1);readingsSingleUpdate($hash, "TBWSo", $temperature[8] / 10, 1);readingsSingleUpdate($hash, "TWQEi", $temperature[9] / 10, 1);readingsSingleUpdate($hash, "TWQAu", $temperature[10] / 10, 1);readingsSingleUpdate($hash, "TM1Vo", $temperature[11] / 10, 1);readingsSingleUpdate($hash, "TM1So", $temperature[12] / 10, 1);readingsSingleUpdate($hash, "Ready", "OK", 1);}
2015.07.28 09:02:20 1: PERL WARNING: Use of uninitialized value $temperature[8] in division (/) at (eval 27) line 1.
2015.07.28 09:02:20 3: eval: {my $a = substr($_, 0);my $hash = $defs{MyWPdev};my @temperature = split "[ \;]+", $a;readingsSingleUpdate($hash, "PCount", $temperature[1], 1);readingsSingleUpdate($hash, "TVorl", $temperature[2] / 10, 1);readingsSingleUpdate($hash, "TRueI", $temperature[3] / 10, 1);readingsSingleUpdate($hash, "TRueS", $temperature[4] / 10, 1);readingsSingleUpdate($hash, "THeGa", $temperature[5] / 10, 1);readingsSingleUpdate($hash, "TAuss", $temperature[6] / 10, 1);readingsSingleUpdate($hash, "TBWIs", $temperature[7] / 10, 1);readingsSingleUpdate($hash, "TBWSo", $temperature[8] / 10, 1);readingsSingleUpdate($hash, "TWQEi", $temperature[9] / 10, 1);readingsSingleUpdate($hash, "TWQAu", $temperature[10] / 10, 1);readingsSingleUpdate($hash, "TM1Vo", $temperature[11] / 10, 1);readingsSingleUpdate($hash, "TM1So", $temperature[12] / 10, 1);readingsSingleUpdate($hash, "Ready", "OK", 1);}
2015.07.28 09:02:20 1: PERL WARNING: Use of uninitialized value $temperature[9] in division (/) at (eval 27) line 1.
2015.07.28 09:02:20 3: eval: {my $a = substr($_, 0);my $hash = $defs{MyWPdev};my @temperature = split "[ \;]+", $a;readingsSingleUpdate($hash, "PCount", $temperature[1], 1);readingsSingleUpdate($hash, "TVorl", $temperature[2] / 10, 1);readingsSingleUpdate($hash, "TRueI", $temperature[3] / 10, 1);readingsSingleUpdate($hash, "TRueS", $temperature[4] / 10, 1);readingsSingleUpdate($hash, "THeGa", $temperature[5] / 10, 1);readingsSingleUpdate($hash, "TAuss", $temperature[6] / 10, 1);readingsSingleUpdate($hash, "TBWIs", $temperature[7] / 10, 1);readingsSingleUpdate($hash, "TBWSo", $temperature[8] / 10, 1);readingsSingleUpdate($hash, "TWQEi", $temperature[9] / 10, 1);readingsSingleUpdate($hash, "TWQAu", $temperature[10] / 10, 1);readingsSingleUpdate($hash, "TM1Vo", $temperature[11] / 10, 1);readingsSingleUpdate($hash, "TM1So", $temperature[12] / 10, 1);readingsSingleUpdate($hash, "Ready", "OK", 1);}
2015.07.28 09:02:20 1: PERL WARNING: Use of uninitialized value $temperature[10] in division (/) at (eval 27) line 1.
2015.07.28 09:02:20 3: eval: {my $a = substr($_, 0);my $hash = $defs{MyWPdev};my @temperature = split "[ \;]+", $a;readingsSingleUpdate($hash, "PCount", $temperature[1], 1);readingsSingleUpdate($hash, "TVorl", $temperature[2] / 10, 1);readingsSingleUpdate($hash, "TRueI", $temperature[3] / 10, 1);readingsSingleUpdate($hash, "TRueS", $temperature[4] / 10, 1);readingsSingleUpdate($hash, "THeGa", $temperature[5] / 10, 1);readingsSingleUpdate($hash, "TAuss", $temperature[6] / 10, 1);readingsSingleUpdate($hash, "TBWIs", $temperature[7] / 10, 1);readingsSingleUpdate($hash, "TBWSo", $temperature[8] / 10, 1);readingsSingleUpdate($hash, "TWQEi", $temperature[9] / 10, 1);readingsSingleUpdate($hash, "TWQAu", $temperature[10] / 10, 1);readingsSingleUpdate($hash, "TM1Vo", $temperature[11] / 10, 1);readingsSingleUpdate($hash, "TM1So", $temperature[12] / 10, 1);readingsSingleUpdate($hash, "Ready", "OK", 1);}
2015.07.28 09:02:20 1: PERL WARNING: Use of uninitialized value $temperature[11] in division (/) at (eval 27) line 1.
2015.07.28 09:02:20 3: eval: {my $a = substr($_, 0);my $hash = $defs{MyWPdev};my @temperature = split "[ \;]+", $a;readingsSingleUpdate($hash, "PCount", $temperature[1], 1);readingsSingleUpdate($hash, "TVorl", $temperature[2] / 10, 1);readingsSingleUpdate($hash, "TRueI", $temperature[3] / 10, 1);readingsSingleUpdate($hash, "TRueS", $temperature[4] / 10, 1);readingsSingleUpdate($hash, "THeGa", $temperature[5] / 10, 1);readingsSingleUpdate($hash, "TAuss", $temperature[6] / 10, 1);readingsSingleUpdate($hash, "TBWIs", $temperature[7] / 10, 1);readingsSingleUpdate($hash, "TBWSo", $temperature[8] / 10, 1);readingsSingleUpdate($hash, "TWQEi", $temperature[9] / 10, 1);readingsSingleUpdate($hash, "TWQAu", $temperature[10] / 10, 1);readingsSingleUpdate($hash, "TM1Vo", $temperature[11] / 10, 1);readingsSingleUpdate($hash, "TM1So", $temperature[12] / 10, 1);readingsSingleUpdate($hash, "Ready", "OK", 1);}
2015.07.28 09:02:20 1: PERL WARNING: Use of uninitialized value $temperature[12] in division (/) at (eval 27) line 1.
2015.07.28 09:02:20 3: eval: {my $a = substr($_, 0);my $hash = $defs{MyWPdev};my @temperature = split "[ \;]+", $a;readingsSingleUpdate($hash, "PCount", $temperature[1], 1);readingsSingleUpdate($hash, "TVorl", $temperature[2] / 10, 1);readingsSingleUpdate($hash, "TRueI", $temperature[3] / 10, 1);readingsSingleUpdate($hash, "TRueS", $temperature[4] / 10, 1);readingsSingleUpdate($hash, "THeGa", $temperature[5] / 10, 1);readingsSingleUpdate($hash, "TAuss", $temperature[6] / 10, 1);readingsSingleUpdate($hash, "TBWIs", $temperature[7] / 10, 1);readingsSingleUpdate($hash, "TBWSo", $temperature[8] / 10, 1);readingsSingleUpdate($hash, "TWQEi", $temperature[9] / 10, 1);readingsSingleUpdate($hash, "TWQAu", $temperature[10] / 10, 1);readingsSingleUpdate($hash, "TM1Vo", $temperature[11] / 10, 1);readingsSingleUpdate($hash, "TM1So", $temperature[12] / 10, 1);readingsSingleUpdate($hash, "Ready", "OK", 1);}
2015.07.28 09:02:20 5: Postprocessed value is "Ready: OK".
2015.07.28 09:02:20 5: MyWP: read "5\r\n1100\r\n1100;12;260;322;205;318;194;454;480;178;188;297;232;5\r\n"
2015.07.28 09:02:20 5: MyWP: Spontaneously received "5\r\n1100\r\n1100;12;260;322;205;318;194;454;480;178;188;297;232;5\r\n"
2015.07.28 09:02:20 5: MyWP dispatch 5

1100

1100;12;260;322;205;318;194;454;480;178;188;297;232;5


Hat jemand eine Idee dazu?

Grüße

Christian
FHEM: 5.5 auf NUC unter Ubuntu
1x RFXTRX433, 1x CUL868_V3.4 (fw1.58)
CUL-MAX: MAX! Funk-Heizkörperthermostat, Fensterschalter
IT: 2 AB440 kompatible :-)

janlau

#13
Hallo,
versuche gerade auch meine Wärmepumpe einzubinden.
Habe eine Frage zu der classdef.
Wie muss ich diese erstellen und wo muss ich sie hin kopieren?
Danke im voraus.

Edit: Habe es hinbekommen, die Classdef hatte nicht genügend Rechte für Fhem.

pingus

Hier noch eine Variante die die Ein- und Ausgänge ausliest


get WP1100 cmd {"1100\r"}
get WP1100 expect "1100\r\n1100.*\r\n"
get WP1100 postproc {\
my $a = substr($_, 0);\
my $hash = $defs{%NAME};\
my @temperature = split "[ \;]+", $a;\
readingsSingleUpdate($hash, "TPCount", $temperature[1], 1);\
readingsSingleUpdate($hash, "WP_Temp_Heizkreis_Ist_Vorlauftemperatur", $temperature[2] / 10, 1);\
readingsSingleUpdate($hash, "WP_Temp_Heizkreis_Ist_Ruecklauftemperatur", $temperature[3] / 10, 1);\
readingsSingleUpdate($hash, "WP_Temp_Heizkreis_Soll_Ruecklauftemperatur", $temperature[4] / 10, 1);\
readingsSingleUpdate($hash, "WP_Temp_Heissgastemperatur", $temperature[5] / 10, 1);\
readingsSingleUpdate($hash, "WP_Temp_Aussentemperatur", $temperature[6] / 10, 1);\
readingsSingleUpdate($hash, "WP_Temp_Brauchwarmwasser_Ist_Temperatur", $temperature[7] / 10, 1);\
readingsSingleUpdate($hash, "WP_Temp_Brauchwarmwasser_Soll_Temperatur", $temperature[8] / 10, 1);\
readingsSingleUpdate($hash, "WP_Temp_Waermequellen_Eintrittstemperatur", $temperature[9] / 10, 1);\
readingsSingleUpdate($hash, "WP_Temp_Waermequellen_Austrittstemperatur", $temperature[10] / 10, 1);\
readingsSingleUpdate($hash, "WP_Temp_Mischkreis_1_Ist_Vorlauftemperatur", $temperature[11] / 10, 1);\
readingsSingleUpdate($hash, "WP_Temp_Mischkreis_1_Soll_Vorlauftemperatur", $temperature[12] / 10, 1);\
readingsSingleUpdate($hash, "Ready", "OK", 1);\
}
get WP1200 cmd {"1200\r"}
get WP1200 expect "1200\r\n1200.*\r\n"
get WP1200 postproc {\
my $a = substr($_, 0);\
my $hash = $defs{%NAME};\
my @eingang = split "[ \;]+", $a;\
readingsSingleUpdate($hash, "ECount", $eingang[1], 1);\
readingsSingleUpdate($hash, "WP_Eingang_Abtau_Soledruck_Durchfluss", $eingang[2], 1);\
readingsSingleUpdate($hash, "WP_Eingang_Sperrzeit_vom_EVU", $eingang[3], 1);\
readingsSingleUpdate($hash, "WP_Eingang_Hochdruckpressostat", $eingang[4], 1);\
readingsSingleUpdate($hash, "WP_Eingang_Motorschutz", $eingang[5], 1);\
readingsSingleUpdate($hash, "WP_Eingang_Niederdruckpressostat", $eingang[6], 1);\
readingsSingleUpdate($hash, "WP_Eingang_Anschluss_einer_Fremdstromanode", $eingang[7], 1);\
readingsSingleUpdate($hash, "Ready", "OK", 1);\
}
get WP1300 cmd {"1300\r"}
get WP1300 expect "1300\r\n1300.*\r\n"
get WP1300 postproc {\
my $a = substr($_, 0);\
my $hash = $defs{%NAME};\
my @ausgang = split "[ \;]+", $a;\
readingsSingleUpdate($hash, "ACount", $ausgang[1], 1);\
readingsSingleUpdate($hash, "WP_Ausgang_Abtauventil", $ausgang[2], 1);\
readingsSingleUpdate($hash, "WP_Ausgang_Brauchwarmwasserumwaelzpumpe", $ausgang[3], 1);\
readingsSingleUpdate($hash, "WP_Ausgang_Fussbodenheizungsumwaelzpumpe", $ausgang[4], 1);\
readingsSingleUpdate($hash, "WP_Ausgang_Heizungsumwaelzpumpe", $ausgang[5], 1);\
readingsSingleUpdate($hash, "WP_Ausgang_Mischer_1_Auf", $ausgang[6], 1);\
readingsSingleUpdate($hash, "WP_Ausgang_Mischer_1_Zu", $ausgang[7], 1);\
readingsSingleUpdate($hash, "WP_Ausgang_Ventilation_des_Waermepumpengehaeuses", $ausgang[8], 1);\
readingsSingleUpdate($hash, "WP_Ausgang_Ventilator_Brunnen_oder_Soleumwaelzpu", $ausgang[9], 1);\
readingsSingleUpdate($hash, "WP_Ausgang_Verdichter_1_in_Waermepumpe", $ausgang[10], 1);\
readingsSingleUpdate($hash, "WP_Ausgang_Verdichter_2_in_Waermepumpe", $ausgang[11], 1);\
readingsSingleUpdate($hash, "WP_Ausgang_Zusatzumwaelzpumpe_Zirkulationspumpe", $ausgang[12], 1);\
readingsSingleUpdate($hash, "WP_Ausgang_Zweiter_Waermeerzeuger_1", $ausgang[13], 1);\
readingsSingleUpdate($hash, "WP_Ausgang_Zweiter_Waermeerzeuger_2_Sammelstoerung", $ausgang[14], 1);\
readingsSingleUpdate($hash, "Ready", "OK", 1);\
}