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

Offline börni

  • Jr. Member
  • **
  • Beiträge: 91
Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
« Antwort #960 am: 27 August 2020, 08:53:57 »
Hello immi,

still the same situation ...
Any idea?

Thanks
Fabian
Loxberry auf RPi3 mit FHEM / LWZ303i V.2.06 / Loxone / eisfair Server (LMS/NAS/cloud/et.) / Fronius WR mit 9,3 kwp

Offline immi

  • Developer
  • Hero Member
  • ****
  • Beiträge: 1004
Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
« Antwort #961 am: 27 August 2020, 09:15:31 »
please use with 0.190 and attr Mythz simpleReadTimeout 2
would you mind posting your complete log  error file (like heiner)

9-10 hours of logs and  I can have a look this night
immi

Offline börni

  • Jr. Member
  • **
  • Beiträge: 91
Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
« Antwort #962 am: 27 August 2020, 12:18:32 »
Hello immi,

It looks that there are some improvements  :D

But still some messages/warnings in the log file:

2020.08.27 11:28:10 1: PERL WARNING: Use of uninitialized value $parts[1] in hash element at ./FHEM/95_Dashboard.pm line 754.
2020.08.27 11:28:10 1: PERL WARNING: Use of uninitialized value $groupname in hash element at ./FHEM/95_Dashboard.pm line 775.
2020.08.27 11:29:44 1: PERL WARNING: Use of uninitialized value $msg2 in concatenation (.) or string at ./FHEM/00_THZ.pm line 1427.
2020.08.27 11:29:44 1: PERL WARNING: Use of uninitialized value $msg2 in concatenation (.) or string at ./FHEM/00_THZ.pm line 1455.
2020.08.27 11:29:46 1: PERL WARNING: Use of uninitialized value $err in concatenation (.) or string at ./FHEM/00_THZ.pm line 1064.
2020.08.27 11:29:46 1: PERL WARNING: Use of uninitialized value in concatenation (.) or string at ./FHEM/00_THZ.pm line 1064.

Currently I don't see a need for sending you a complete log-file. If you would like to have I will sent it anyway.

Thanks and best Regards
Fabian
Loxberry auf RPi3 mit FHEM / LWZ303i V.2.06 / Loxone / eisfair Server (LMS/NAS/cloud/et.) / Fronius WR mit 9,3 kwp

Offline immi

  • Developer
  • Hero Member
  • ****
  • Beiträge: 1004
Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
« Antwort #963 am: 27 August 2020, 14:18:26 »
Hello immi,
It looks that there are some improvements  :D
But still some messages/warnings in the log file:
Currently I don't see a need for sending you a complete log-file. If you would like to have I will sent it anyway.
Thanks and best Regards
Fabian
Hi Fabian
happy version 0.190 works without errors also for your old 2.06.
did the errors stop with simpleReadTimeout 1 or simpleReadTimeout 2 or withot the attribute?

p.s. concerning the warnings of 95_Dashboard.pm you have to ask DS_Starter   in  Frontends
immi

Offline Stonemuc

  • Full Member
  • ***
  • Beiträge: 372
    • Baublog WeberHaus Citylife 500
Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
« Antwort #964 am: 06 September 2020, 20:31:02 »
sHC1 x72 is the dhwTemp
FHEM aus Raspberry PI 3 B+, Haussteuerung auf EnOcean Basis, Tecalor THZ 404eco Wärmepumpe

Offline TheTrumpeter

  • Sr. Member
  • ****
  • Beiträge: 667
Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
« Antwort #965 am: 08 September 2020, 21:30:40 »
sHC1 x72 is the dhwTemp
Not for me:
sDHW: dhwTemp: 32 outsideTemp: 14 dhwSetTemp: 39 compBlockTime: 0 out: 0000 heatBlockTime: 0 dhwBoosterStage: 0 pasteurisationMode: 0 dhwOpMode: setback x36: 496C
sHC1: outsideTemp: 13.9 x08: 31.5 returnTemp: 23.9 integralHeat: 170 flowTemp: 26.4 heatSetTemp: 8 heatTemp: 24.6 seasonMode: summer integralSwitch: 220 hcOpMode: setback roomSetTemp: 22.3 x60: 0 x64: 691.2 insideTempRC: 24.2 x72: 51.2 x76: 2.7 onHysteresisNo: 0 offHysteresisNo: 1 hcBoosterStage: 0
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)

Offline Stonemuc

  • Full Member
  • ***
  • Beiträge: 372
    • Baublog WeberHaus Citylife 500
Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
« Antwort #966 am: 08 September 2020, 22:00:09 »
Not for me:
sDHW: dhwTemp: 32 outsideTemp: 14 dhwSetTemp: 39 compBlockTime: 0 out: 0000 heatBlockTime: 0 dhwBoosterStage: 0 pasteurisationMode: 0 dhwOpMode: setback x36: 496C
sHC1: outsideTemp: 13.9 x08: 31.5 returnTemp: 23.9 integralHeat: 170 flowTemp: 26.4 heatSetTemp: 8 heatTemp: 24.6 seasonMode: summer integralSwitch: 220 hcOpMode: setback roomSetTemp: 22.3 x60: 0 x64: 691.2 insideTempRC: 24.2 x72: 51.2 x76: 2.7 onHysteresisNo: 0 offHysteresisNo: 1 hcBoosterStage: 0

Du scheinst doch Recht zu haben. Das war wohl zwei Tage lang nur Zufall...jetzt passt es bei mir auch nicht mehr..
« Letzte Änderung: 08 September 2020, 22:04:23 von Stonemuc »
FHEM aus Raspberry PI 3 B+, Haussteuerung auf EnOcean Basis, Tecalor THZ 404eco Wärmepumpe

Offline TheTrumpeter

  • Sr. Member
  • ****
  • Beiträge: 667
Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
« Antwort #967 am: 08 September 2020, 22:03:36 »
So I will continue with my "abstraction layer"; I've already started to define the message-names.
Does anybody know a good dictionary for technical abbreviations? Then I would define the message-names based on that; otherwise I will reuse something that was not intended to be used for heatpumps.
As I have not yet proceeded in defining the unified message-names, I'll just post the rest of the code.
It seems to work, if you find bugs just post it.

Call it via THZ_SplitReadings(a, b, c, d)
a is the name of your THZ-device in FHEM, e.g. Mythz
b is the suffix for your dummy-device where the messages will be posted in, e.g. when b is given as "Dummy" you need a dummy-device "MythzDummy" defined where the messages will be posted into. If you just give "", it should post the messages directly into the THZ-device, but I have not tested that.
c is the reading
d could be set to 0, then it will not generate "unified message names" but just take the definition out of the reading itself, e.g. "outsideTemp", "returnTemp" and so on. If you set it to 1, then it would take the "unified message names" that are not fully defined yet. It's almost done for sGlobal, sHC1 has dummy-definitions for testing purpose. All the others are still pending. If you set it to 1 it will only generate the messages for these two readings, but they might change in future versions.

In your dummy-device (e.g. MythzDummy or your THZ-device itself if you leave parameter b as "") you have to define readings for each of the THZ-readings you want to split with prefix "xMsgConfig_", e.g. "xMsgConfig_sGlobal". You have to give a 1 for each message you want to generate and a 0 for each message you're not interested in. E.g. "setreading MythzDummy xMsgConfig_sHC1 1011101111100100000" would config "outsideTemp", "returnTemp", "integralHeat", "flowTemp", ... but would not generate "x08". Just look at your readings from the left and give a 1 for the ones you want to generate and a 0 for the ones you want to skip.

Working example:
define MythzDummy as dummy
attr MythzDummy event-on-change-reading .*
attr MythzDummy event-on-update-reading $
setreading MythzDummy xMsgConfig_sGlobal 1110000000001101111000000011111111011110010111
setreading MythzDummy xMsgConfig_sHC1 1011101111100100000

Call it from a notify:
If you want the "unified message names" (not fully defined, see above):
define MythzDummy_notify notify Mythz:s.*:.* {THZ_SplitReadings($NAME,"Dummy",$EVENT,1)}Or without the "unified message names":
define MythzDummy_notify notify Mythz:s.*:.* {THZ_SplitReadings($NAME,"Dummy",$EVENT,0)}

And here's the subroutine, just put it in any of your 99_*.pm modules or create a new one.
sub THZ_SplitReadings ($$$$)
{
use feature "switch";

my ($Device, $Suffix, $Event, $UnifiedMsgNames) = @_;


my $Device_dmy = $Device.$Suffix;
my @Reading = split(' ', $Event);
chop($Reading[0]); #cut ":" after the name of the event
my $ConfigAttributeName = "xMsgConfig_".$Reading[0];
my $ConfigAttribute = ReadingsNum ("$Device_dmy", "$ConfigAttributeName", "");

if (substr($Reading[0], 0, 1) eq "s")
{
fhem ("setreading $Device_dmy $Reading[0] $Event");
}

if ($UnifiedMsgNames)
{
my @sGlobalMsgNames = ( "AmbAir_t", #OutsideTemp
"HtPmpWtrDsHC1_t", #FlowTempHC1
"HtPmpWtrUsHC1_t", #ReturnTempHC
"HtPmpHotGas_t", #HotgasTemp
"HtPmpDHW_t", #DHWTemp
"HtPmpWtrDsHC2_t", #FlowTempHC2
"HtPmpEvapr_t", #EvaporatorTemp
"HtPmpCndsr_t", #CondensorTemp
"HtPmpMxrOpen_st", #MixerOpen
"HtPmpMxrClsd_st", #MixerClosed
"HtPmpHtPipeVlv_st", #HeatPipeValve
"HtPmpDvtrVlv_st", #DiverterValve
"HtPmpDHWPmp_st", #DHWPump
"HtPmpHC1Pmp_st", #HC1Pump
"HtPmpSlrPmp_st", #SolarPump
"HtPmpCmpr_st", #Compressor
"HtPmpBstr3_st", #BoosterStage3
"HtPmpBstr2_st", #BoosterStage2
"HtPmpBstr1_st", #BoosterStage1
"HtPmpHiPSnsr_st", #HighPressureSensor
"HtPmpLoPSnsr_st", #LowPressureSensor
"HtPmpEvapIce_st", #EvaporatorIceMonitor
"HtPmpSgnlAnode_st", #SignalAnode
"HtPmpEVURels_st", #EVURelease
"HtPmpOvenFrplce_st", #OvenFireplace
"HtPmpSTB_st", #STB
"VentOutFanPwr_perc", #OutputFanPower
"VentInFanPwr_perc", #InputFanPower
"HtPmpMainFanPwr_perc", #MainFanPower
"VentOutFanSpd_n", #OutputFanSpeed
"VentInFanSpd_n", #InputFanSpeed
"HtPmpMainFanSpd_n", #MainFanSpeed
"AmbAirFild_t", #OutsideTempFlt
"InsdAirHum_perc", #RelHumidity
"InsdDew_t", #DewPoint
"msgPressure_LP", #
"msgPressure_HP", #
"HtPmpPwrActTherm_pwr", #PowerAct_Qc
"HtPmpPwrActElt_pwr", #PowerAct_Qel
"HtPmpCll_t", #CollectorTemp
"InsdAir_t", #InsideTemp
"VentWinOpn_st", #WindowOpen
"VentQuickVent_st", #QuickAirVent
"HtPmpFlowRate", #FlowRate
"HtPmpWtr_p", #PressureHC1
"VentOutAirHum_perc"); #HumidityAirOut

my @sHC1MsgNames = ( "AmbAir_t", #OutsideTemp
"HC1X08",
"HtPmpWtrUsHC1_t", #ReturnTempHC
"msgIntegralHeatHC1", #IntegralHeatHC1
"msgFlowTempHC1", #FlowTempHC1
"msgHeatSetTempHC1", #HeatSetTempHC1
"msgHeatTempHC1", #HeatTempHC1
"msgSeasonModeHC1", #SeasonModeHC1
"msgIntegralSwitchHC1", #IntegralSwitchHC1
"msgOpModeHC1", #OpModeHC1
"msgRoomSetTempHC1", #RoomSetTempHC1
"HC1X60",
"HC1X64",
"msgInsideTempRC", #InsideTempRC
"HC1X72",
"HC1X76",
"msgOnHysteresisNoHC1", #OnHysteresisNoHC1
"msgOffHysteresisNoHC1", #OffHysteresisNoHC1
"msgHCBoosterStageHC1"); #HCBoosterStageHC1

my @ReadingNames = ();
given($Reading[0])
{
when ("sGlobal") {@ReadingNames = @sGlobalMsgNames;}
when ("sHC1") {@ReadingNames = @sHC1MsgNames;}
default {}
}

for (my $i = 0; $i <= @ReadingNames; $i++)
{
if (substr($ConfigAttribute, $i, 1))
{
fhem ("setreading $Device_dmy $ReadingNames[$i] $Reading[$i*2+2]");
}
}
}
else
{
for (my $i = 0; $i <= @Reading/2 - 1; $i++)
{
if (substr($ConfigAttribute, $i, 1))
{
chop($Reading[$i*2+1]);
fhem ("setreading $Device_dmy $Reading[$i*2+1] $Reading[$i*2+2]");
}
}
}
}
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)

Offline TheTrumpeter

  • Sr. Member
  • ****
  • Beiträge: 667
Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
« Antwort #968 am: 08 September 2020, 22:05:43 »
Schau mal in's Timestamp deiner readings...ich glaube deine sDHW Werte stammen vermutlich von der Zeit vor der Erhitzung. Bei mir ist der sDHW Wert aktuell auch von heute morgen und der sHC1 von gerade eben...
Wenn ich beide aktualisiere mit get...sind beide Werte gleich.
Nein, die vorhin geposteten Readings waren/sind aktuell. Abgesehen davon, 51,2°C erreicht mein Speicher nie, die Parameter sind so gesetzt, dass bei 46,5°C Schluss ist.
Ich habe vorhin auch gegrept, x72 war den ganzen September über "31.5", obwohl sHC1 alle 5min ausgelesen wird.
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)

Offline immi

  • Developer
  • Hero Member
  • ****
  • Beiträge: 1004
Antw:THZ Tecalor (LWZ Stiebel Eltron) module support and code improvement.
« Antwort #969 am: 10 September 2020, 22:57:50 »
As I have not yet proceeded in defining the unified message-names, I'll just post the rest of the code.
nice solution: it will give more choice to the users;
see other possibilities
inside the module
attr Mythz userReadings userReadings msgFlowTempHC1:sHC1.* {THZ_Val("sHC1","flowTemp")}, AmbAir_t:sGlobal.* {THZ_Val("sGlobal","outsideTemp")}

or if you prefer an external doif

define DummyTHZ DOIF
attr DummyTHZ event_Readings                                   \
HC1msgFlowTemp:[Mythz:sHC1:[flowTemp. (-?\d+(\.\d+)?)]],       \
HC1returnTemp:[Mythz:sHC1:[returnTemp. (-?\d+(\.\d+)?)]],      \
HC1insideTempRC:[Mythz:sHC1:[insideTempRC. (-?\d+(\.\d+)?)]],  \
HC1outsideTemp:[Mythz:sHC1:[outsideTemp. (-?\d+(\.\d+)?)]],    \
GLOoutsideTemp:[Mythz:sGlobal:[outsideTemp. (-?\d+(\.\d+)?)]], \
GLOdhwTemp:[Mythz:sGlobal:[dhwTemp. (-?\d+(\.\d+)?)]]

or another external doif

define DummyTHZ DOIF ([Mythz:sHC1]) (                                               \
  setreading DummyTHZ     HC1msgFlowTemp     {(THZ_Val("sHC1","flowTemp"))},        \
  setreading DummyTHZ     HC1returnTemp      {(THZ_Val("sHC1","returnTemp"))},      \
  setreading DummyTHZ     HC1insideTempRC    {(THZ_Val("sHC1","insideTempRC"))},    \
  setreading DummyTHZ     HC1outsideTemp     {(THZ_Val("sHC1","outsideTemp"))}      \
)                                                                                   \
DOELSEIF ([Mythz:sGlobal]) (                                                        \
  setreading DummyTHZ     GLOoutsideTemp     {(THZ_Val("sGlobal","outsideTemp"))},  \
  setreading DummyTHZ     GLOdhwTemp         {(THZ_Val("sGlobal","dhwTemp"))}       \
)

 

decade-submarginal