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: mlb am 21 Februar 2015, 17:21:53
sets p99startUnschedVent twice as expected, just second command always sets p99startUnschedVent to zero.
If this is true (and I do not understand why, strange), use { } syntax for notify and copy $EVENT in a variable, and then use the variable for setting.

willybauss

Zitat von: der-Lolo am 21 Februar 2015, 17:02:45
@willy: i was also working on USB problems today - maybe you will try to get the right device by using /dev/serial/by-id/ for me and the first one wire test environment everything looks fine that way without udev rules.
I don't understand completely - do you want me to update the links manually after reboot? If that works I could put this action into a fhem startup script easily.
FHEM auf Raspberry Pi B und 2B; THZ (THZ-303SOL), CUL_HM, TCM-EnOcean, SamsungTV, JSONMETER, SYSMON, OBIS, STATISTICS

der-Lolo

no, the idea behind that is not to point on a special port - pick the right device in your config with the id from the device, it doesnt matter if it is connected to usb0 usb1 or where ever...
have a look here...
http://forum.fhem.de/index.php/topic,30704.0.html

willybauss

#123
ok, understood. Now I did as follows - and it works:

Zitat$ ll  /dev/serial/by-id
total 0
drwxr-xr-x 2 root root 100 Jan  1  1970 .
drwxr-xr-x 4 root root  80 Jan  1  1970 ..
lrwxrwxrwx 1 root root  13 Jan  1  1970 usb-busware.de_CUL868-if00 -> ../../ttyACM0
lrwxrwxrwx 1 root root  13 Jan  1  1970 usb-EnOcean_GmbH_EnOcean_USB_300_DA_FTWMW5A3-if00-port0 -> ../../ttyUSB1
lrwxrwxrwx 1 root root  13 Jan  1  1970 usb-Prolific_Technology_Inc._USB-Serial_Controller_D-if00-port0 -> ../../ttyUSB0
pi@raspberrypi ~ $

Then I changed the USB port definition in fhem from
define Mythz THZ /dev/ttyUSB0@115200

into
define Mythz THZ /dev/serial/by-id/usb-Prolific_Technology_Inc._USB-Serial_Controller_D-if00-port0@115200

which obviously should work all the time, independent from sort order of the USB ports.

I did same for the other two devices. After a few days of testing incl. reboot of Raspi I'll add it to the beginner thread in the other forum thread.
FHEM auf Raspberry Pi B und 2B; THZ (THZ-303SOL), CUL_HM, TCM-EnOcean, SamsungTV, JSONMETER, SYSMON, OBIS, STATISTICS

der-Lolo

yes - thats the way it should work...
For one wire also - but i was not changing the ports right now, im not 100 percent sure.

your timestamp looks not good...

willybauss

that's the time stamp of the device files, which I can't change. The date itself is fine:
pi@raspberrypi ~ $ date
Sat Feb 21 20:21:43 CET 2015
pi@raspberrypi ~ $
FHEM auf Raspberry Pi B und 2B; THZ (THZ-303SOL), CUL_HM, TCM-EnOcean, SamsungTV, JSONMETER, SYSMON, OBIS, STATISTICS

mlb

Zitat von: immi am 21 Februar 2015, 18:25:40
If this is true (and I do not understand why, strange), use { } syntax for notify and copy $EVENT in a variable, and then use the variable for setting.

Somehow it's true, checked a couple of times... Indeed, the {} syntax works correctly  :)
define Notify_p99startUnschedVent notify Fan.Unscheduled {my $LastSetVent=$EVENT;;fhem("set Mythz p99startUnschedVent $LastSetVent;;sleep 3;;set Mythz p99startUnschedVent $LastSetVent;;sleep 15;;get Mythz sGlobal;;sleep 15;;get Mythz sGlobal")}
LWZ 403SOL, FHEM + HomeAssistant

THZ_Haus

Hallo,

wie kann ich gelesene Werte z.B. die Warmwassertemperatur überwachen.
Soll heißen Wert größer 50 Grad, dann soll eine E-Mail versendet werden.

Gleiches gilt bei Störungen, welche ausgelesen werden.

Solarview mit SAM BT, FHEM mit THZ 403 SOL, EDIMAX

der-Lolo

Für solche Sachen ist dieser Thread hier nicht gedacht...
Übrigens auch im erstem Post ist der Optimierungsbereich verlinkt -
http://forum.fhem.de/index.php/topic,33452.0.html.html
Les dort mal ein wenig!

immi

if you updated in the last days, you have seen 3 new parameters in sHC1, discovered by Andre
   
outsideTemp: 6.2 x08: 8.6 returnTemp: 24.6 integralHeat: 28 flowTemp: 25.1 heatSetTemp: 19.6 heatTemp: 24.6 seasonMode: winter integralSwitch: 101 opMode: standby roomSetTemp: 18 x60: 6.9 x64: 563.2 insideTempRC: 22 x72: 0 x76: 2.2 onHysteresisNo: 0 offHysteresisNo: 1 HCBoosterStage: 0

I still do not understand what they are for: do you want to keep them?

peter456

Zitat von: andre.k am 21 Februar 2015, 11:28:05
I just upgraded to version 0.134. Many thanks to immi for the graet functionality to write multi value registers.
@all: Could you please test the new version deeply, especially the users of old firmware. Here some new features:
- Writing of parameters/settings is possible for old firmware versions 2.x. In this version only p1..p12 are writable.
- Handling of different payload  for register pFAN  (p37...p46/p75) in firmaware 2.06 vs. 2.14
- New register sProgram (Not parsed in this version, please check the availibility of the register in Firmaware 2.06, in my 2.14 it exists and contains e.g. the operating mode (manual/automatic)

We would like your feedback befor we go further to implement additional set parameters. What use cases make sense in FHEM? Some parameter are may be too dangerous to change with FHEM.
Hallo Andre,
ich habe heute mein FHEM auf die Version 0.135 aktualisiert. Meine LWZ hat die Firmware 2.06.
Das Schreiben der Parameter p01-p12 funktioniert soweit richtig. Das funktioniert aber meistens erst beim 2. oder 3. Versuch. Die Komma-Werte (z.B. 22.1) werden anscheint schlechter übernommen als ganze Werte. Bei Parametern p08FanStageNight und p09FanStageStandby scheint das Lesen noch falsch programmiert zu sein. Wenn ich z.B. p08FanStageNight auswähle und dann "get" betätige, dann bekomme ich nicht den ausgelesenen Wert angezeigt, sondern das Auswahlfeld "get" wechselt von p08FanStageNight auf p01-p12.

Das Auslesen von pFan funktioniert jetzt auch bei meiner Firmware richtig. Super Arbeit von dir und von immi. Vielen Dank.
p37Fanstage1AirflowInlet: 115 p38Fanstage2AirflowInlet: 173 p39Fanstage3AirflowInlet: 230 p40Fanstage1AirflowOutlet: 115 p41Fanstage2AirflowOutlet: 163 p42Fanstage3AirflowOutlet: 230 p43UnschedVent3: 60 p44UnschedVent2: 60 p45UnschedVent1: 60 p46UnschedVent0: 60 p75PassiveCooling: 0 

Das neue Register sProgram wird bei mir so angezeigt:
05EE018F01010202000025F300000004B0000004B0
Gruß Peter

andre.k

Zitat von: immi am 22 Februar 2015, 10:40:03
if you updated in the last days, you have seen 3 new parameters in sHC1, discovered by Andre
   
outsideTemp: 6.2 x08: 8.6 returnTemp: 24.6 integralHeat: 28 flowTemp: 25.1 heatSetTemp: 19.6 heatTemp: 24.6 seasonMode: winter integralSwitch: 101 opMode: standby roomSetTemp: 18 x60: 6.9 x64: 563.2 insideTempRC: 22 x72: 0 x76: 2.2 onHysteresisNo: 0 offHysteresisNo: 1 HCBoosterStage: 0

I still do not understand what they are for: do you want to keep them?

Please keep it for watching. In the HCBoosterStage: I got the follwing values so far:
0=aus
1=Solar
2=V1

The other two parameter seems to be always 0 or 1 here is my output:

outsideTemp: 9.1 x08: -44.3 returnTemp: 27.4 integralHeat: -87 flowTemp: 31.9 heatSetTemp: 29 heatTemp: 28.6 seasonMode: winter integralSwitch: 100 opMode: normal roomSetTemp: 0 x60: 0 x64: -1433.6 insideTempRC: 0 x72: 0 x76: 0 onHysteresisNo: 1 offHysteresisNo: 0 HCBoosterStage: 2


andre.k

#132
Zitat von: peter456 am 22 Februar 2015, 11:52:56
Hallo Andre,
ich habe heute mein FHEM auf die Version 0.135 aktualisiert. Meine LWZ hat die Firmware 2.06.
Das Schreiben der Parameter p01-p12 funktioniert soweit richtig. Das funktioniert aber meistens erst beim 2. oder 3. Versuch. Die Komma-Werte (z.B. 22.1) werden anscheint schlechter übernommen als ganze Werte. Bei Parametern p08FanStageNight und p09FanStageStandby scheint das Lesen noch falsch programmiert zu sein. Wenn ich z.B. p08FanStageNight auswähle und dann "get" betätige, dann bekomme ich nicht den ausgelesenen Wert angezeigt, sondern das Auswahlfeld "get" wechselt von p08FanStageNight auf p01-p12.

Das Auslesen von pFan funktioniert jetzt auch bei meiner Firmware richtig. Super Arbeit von dir und von immi. Vielen Dank.
p37Fanstage1AirflowInlet: 115 p38Fanstage2AirflowInlet: 173 p39Fanstage3AirflowInlet: 230 p40Fanstage1AirflowOutlet: 115 p41Fanstage2AirflowOutlet: 163 p42Fanstage3AirflowOutlet: 230 p43UnschedVent3: 60 p44UnschedVent2: 60 p45UnschedVent1: 60 p46UnschedVent0: 60 p75PassiveCooling: 0 

Das neue Register sProgram wird bei mir so angezeigt:
05EE018F01010202000025F300000004B0000004B0
Gruß Peter
Hi Peter,

I have the same behavior. Sometimes I have to set parameter twice, probably a timing issue.
Concerning the p08 and p09 I have the same situation like you only in case of return value=0. When I get value=1..3 it works.
Andre

immi

Zitat von: andre.k am 22 Februar 2015, 14:02:05
I have the same behavior. Sometimes I have to set parameter twice, probably a timing issue.
I would introduce a 0.5s sleep after the reading the parent register ( line 832)
select(undef, undef, undef, 0.5);
Zitat
Concerning the p08 and p09 I have the same situation like you only in case of return value=0. When I get value=1..3 it works.
can you provide a log with verbose5?

peter456

Zitat von: immi am 22 Februar 2015, 17:15:54
I would introduce a 0.5s sleep after the reading the parent register ( line 832)
select(undef, undef, undef, 0.5);can you provide a log with verbose5?
Hi immi , I just run the commands p08 and p09 . The appendix is the log file with verbose 5.