THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.

Begonnen von immi, 02 Februar 2015, 11:42:16

Vorheriges Thema - Nächstes Thema

immi

Zitat von: Heiner am 29 April 2015, 22:07:18
Hi since 3 days I habe issues with the THZ module. I do not get ans data anymore and my log keeps empty.
If I do a manual GET i do geht this mesage: msg2 closed connection
I use V 141
Since when are you using v0141? I uploaded it 4 weeks ago. Can you exclude a problem with it?

I just looked at sysmon: it looks in all usb ports ... are you sure sysmon is not loaded in your fhem?

willybauss

#226
Zitat von: immi am 27 April 2015, 01:17:22
Hi Willy
no need for perl coding
try something like this

define opmodechange DOIF (([Mythz:sHC1:[insideTempRC. (\d+)]] < [Mythz:p01RoomTempNightHC1:d]) and ([Mythz:sHC1:pOpMode] eq "DHWmode")) (set Mythz pOpMode automatic)
attr opmodechange cmdpause 7200
attr opmodechange room heatpump

...
Hi immi,

unfortunately DOIF ends up in

Zitatopmodechange DOIF: unknown expression format: pOpMode
After having checked commandref and wiki I still don't understand the problem. Any idea from your side?
Willy

edit:
[Mythz:sHC1:pOpMode] has to be replaced by  [Mythz:pOpMode]   ==> fixed
FHEM auf Raspberry Pi B und 2B; THZ (THZ-303SOL), CUL_HM, TCM-EnOcean, SamsungTV, JSONMETER, SYSMON, OBIS, STATISTICS

willybauss

@immi:

Is the short syntax, e.g.  [Mythz:pOpMode]  limited to DOIF, of can it be a general replacement for the lengthy ReadingsVal(...) ?

I tried to use it in combination with a normal "if", but it doesn't seem to work.
FHEM auf Raspberry Pi B und 2B; THZ (THZ-303SOL), CUL_HM, TCM-EnOcean, SamsungTV, JSONMETER, SYSMON, OBIS, STATISTICS

immi

Zitat von: willybauss am 29 April 2015, 23:07:52
@immi:
Is the short syntax, e.g.  [Mythz:pOpMode]  limited to DOIF, of can it be a general replacement for the lengthy ReadingsVal(...) ?
I tried to use it in combination with a normal "if", but it doesn't seem to work.

TO my knoledge it is limited to some modules like DOIF or IF.... just look to commandref

pay attention it works in "IF" as module not as perl command: perl command are between { }

Der IF-Befehl dient in erster Linie zur Vereinfachung der Schreibweise in Kombination mit anderen FHEM-Modulen wie at, notify oder DOIF. Intern wird der IF-Befehl zur Ausführung in einen Perl if-Befehl umgesetzt. Das soll anhand von Beispielen verdeutlicht werden:

IF ([switch] eq "off") (set lamp on)
entspricht:
{if (Value('switch') eq "off"){fhem('set lamp on')}}


IF ([living_room:temperature] > 12) (set lamp on, set lamp2 off)
entspricht:
{if (ReadingVal('living_room','temperature','') > 12) {fhem('set lamp on');;fhem('set lamp2 off')}}


IF ([bathroom:humidity] > 70) (set led red) ELSE (set led green)
entspricht:
{if (ReadingsVal('bathroom','humidity','') > 70) {fhem('set led red')} else {fhem('set led green')}}



immi

Heiner

Hi Immi, Im pretty sure  Ihave 141 a liilte while, however can check with one older Version.

I realy wonder to be the only one....

Will try with Verbose 5 tötet some Logfile Feedback
Heiner
--------------------------------
fhem auf Pi3+
CUL 868MHz, Signalduino 434MHz, HM-CFG-USB
HM, THZ, Kostal, Somfy, Conbee, Pytonbinding, FritzBox, FTUI, MQTT2

Heiner

I found a older V108, same effect

I switched to verbose 5 but the log is not super helpfull
.2015.04.30 21:23:18 5: THZ_Get: Try to get 'p01RoomTempDayHC1'
2015.04.30 21:23:18 5: THZ_Get_Comunication: Check if port is open. State = '(automatic)'
2015.04.30 21:23:18 5: THZ_Get: Error msg2: 'closed connection'


If i do a shutdown Rastatt however the THZ reading works AG least once

Die anyone has any idea what I could check or change ?

All other Moduls seem to work fine.
Could it be a defect in my serial to USB converter? should that drive a General Debian log file somewhere?

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

immi

Hi Heiner
well it remains only to:
1) force update to all modules
2) restart the linux
3) post all logfiles (not only mythz) with verbose 5

immi

willybauss

Zitat von: immi am 30 April 2015, 13:56:50
TO my knoledge it is limited to some modules like DOIF or IF.... just look to commandref
..
Thanks. Looks like I should rework my code completely to shorten it by using IF instead of if.
FHEM auf Raspberry Pi B und 2B; THZ (THZ-303SOL), CUL_HM, TCM-EnOcean, SamsungTV, JSONMETER, SYSMON, OBIS, STATISTICS

immi

Zitat von: willybauss am 01 Mai 2015, 08:36:07
Thanks. Looks like I should rework my code completely to shorten it by using IF instead of if.
remember not to use IF between {}

willybauss

It looks like it's not possible to just redefine a previous  'at' or  'notify' into a 'DOIF'. The code is ok and acepted by fhem, but doesn't react on any events. I had to delete the previous definition first and then add the new one. This sequence works.

I started with switches etc. (can be tested easily) and will now go on with Mythz. I'll add the updated config code to the other thread as soon as it works well and is tested for a few days.
FHEM auf Raspberry Pi B und 2B; THZ (THZ-303SOL), CUL_HM, TCM-EnOcean, SamsungTV, JSONMETER, SYSMON, OBIS, STATISTICS

der-Lolo

DOIF and IF are quit easy to get things running, the syntax is easy to handle and nice to organize...
DOIF and IF can also work together... For example something like this...
([pl_soBad] eq "on") (
IF ([pr_soBad] eq "present")
   (IF ([player:config] eq "auto") (set sonos_Bad Volume 12,
   set sonos_Wohnzimmer AddMember sonos_Bad, attr pr_soBad disable 1,
   set EntertainmentEvents add Bad Lautsprecher im Automatikmode angeschaltet und zur Wohnzimmer Wiedergabe hinzugefügt...)
   ELSE (set EntertainmentEvents add Der Bad Lautsprecher ist im Sonossystem zur Wiedergabe bereit...,
   attr pr_soBad disable 1)
   )
ELSE
   (set pl_soBad off,set EntertainmentEvents add Netzwerkeinbindung missglückt, ich versuche den Player neu zu starten.,
   define at_pl_soBad at +00:00:05 set pl_soBad on)
)

I am using this modules for a longer time now - and i am still happy...

Heiner

Error found, but I do not get what is wrong.

the whole morning I played around with different fhem.cfg files.

Now I detected that the line

attr Heizung stateFormat pOpmode

cause the Problem.But why.

I just wanted to see on the Device that Popmode and it works and Shows "automatic" rather than "open" as without this Attribute. But it cause the Problem of not being able to perform any GET command anymore.

Is my idea wrong, or shall we state a hint in the Wiki?


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

immi

Zitat von: Heiner am 01 Mai 2015, 15:51:38
Error found,
attr Heizung stateFormat pOpmode
cause the Problem.But why.
I just wanted to see on the Device that Popmode and it works and Shows "automatic" rather than "open" as without this Attribute. But it cause the Problem of not being able to perform any GET command anymore.
Is my idea wrong, or shall we state a hint in the Wiki?
You cannot change the status of the interface. I check it before reading and writing


if you want to see or change the opmode, do something like this

define opmode readingsProxy Mythz:pOpMode
attr opmode alias Operation Mode
attr opmode group THZ
attr opmode room pompa
attr opmode setFn {$CMD = "$READING $CMD"}
attr opmode setList state:automatic,standby,DAYmode,setback,DHWmode,manual,emergency
attr opmode webCmd state



Heiner

Hi, comming back to Immi's Feedback from April:
ZitatActually for your application, you can connect the pool to HC1 with 2 valves controlling when do you want to heat the pool.

---
Moreover, in summer,  you could circulate HC1 in the pool and without any effort (1 pipe, 2 valves and 1 thermometer) you can cool down your living room in summer!!
Assume you have 26°C in your living room and 22 in the pool, you just have to circulate to cool down your livingroom.

I agree just one Heatcircle is needed. if I have a electrical 3way Valve to Switch "Vorlauf" between usual Heating circuit and "Poolwater heat exchanger" i do not really a second valve for the "Ruecklauf" - if nothing goes in, nothing can get out. Correct?

ok, so two elements I Need which are the 3-way valve and the heat exchanger. For a water heatexchanger there are some conditions to work more effectivly, one is a larger Delta Temp, the second is a larger flow.

I could now build a dummy which Switch my valve for
- a limited Duration:
- heating the pool (move 3 way valve into the other Position)
- increase flow temp (different heatcurve)
- increase flow (l/h)
- after the Duration move back to original values
- switch back valve

Question:

Can I somehow influence the flow of the pump with any given Parameter of the THZ? Or do I need to manually adjust at the pump itself?
Which Parameter do I change to what value to get a flow temp of ideally stable 50° at a outside temp of about 20°?

Asumme Sommermode must be at about 30°, to enable heating Option
Day Temp and Night Temp at about 50°
Gradient to 0
Flow Proportion ?
Low End ?

In case I would like to use this to cool down my home, I need a second valve to bring the flow from pump via poolhetexchanger to house heating and back to the pump. But being realistic, if i heat the Pool to about 25-27°, cooling the home is only usefull for outside temps beyond 30°. Can we Switch the heatpump on without heating, means in summermode?






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

immi

Zitat von: Heiner am 15 Mai 2015, 11:54:34
Question:
Can I somehow influence the flow of the pump with any given Parameter of the THZ? Or do I need to manually adjust at the pump itself?
Not to my knoledge
Zitat
Which Parameter do I change to what value to get a flow temp of ideally stable 50° at a outside temp of about 20°?
50°C vorlauf for the pool??
I wouldn´t do it
Zitat
In case I would like to use this to cool down my home, I need a second valve to bring the flow from pump via poolhetexchanger to house heating and back to the pump. But being realistic, if i heat the Pool to about 25-27°, cooling the home is only usefull for outside temps beyond 30°. Can we Switch the heatpump on without heating, means in summermode?
Yes, If the question is: can we switch the heatcircuit and the heatpump-compressor indipendently?
But you have to be very carefull in what you do; you could really damage your tecalor.
immi