THZ / LWZ Tecalor Stiebel Eltron Heizung

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

Vorheriges Thema - Nächstes Thema

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

micomat

Here is a plot file config from my setup:

# Created by FHEM/98_SVG.pm, 2014-01-31 14:27:59
set terminal png transparent size <SIZE> crop
set output '<OUT>.png'
set xdata time
set timefmt "%Y-%m-%d_%H:%M:%S"
set xlabel " "
set title 'Temperaturen'
set ytics
set y2tics
set grid
set ylabel "Temp"
set y2label "°C"

#FileLog 5:Mythz.allFB\x3a::
#FileLog 83:Mythz.allFB\x3a::
#FileLog 13:Mythz.allFB\x3a::

plot "<IN>" using 1:2 axes x1y2 title 'Aussen Temp' ls l0 lw 1 with lines,\
     "<IN>" using 1:2 axes x1y2 title 'Kollektor Temp' ls l1 lw 1 with lines,\
     "<IN>" using 1:2 axes x1y2 title 'Warmwasser' ls l2 lw 1 with lines


FileLog 5, 83 and 13 are the counts of the variables used in the graphs from the allFB output. Just separated by space. You can count on your own.

And here is the code from fhem.cfg
define plot0 SVG FileLog_Mythz:thz:CURRENT
attr plot0 room Heizung


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

olindner

Zitat von: micomat am 21 Februar 2014, 14:43:01
Okay, wie bist DU mit der 303 verbunden? Seriell oder USB?
Hast Du ein Terminalprogramm mit dem Du die grundlegende Kommunikation testen kannst?

Hallo Markus, ich habe einen USB to TTL RS232 Adapter "FTDI USB Serial Device converter now attached to ttyUSB0" am PI dran. Habe ich das falsche Kabel? :( Wie kann ich die Kommunikation unter Linux testen?

vielen Dank uvg Olaf

micomat

Hi,

also unter Linux hab ich immer das python tool von Robert Penz genutzt das dem heatpumpmointor beiliegt. Ich kenne leider derzeit kein passendes Terminalprogramm. Ob Minicom hex senden kann weiß ich nicht.

http://robert.penz.name/heat-pump-lwz/

Gruß
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

michaelk68

Hallo,

also ich habe jetzt mit meinem Laptop ein USB Kabel dran, mit hterm und 115K Baudrate kommt nach 2 eine 10 hex zurück.

Jetzt werd ich mich mal an die Installation von fhem auf meinem Raspi machen.
Kann ich mit dem Laptop noch mehr testen?

Gruß
Michael

micomat

perfekt also funktioniert die Verbindung.
mehr brauchst's du nicht zu testen :)
fhem ran konfig rein glücklich sein ;)
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

Great job Markus and Michael
in the meanwhile, I uploaded version 0.068; tomorrow you can test it with fhem update.

https://sourceforge.net/p/fhem/code/HEAD/tree/trunk/fhem/FHEM/00_THZ.pm

changelog
-- now you can also define the time at which holiday begins and ends (before was read-only)
-- corrected some typos

immi

willybauss

Zitat von: michaelk68 am 21 Februar 2014, 10:16:37
Hi,

I'm located in 88699, will test it over the weekend with an USB cable.
Do you have an idea, with which program I can test the connection under windows?

br
Michael
Hi Michael
,
I used Bray++for the same reason:  https://sites.google.com/site/terminalbpp/

Bray++'s advantage is that you can write macros to send a number of hex commands in sequence, including defineable delays. For example using the macro
$02%DLY0010$01$00$FE$FD$10$03%DLY0010$10
will do the whole communication in order to request the firmware revision from the THZ (while ignoring the intermediate answers from the THZ, but just waitung a few milliseconds, assuming that the answer is being sent correctly).

$02%DLY0010$01$00$FC$FB$10$03%DLY0010$10

will request the 59 byte data string instead.

So using one of these macros in Bray++'s hex mode you should get an answer. If not play a bit with the communication settings. These should be

8 data bits
no parity
1 stop bit
57600 or 115200 baud

Good luck
Willy
FHEM auf Raspberry Pi B und 2B; THZ (THZ-303SOL), CUL_HM, TCM-EnOcean, SamsungTV, JSONMETER, SYSMON, OBIS, STATISTICS

michaelk68

I'm a newbie to Fhem, could you quickly explain, what I need to do, to run your module in fhem.
In the meantime I installed fhem on my raspi and downloaded your module.
but whats next?

br
Michael

willybauss

unter Linux tut CuteCom gute Dienste als Terminalprogramm zum testen.
FHEM auf Raspberry Pi B und 2B; THZ (THZ-303SOL), CUL_HM, TCM-EnOcean, SamsungTV, JSONMETER, SYSMON, OBIS, STATISTICS

immi

Hi Michael
easy:
in ./fhem.cfg you fix all pathes and add

define Mythz THZ /dev/ttyUSB0@115200
define FileLog_Mythz FileLog ./log/Mythz-%Y.log Mythz


then you start fhem with

perl ./fhem.pl ./fhem.cfg


immi

michaelk68

Hi immi,

do I need to copy your module 00_THZ.pm anywhere within fhem?

Michael

immi

hi michael
the module 00_THZ should be in ./FHEM/

if you start fhem and give the command "update", you will fetch the new version in the right directory

after that, you restart
immi

willybauss

Was mir noch nicht klar ist: in welcher Form werden die ausgelesenen Daten gespeichert - z.B. sqlite-DB? Kann ich auch nachträglich noch z.B. eine Ein-Tages-Grafik von vor 3 Monaten abrufen und anzeigen? Kann ich den Speicherort z.B. per nfs mount auf mein NAS auslagern, um nicht pausenlos auf der SD-Karte des raspi rum schreiben zu müssen? Generell ist ja die SD-Karte mit ihren begrenzten Schreibzyklen der Hasenfuß des raspi ...
FHEM auf Raspberry Pi B und 2B; THZ (THZ-303SOL), CUL_HM, TCM-EnOcean, SamsungTV, JSONMETER, SYSMON, OBIS, STATISTICS

micomat

fhem schreibt die Daten in Text Logs. wo diese liegen ist frei definierbar.

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