Autor Thema: THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.  (Gelesen 201382 mal)

Offline Matthias-56

  • New Member
  • *
  • Beiträge: 18
Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
« Antwort #1035 am: 22 Oktober 2021, 12:47:32 »
test result from testserialthz.

PS H:\myFHEM> perl\bin\perl testserialthz.pl

----


Second Write attempted before First is done at testserialthz.pl line 34.
Use of uninitialized value $written in numeric ne (!=) at H:/MyFHEM/perl/vendor/lib/Win32/SerialPort.pm line 1580.
Second Read attempted before First is done at testserialthz.pl line 35.
Use of uninitialized value $got in numeric ne (!=) at H:/MyFHEM/perl/vendor/lib/Win32/SerialPort.pm line 1216.

----
Second Write attempted before First is done at testserialthz.pl line 41.
Use of uninitialized value $written in numeric ne (!=) at H:/MyFHEM/perl/vendor/lib/Win32/SerialPort.pm line 1580.
Second Read attempted before First is done at testserialthz.pl line 42.
Use of uninitialized value $got in numeric ne (!=) at H:/MyFHEM/perl/vendor/lib/Win32/SerialPort.pm line 1216.
PS H:\myFHEM>

Offline immi

  • Developer
  • Hero Member
  • ****
  • Beiträge: 1063
Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
« Antwort #1036 am: 22 Oktober 2021, 13:06:13 »
>>I'm using the FritzBox Remote USB now.
bad idea; please consider better architectures.
you have so many very robust possibilities for remote serial ports

you install fhem directly in the fritzbox (1)
or use ser2net on the  fritzbox   (2)
or use  fhem on a raspberry  (3)
or use  ser2net on a raspberry (4)
or use  fhem on a nas (5)

are you familiar with ser2net or with fhem2fhem?
immi

p.s. I use solution 2 since 8 years, sometimes with vpn and 700km in between :)

Offline Matthias-56

  • New Member
  • *
  • Beiträge: 18
Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
« Antwort #1037 am: 22 Oktober 2021, 14:18:43 »
you install fhem directly in the fritzbox (1)    --> don't like to modify the FritzBox
or use ser2net on the  fritzbox   (2)              --> found no description of this config and the need of a RS232 HW still remain
or use  fhem on a raspberry  (3)                  --> did You try to buy a raspi today?
or use  ser2net on a raspberry (4)                -->
or use  fhem on a nas (5)                            --> not availabel and not planned

In my understanding ser2net needs in any case an additional host for com port. I'm wrong?
Fritz USB remote do not need an additional host.

I use vnc to connect to the FHEM host = netbook.
Because power consumption of this netbook I would like to remove it.
One year ago I bought a rasberry 4 kit as a gift for a person.
Today same part nearly double price and not deliverabel.

Matthias

Offline immi

  • Developer
  • Hero Member
  • ****
  • Beiträge: 1063
Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
« Antwort #1038 am: 22 Oktober 2021, 14:52:25 »
In my understanding ser2net needs in any case an additional host for com port. I'm wrong?
Fritz USB remote do not need an additional host.
you can use the fritzbox with ser2net; https://github.com/Freetz-NG/freetz-ng and compile the additional ser2net
you need the additional host in the same way as for FritzUSB
the difference relies in a easier, leaner transport protocoll with works without windows drivers out of the box.
It is a very robust solution, which could be intimidating..... you need a new firmware for the fritzbox ... but it is much easier than debugging an api like  FritzUSB in windows.


just my two cents
immi

Online TheTrumpeter

  • Sr. Member
  • ****
  • Beiträge: 803
Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
« Antwort #1039 am: 12 November 2021, 10:25:07 »
Hi immi,

It seems that you changed some parameter names in one of the last releases:
p99CoolingHC1HysterFlowTemp (former p99CoolingHC1HystersisFlowTemp)
p99CoolingHC1HysterRoomTemp (forme p99CoolingHC1HystersisRoomTemp)

Luckily I noticed that change as I started writing a documentation which parameters have to be changed if the LWZ shall be operated without FHEM.
As I use these parameters in a module which optimizes cooling-performance the module will not work without changing the parameter-names.

Are there further changes like this?
FHEM auf RPi3, THZ (LWZ404SOL), RPII2C & I2C_MCP342x (ADCPiZero), PowerMap, CustomReadings, RPI_GPIO, Twilight, nanoCUL (WMBus für Diehl Wasserzähler & Regenerationszähler für BWT AqaSmart), ESPEasy, TPLinkHS110

Offline immi

  • Developer
  • Hero Member
  • ****
  • Beiträge: 1063
Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
« Antwort #1040 am: 12 November 2021, 16:45:40 »
It seems that you changed some parameter names in one of the last releases:
p99CoolingHC1HysterFlowTemp (former p99CoolingHC1HystersisFlowTemp)
p99CoolingHC1HysterRoomTemp (forme p99CoolingHC1HystersisRoomTemp)
Luckily I noticed that change as I started writing a documentation which parameters have to be changed if the LWZ shall be operated without FHEM.
Hi TheTrumpeter,
the change you are referring to, is probably 7-10 month old

Zitat
Are there further changes like this?
very unlikely but you can check yourself the history in github
https://github.com/mhop/fhem-mirror/commits/master/fhem/FHEM/00_THZ.pm
immi

Offline celle

  • New Member
  • *
  • Beiträge: 10
Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
« Antwort #1041 am: 12 November 2021, 20:15:23 »
Hello,

I have a THZ 5.5 Flex with inverter technology. With a simple CAN Bus can bus analyzer I get some extra parameters, which show the status of the inverter. Because there is no integral value like on the on of values this is needed for monitoring of the pump.

Here is my patch. Its working for about a year. Can you implement this in upstream?

--- 00_THZ.pm   2019-10-28 20:50:15.000000000 +0100
+++ 00_THZ.pm   2021-11-12 18:13:18.680032336 +0100
@@ -359,6 +359,8 @@
               ],
   "4temp"     => [["", 8, 4, "hex2int",2560]
              ],
+  "1int"     => [["", 8, 4, "hex2int",1]
+             ],
   "5temp"     => [["", 8, 4, "hex2int",10]
              ],
   "6gradient" => [["", 8, 4, "hex", 100]
@@ -779,6 +781,9 @@
   "sFlowRate"          => {cmd2=>"0A033B", type =>"1clean", unit =>" cl/min"},
   "sHumMaskingTime"    => {cmd2=>"0A064F", type =>"1clean", unit =>" min"},
   "sHumThreshold"      => {cmd2=>"0A0650", type =>"1clean", unit =>" %"},
+  "sHeizleistungRelativ"       => {cmd2=>"0A069A", type =>"1int", unit =>" %"},
+  "sVerdichterNSollUnbegrenzt" => {cmd2=>"0A069C", type =>"1clean", unit =>" Hz"},
+  "sVerdichterNSollBegrenzt"   => {cmd2=>"0A069D", type =>"1clean", unit =>" Hz"},
   "sOutputReduction"   => {cmd2=>"0A06A4", type =>"1clean", unit =>" %"},
   "sOutputIncrease"    => {cmd2=>"0A06A5", type =>"1clean", unit =>" %"},
   "sHumProtection"     => {cmd2=>"0A09D1", type =>"1clean", unit =>""},

Offline immi

  • Developer
  • Hero Member
  • ****
  • Beiträge: 1063
Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
« Antwort #1042 am: 12 November 2021, 22:47:34 »
Hi Celle
strange with the "lint" and 0A069A
normally "%" were implemented with 0clean or 1clean.
Maybe you can post 3 raw messages and your decoding? they are logged with verbose5
Would you mind suggesting a short engl. name for the added readings? if possible the same one of the tecalor manual.
thanks immi

Hi belu and godmorgon,
do you see any sideeffects with celle's patch?
immi

Offline celle

  • New Member
  • *
  • Beiträge: 10
Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
« Antwort #1043 am: 14 November 2021, 22:27:58 »
Here is the debug

2021.11.14 22:02:32.826 5: THZ_Get: Try to get 'sHeizleistungRelativ'
2021.11.14 22:02:32.826 5: THZ_Get_Comunication: Check if port is open. State = '(opened)'
2021.11.14 22:02:32.827 5: Mythz sending 02
2021.11.14 22:02:32.827 5: DevIo_SimpleWrite Mythz: 02
2021.11.14 22:02:32.828 5: Mythz start Function THZ_ReadAnswer
2021.11.14 22:02:32.828 5: THZ_ReadAnswer: uc unpack: '10'
2021.11.14 22:02:32.828 5: Mythz sending 0100AB0A069A1003
2021.11.14 22:02:32.828 5: DevIo_SimpleWrite Mythz: 0100AB0A069A1003
2021.11.14 22:02:32.830 5: Mythz start Function THZ_ReadAnswer
2021.11.14 22:02:32.830 5: THZ_ReadAnswer: uc unpack: '10'
2021.11.14 22:02:32.830 5: Mythz start Function THZ_ReadAnswer
2021.11.14 22:02:32.835 5: THZ_ReadAnswer: uc unpack: '02'
2021.11.14 22:02:32.835 5: Mythz sending 10
2021.11.14 22:02:32.835 5: DevIo_SimpleWrite Mythz: 10
2021.11.14 22:02:32.836 5: Mythz start Function THZ_ReadAnswer
2021.11.14 22:02:32.837 5: THZ_ReadAnswer: uc unpack: '0100CD0A069A00221003'
2021.11.14 22:02:32.837 5: Mythz sending 10
2021.11.14 22:02:32.837 5: DevIo_SimpleWrite Mythz: 10
2021.11.14 22:02:32.838 5: Parse message: CD0A069A0022
2021.11.14 22:02:32.839 5: Message length: 12

The 22 is hex. It should be 34%

For the names. The English manual says:
HTG OUTPUT RELATIVE %
COMP N SET VAL UNLTD Hz
COMPR. N SET VAL LTD Hz

I also tried to get COMPRSSR SET OUTPUT, but there I do not get a persistent value.

Online TheTrumpeter

  • Sr. Member
  • ****
  • Beiträge: 803
Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
« Antwort #1044 am: 15 November 2021, 10:52:56 »
Hi TheTrumpeter,
the change you are referring to, is probably 7-10 month old

Haven't updated for some time it seems.
FHEM auf RPi3, THZ (LWZ404SOL), RPII2C & I2C_MCP342x (ADCPiZero), PowerMap, CustomReadings, RPI_GPIO, Twilight, nanoCUL (WMBus für Diehl Wasserzähler & Regenerationszähler für BWT AqaSmart), ESPEasy, TPLinkHS110

Offline immi

  • Developer
  • Hero Member
  • ****
  • Beiträge: 1063
Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
« Antwort #1045 am: 15 November 2021, 18:55:53 »
Here is the debug
2021.11.14 22:02:32.838 5: Parse message: CD0A069A0022
The 22 is hex. It should be 34%
Hi,
1clean decodes your example perfectly, no need to add a new type; unless you find a different example

thanks for checking the engl manual, but they are really terrible names.
Why I  am boring about the names? I do not like to change them afterwards, and someone will have sideeffects like  TheTrumpeter.
The names of the readings should be self-explaining and not too long.
  "sHeatingRelPower"    => {cmd2=>"0A069A", type =>"1clean", unit =>" %"},
  "sComprUnlimit" => {cmd2=>"0A069C", type =>"1clean", unit =>" Hz"},
  "sComprLimit"    => {cmd2=>"0A069D", type =>"1clean", unit =>" Hz"},

I am also not really happy of my proposal. What is 0A069C-D? rotations of a compressor in Hz? or a frequency of an inverter?
immi

Offline celle

  • New Member
  • *
  • Beiträge: 10
Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
« Antwort #1046 am: 15 November 2021, 21:48:23 »
Hello,

It looks like the number of rotations of the compressor, because it is something between 20 and at most I think something about 120hz at max in my logs, where I forced it to max power and where it was cold.

I will try 1clean for the reading. For negative values for relative power I get 65535+relative power. With my 1int not. I get negative values on dhw mode, or if the internal integral goes down, if in spring or autumn I have a night reduction because I want to use my PV power on day.
« Letzte Änderung: 15 November 2021, 21:57:49 von celle »

Offline immi

  • Developer
  • Hero Member
  • ****
  • Beiträge: 1063
Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
« Antwort #1047 am: 16 November 2021, 20:52:49 »
I will try 1clean for the reading. For negative values for relative power I get 65535+relative power. With my 1int not. I get negative values on dhw mode...
I do not want to discuss if it makes sense a negative % of power. I just trust you :)
Please, give me 1 or 2 examples (raw data like CD0A069A0022) with the expected decoding an I will try to extend 1clean

It looks like the number of rotations of the compressor, because it is something between 20 and at most I think something about 120hz at max in....
Assuming they are rotation, what do you prefer?
  "sHeatingRelPower"  or "sHeatRelOutput"   or "sHeatingPowerRel"
  "sComprRotUnlimit"    or "sComprUnlimit"
  "sComprRotLimit"   or "sComprLimit"   
immi

Offline Noobie47

  • New Member
  • *
  • Beiträge: 7
Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
« Antwort #1048 am: 19 November 2021, 22:19:14 »
Hi,
 i am using a very first edition of  a Stiebel Eltron LWZ 303i. Maybe  the first one ever produced ;) There is no USB connectivity inside. I tried to establish a connection according to Robert Penz suggestion to build a cable and use also a RS232 to USB converter to my Raspberry. I got help from someone else in relation of configuration and editing plots.
It seems to run properly in fhem, but without real readings. Error message in THZ says:
 state opened 2021-11-19 12:23:35
z_Last_fhem_err
THZ_Get: Error msg2: THZ_ReadAnswer: InterfaceNotRespondig. Maybe too slow THZ_Get_Com: error found at step0 -- F4 ->
2021-11-19 22:13:07

Anyone a suggestion what went wrong? How can i alter the baudrates? I think i read somewhere, that it might help to change the rates from 115200 to somethng else.

Offline immi

  • Developer
  • Hero Member
  • ****
  • Beiträge: 1063
Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
« Antwort #1049 am: 20 November 2021, 06:52:07 »
Hi,
 i am using a very first edition of  a Stiebel Eltron LWZ 303i. Maybe  the first one ever produced ;) There is no USB connectivity inside. I tried to establish a connection according to Robert Penz suggestion to build a cable and use also a RS232 to USB converter to my Raspberry. I got help from someone else in relation of configuration and editing plots.
Have you had a working connection, in which you can read something from the tecalor, via serial terminal or via the software from RobertPenz?
if not please check the cable, see https://forum.fhem.de/index.php/topic,33211.msg1181408.html#msg1181408

concerning fhem: are you using window or linux or macos?
please post your fhem config
immi

 

decade-submarginal