fhem und monitoring Stiebel Eltron LWZ 30X // Tecalor THZ 30X (Wärmepumpe)

982 views
Skip to first unread message

immi

unread,
Jun 23, 2012, 4:15:49 PM6/23/12
to fhem-...@googlegroups.com
Hallo zusammen
einfach so,
Ich habe ein Weihnachtsprojekt-2012: porting.

Die protokolle sind bekannt
http://robert.penz.name/heat-pump-lwz/
http://heatpumpmonitor.penz.name/heatpumpmonitorwiki/


immi
Message has been deleted

immi

unread,
Dec 22, 2012, 9:53:25 PM12/22/12
to fhem-...@googlegroups.com

Dear all

I found some time and I started implementing a new module for fhem
Thanks Pah, I inspired myself to your NT5000.pm and thanks Rudolf I copied a lot from your TCM.pm

fhem meets tecalor/StiebelEltron heat pump THZ.pm


No official protocol description is available from Tecalor/StiebelEltron: I started here:
viktor-volmut said on 2010-02-14:

https://answers.launchpad.net/heatpumpmonitor/+question/100347

Step 1)  hardware setup --> easy
the heat-pump THZ304 is connected to a serial interface RS-232 as described by Robert
http://robert.penz.name/heat-pump-lwz/
The serial is connected to an old fritzbox with a usb2serial adapter: I ordered the following material from an onlineshop.

Menge


Description

Price

1 Stück

971791

USB 2.0 Seriell Adapter USB 2.0 Stecker A / D-SUB-Stecker 9pol.

€ 14,95

1 Stück

715968

D-SUB Flip Top Gehäuse Pole: 9 A-FT 09 Assmann WSW

€ 0,93

1 Stück

743763

D-SUB, stehend Pole: 9 Buchse, gerade Löten A-DF 09 PP Assmann

€ 0,91

1 Stück

749745

Universal-MATE-N-LOK Steckverbinder, Steckergehäuse zur Verwendung mit Crimpkontakten Nennstrom=15 A Pole=1 x 3 350766-1

€ 0,38

8 Meter

600611

Telefoninnenkabel J-Y(ST)Y 2 x 2 x 0.8 mm Grau Meterware

€ 9,52

3 Stück

749901

Crimpkontakte für Universal-MATE-N-LOK Nennstrom=15 A Pole=1 926894-1 TE Connectivity

€ 0,51

Please check the serial speed: my THZ304 works at 115200; several older models have been reported to work at 57600 or even slower.

Just try the right speed for you.


Step 2) bridge to fhem server over ip
(not needed if you connect the serial interface directly).
I redirect the USBport with the serial adapter of the freetz to my NAS (QNAP119) where FHEM is running.
Both USBIP and SER2NET are widely available (e.g in Freetz)
USBIP provides remote access to a usb port from another linux computer. USBIP was a complete overkill for my intention so I decided for SER2NET, which is more stable and does not require any driver on the fhem server.


Step 3) THZ.pm

define Mythz THZ fritz.box:2003 # for local serial interface use "/dev/ttyUSB0@115200"
define FileLog_Mythz FileLog /Users/simone/dev/workspace/thz/log/Mythz-%Y.log Mythz
attr FileLog_Mythz logtype thz:plot, text


major issues// to do

  • clean up
  • understand and fix how the module interacts with filelog (in sub THZ_Get)
  • understand and fix how the module interprets the messages from the heatpump (THZ_Parse)
  • catch the answer from the pump in a more elegant way
  • implement other read activities and make THZ.pm compatible with different THZ/LWZ heatpumps
  • implement write activities (changing parameters on in the heatpump)
  • make more elegant the polling at regular intervals to obtain current reading


Now, the THZ module is very buggy but works.
I am using perl for the first time and I am just writing code late in the night when children are in bed.
It will take time to to reach a beta status but I will not give up.
The help of FHEM experts is clearly appreciated. In the case an angel finds time to support, it would make very sense to upload THZ.pm to http://fhem.svn.sourceforge.net


IMMI

00_THZ.pm
Reply all
Reply to author
Forward
0 new messages