THZ / LWZ Tecalor Stiebel Eltron Heizung

Begonnen von Heiner, 02 Juni 2013, 11:39:13

Vorheriges Thema - Nächstes Thema

Heiner

Hi,

ich bin recht neu im Forum und tu mich noch recht schwer. In einer Google Gruppe hat ein User IMMI eine THZ.pm gebaut um  die THZ von Tecalor oder baugleiche LWZ von Stiebel Eltron mit FHEM zu loggen. Leider ist die Google gruppe geschlossen und die Software in einem recht frühen Stadium.

Link: https://groups.google.com/forum/#!msg/fhem-users/ANgUIF9Qea4/wXsU6HeF4MoJ

Ich habe nun dieses modul ausprobiert und siehe da, erste Erfolge. Das Heizungslog zeigt Connceted, jedoch wird igendwie beider zyklischen Pruefung ob die Anlage noch verbunden ist auch immer wieder ein Disconnected gesendet.
2013-06-01_13:29:59 Heizung DISCONNECTED
2013-06-01_13:29:59 Heizung CONNECTED
2013-06-01_13:31:59 Heizung DISCONNECTED
2013-06-01_13:31:59 Heizung CONNECTED

Das Log bleibt aber leer, ich hab da her den loglevel auf 5 gesetzt  und hab in die THZ.pm je Submodul einen Logeintrag erzeugt, und bekomme ein paar Details mehr:

2013.06.01 12:48:22 5: Notify loop for Heizung CONNECTED
2013.06.01 12:49:40 1: THZ_GetUpdate
2013.06.01 12:49:40 1: THZ_Get
2013.06.01 12:49:40 1: THZ_Write
2013.06.01 12:49:40 5: Heizung sending 02                    
2013.06.01 12:49:40 5: SW: 02
2013.06.01 12:49:40 1: THZ_ReadAnswer
2013.06.01 12:49:40 1: THZ_Write
2013.06.01 12:49:40 5: Heizung sending 0100FCFB1003
2013.06.01 12:49:40 5: SW: 0100FCFB1003
2013.06.01 12:49:40 1: THZ_ReadAnswer
2013.06.01 12:49:40 1: THZ_Write
2013.06.01 12:49:40 5: Heizung sending 10
2013.06.01 12:49:40 5: SW: 10
2013.06.01 12:49:40 1: THZ_ReadAnswer
2013.06.01 12:49:40 1: THZ_Parse
2013.06.01 12:49:40 1: THZ_checksum
2013.06.01 12:50:07 1: THZ_GetUpdate
2013.06.01 12:50:07 1: THZ_Get
2013.06.01 12:50:07 1: THZ_Write
2013.06.01 12:50:07 5: Heizung sending 02
2013.06.01 12:50:07 5: SW: 02
2013.06.01 12:50:07 1: THZ_ReadAnswer
2013.06.01 12:50:07 1: THZ_Write
2013.06.01 12:50:07 5: Heizung sending 0100FCFB1003
2013.06.01 12:50:07 5: SW: 0100FCFB1003
2013.06.01 12:50:07 1: THZ_ReadAnswer
2013.06.01 12:50:07 1: THZ_Write
2013.06.01 12:50:07 5: Heizung sending 10
2013.06.01 12:50:07 5: SW: 10
2013.06.01 12:50:07 1: THZ_ReadAnswer
2013.06.01 12:50:07 1: THZ_Parse
2013.06.01 12:50:07 1: THZ_checksum
2013.06.01 12:50:12 1: THZ_GetUpdate
2013.06.01 12:50:12 1: THZ_Get
2013.06.01 12:50:12 1: THZ_Write
2013.06.01 12:50:12 5: Heizung sending 02
2013.06.01 12:50:12 5: SW: 02
2013.06.01 12:50:12 1: THZ_ReadAnswer
2013.06.01 12:50:12 1: /dev/ttyUSB0 disconnected, waiting to reappear

Leider komm ich dennoch nicht weiter. Gib es eigentlich sowas wie einen Debugger wo man Schritt für Schritt durch den Code geht, und immer sehen kann was passiert? Ich sehe hier nur das die Anlage mit FHEM "spricht" aber es gibt offensichtlich keine korrekte Interpretation der Daten die das logfile füllen.

Kann mir hier irgendjemand helfen? Gibt es noch den Google-Group USER Immi der hier so eine tolle vorarbeit geleistet hat? und der/die ggf. helfen kann?

Vielen Dank schon mal.



Heiner
--------------------------------
fhem auf Pi3+
CUL 868MHz, Signalduino 434MHz, HM-CFG-USB
HM, THZ, Kostal, Somfy, Conbee, Pytonbinding, FritzBox, FTUI, MQTT2

Heiner

Hi,

wenn ich das richtig sehe geht die Kommunikation laut Rober Prenz eigentlich so:
# would be a nice help in THZ.pm header
# 02                   THZ:10                       #are you ready?     THZ:ok
# 01 00 FE FD 10 03    THZ:10 02                    #Firmware No?       THZ:ok, are you ready?
# 10                   THZ:01 00 B5 FD 01 B6 10 03  #ok                 THZ:01 B6 is  Firmware
# 01 00 FC FB 10 03    THZ:10 02                    #Tell me the data?  THZ:ok, are you ready?
# 10                   THZ:"all Data"               #ok                 THZ:Data
#
# in general:          01 00 xx xx = Header
#                      10 03 = Footer

Das bedeutet in meinem Log dann wohl schlicht das die Anfrage kommt aber eben keine Antwort. Daraus schliesse ich das vermutlich der Speed noch nciht stimmt, also am besten mal mit einem Terminalprogramm direkt versuchen ob man die Kommunikation hinbekommt, also auf eine 02 die Antwort 10.
Heiner
--------------------------------
fhem auf Pi3+
CUL 868MHz, Signalduino 434MHz, HM-CFG-USB
HM, THZ, Kostal, Somfy, Conbee, Pytonbinding, FritzBox, FTUI, MQTT2

immi

Hallo zusammen
I had again some time during Christmas and therefore I restarted the porting to FHEM of a monitor interface for the tecalor/Eltron heatpump.
http://forum.fhem.de/index.php/topic,8018.msg53948.html

I am running it since ca 14 months and Heiner, Matthias and Steffen are kindly helping testing it. Some of them offered to write an how-to in german and make some support in the forum, sharing their experience. The  firmware of our heatpump is 4.39 but we have different THZ versions (403 and 303) and different serial interface speeds (57600 or 115200)
Please find  enclosed the THZ-module v0.060

config example:

  define Mythz THZ /dev/ttyUSB0@115200
  attr Mythz room waermepumpe
  define atMythzFB at +*00:05:00 {fhem "get Mythz allFB","1";;return()}   
  define atMythz09 at +*05:00:00 {fhem "get Mythz history","1";;return()}
  define FileLog_Mythz FileLog ./log/Mythz-%Y.log Mythz
  attr FileLog_Mythz logtype thz:plot,text
  attr FileLog_Mythz room waermepumpe
  define wal_0 SVG FileLog_Mythz:thz:CURRENT
  attr wal_0 room waermepumpe


with version 0.060:

  • All raw heatpump-registers of the tecalor can be read. Example for register FB. 53FBFDA8004D00EC00EC02C601CFFDA8FDA8002100F4200011000000000000000000000000004E0000000001E3052E0000000000000000
  • A parsing of the main registers has been implemented, allowing plotting of several status parameters. Example for the same register.
    outside_temp: 7.6 flow_temp: 23.5 return_temp: 23.6 hot_gas_temp: 71.4 dhw_temp: 46.2 flow_temp_HC2: -60 evaporator_temp: 3.2 condenser_temp: 24.4 Mixer_open: 0 Mixer_closed: 1 HeatPipeValve: 0 DiverterValve: 0 DHW_Pump: 0 HeatingCircuit_Pump: 0 Solar_Pump: 0 Compressor: 0 BoosterStage3: 0 BoosterStage2: 0 BoosterStage1: 0 HighPressureSensor: 1 LowPressureSensor: 0 EvaporatorIceMonitor: 0 SignalAnode: 0 EVU_release: 1 OvenFireplace: 0 STB: 0 OutputVentilatorPower: 0 InputVentilatorPower: 0 MainVentilatorPower: 0 OutputVentilatorSpeed: 0 InputVentilatorSpeed: 0 MainVentilatorSpeed: 0 Outside_tempFiltered: 7.8 Rel_humidity: 0 DEW_point: 483 P_Nd: 4.83 P_Hd: 13.31 Actual_power_Qc: 0 Actual_power_Pel: 0
  • The Pxx setting can be witten in the heatpump allowing a confortable change of temperature or ventilator speed. Example see image.
   
THZ.pm has been testd on fritzbox, nas-qnap, raspi and macos.
This module is not working if you have an older firmware; Nevertheless, "parsing" could be easily updated, because now the registers are well described.
https://answers.launchpad.net/heatpumpmonitor/+question/100347

In the next week-ends I would like to clean up and improove the readings.
I read cerefully the guidelines for developers and the discussions on the units % °C K bar kWh...

At the time, I am reading from the heatpump only a very small part of the available settings.
The heatpump is providing hundreds of parameters, and the units are somewhere necessary; otherwise the user would be very very confused.
Therefore I added (in some cases) the units  to the value during parsing.
I know this is very bad, but I do not have a better idea.
Actually I liked very much the proposal from Markus Block;
http://forum.fhem.de/index.php?topic=18238.0
readingsBulkUpdate($hash, $reading, $value, $changed, $unit)
But I acknolege that the vision of Rudolf has lead FHEM to a great architecture, and therefore I respect his opinion.


Any suggestion is very welcome, I do not want to leave the readings section like this.
Feel free to reply in german, I write faster in english if you do not mind.

l.g.
immi

micomat

Thanks a lot :)
Will try this instead of Robert Penz HeatpumpMonitor which is no longer supported.

Best,
Markus
Synology DS218+ with fhem+iobroker in docker, 2x RasPi w. ser2net, CUL433+868, IT, EGPM2LAN, THZ/LWZ, FB_Callmonitor, HMS100TF, Homematic, 2x TX3-TH, Pushover, USB-IR-SML-Head, SONOS, GHoma, MBus, KLF200

rudolfkoenig

immi asked me through a private message that i add a comment:

I don't really know what you expect: if you wish to add this module to the FHEM distribution, you are welcome, if you want to distributed by update, then you have to support it. Send me your sourceforge-id, so you can check in this module directly.

Btw.
- requiring the user to do some additional at definitions is unusual/inelegant, usually this is done by the module itself with InternalTimer.
- i have the feeling, that the module triggers one large/long reading instead of a list, if this is correct, than it makes reacting to only parts of this message harder then necessary.

immi

Hi Rudolf
Concerning InternalTimer; I used it in the previous version; I took it away thinking to give more power to the users. They decide to update what they want when they want. I can put it back. Easy.

The readings in the THZ_define subfunction have to be optimized, you are right; it is on my opl. I wanted to refresh all parameters once at the fhem-start.

Concerning  FHEM distribution, please wait; I would like to have more feedback from users before taking the ownership.

My big question still remains unsolved.
how can I implement units in readings (see my post above) in an elegant way?

thanks for your comments
immi

rudolfkoenig

ZitatThey decide to update what they want when they want.
They could also do that with attributes. I'm not against your solution, I just think it is unusual and inelegant. And this is only my opinion, and not the law.

Zitathow can I implement units in readings (see my post above) in an elegant way?
Just put it space separated after the value. Or set only the value, and describe the unit in the documentation.
A complete documentation should describe all possible events (see e.g. http://fhem.de/commandref.html#ZWaveevents), so that users can create notifies/FileLogs/etc before the first such event arrives (e.g. battery empty/etc).

micomat

Many many thanks to immi  :)
It's working absolutely perfect! I would say much better than the heatpumpmonitor from Robert :)

Best,
Markus
Synology DS218+ with fhem+iobroker in docker, 2x RasPi w. ser2net, CUL433+868, IT, EGPM2LAN, THZ/LWZ, FB_Callmonitor, HMS100TF, Homematic, 2x TX3-TH, Pushover, USB-IR-SML-Head, SONOS, GHoma, MBus, KLF200

micomat

Hey,

again thanks to immi for adding the collector_temp in v.0.061.
Now i can see all the plots i need, but i also want to see some additional information in the "room" where i have added the heating.
So how can i show the data from long readings like "history" or "allFB" as shown in the graphics added by immi? For example i want to display the compressor_heating value from the history reading.

Thanks for help :)
Attached is the V0.061 with the solar collector temp added.

Markus
Synology DS218+ with fhem+iobroker in docker, 2x RasPi w. ser2net, CUL433+868, IT, EGPM2LAN, THZ/LWZ, FB_Callmonitor, HMS100TF, Homematic, 2x TX3-TH, Pushover, USB-IR-SML-Head, SONOS, GHoma, MBus, KLF200

immi

Hi Markus
i do not know if I have got your question
if you want a title in plots you can use

define wal_2 SVG FileLog_Mythz:thz1:CURRENT
attr wal_2 title "Temp --> Max $data{max1}, Min $data{min1}, Current $data{currval1}"


if you want to show some values in a nice way, have a look at the new module readingsGroup
http://forum.fhem.de/index.php/topic,14425.210.html
It looks really great how Adam organized his data.

immi

micomat

Hi immi,

thanks for that hint :)
It's getting better and better. Configured 5 plots for the heatpump now.

Best,
Markus
Synology DS218+ with fhem+iobroker in docker, 2x RasPi w. ser2net, CUL433+868, IT, EGPM2LAN, THZ/LWZ, FB_Callmonitor, HMS100TF, Homematic, 2x TX3-TH, Pushover, USB-IR-SML-Head, SONOS, GHoma, MBus, KLF200

immi

Dear all
please find enclosed v 0.063:
I reintroduced InternalTimer for polling automatically some registers at regular intervals.
As suggested by Rudolf, you can now control the interval with an attribute.
define Mythz THZ /dev/ttyUSB0@115200
attr Mythz interval_allFB 300      # internal polling interval 5min 
attr Mythz interval_history 28800  # internal polling interval 8h   
define FileLog_Mythz FileLog ./log/Mythz-%Y.log Mythz

If the attributes interval_allFB and interval_history are not defined (or 0), their internal polling is disabled. 
Clearly you can also define the polling interval outside the module with the "at" command, as before.
define Mythz THZ /dev/ttyUSB0@115200
define atMythzFB at +*00:05:00 {fhem "get Mythz allFB","1";;return()}   
define atMythz09 at +*08:00:00 {fhem "get Mythz history","1";;return()}   
define FileLog_Mythz FileLog ./log/Mythz-%Y.log Mythz

     
Please test both configurations. Please tell me if you see differences or issues.
best regards
immi

@micomat: I am happy for your success!! Please share your plots, configs, and screenshots. Comment them in german, so that more users can benefit from the THZ module. 

micomat

#12
Heres my Config:

define Mythz THZ 192.168.18.151:2003
attr Mythz room Heizung
define atMythzFB at +*00:05:00 {fhem "get Mythz allFB","1";;return()}   
define atMythz09 at +*05:00:00 {fhem "get Mythz history","1";;return()}
define FileLog_Mythz FileLog ./log/Mythz-%Y.log Mythz
attr FileLog_Mythz logtype thz:plot,text
# attr FileLog_Mythz room Heizung
define plot_0 SVG FileLog_Mythz:thz:CURRENT
attr plot_0 room Heizung
define plot_1 SVG FileLog_Mythz:thz1:CURRENT
attr plot_1 room Heizung
define plot_2 SVG FileLog_Mythz:thz2:CURRENT
attr plot_2 room Heizung
define plot_3 SVG FileLog_Mythz:thz3:CURRENT
attr plot_3 room Heizung
define plot_4 SVG FileLog_Mythz:thz4:CURRENT
attr plot_4 room Heizung


Plots showing:
0 = Temperaturen mit Kollektor/Temps including solar collector
1 = Wassertemperaturen / water temps
2 = interne Druecke / internal pressures
3 = interne Temperaturen / internal temperatures
4 = Lüfter in % / Fans in percent

Ich kann gerne auch die plot-files bereitstellen.

Synology DS218+ with fhem+iobroker in docker, 2x RasPi w. ser2net, CUL433+868, IT, EGPM2LAN, THZ/LWZ, FB_Callmonitor, HMS100TF, Homematic, 2x TX3-TH, Pushover, USB-IR-SML-Head, SONOS, GHoma, MBus, KLF200

immi

#13
dear all
please find enclosed version 0.065

  • responsiveness during fhem-inizialization/startup improved
  • new parameters discovered and implemented: you can now set the holiday begin and end with fhem


immi

micomat

Synology DS218+ with fhem+iobroker in docker, 2x RasPi w. ser2net, CUL433+868, IT, EGPM2LAN, THZ/LWZ, FB_Callmonitor, HMS100TF, Homematic, 2x TX3-TH, Pushover, USB-IR-SML-Head, SONOS, GHoma, MBus, KLF200