mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-10 09:16:53 +00:00
70_PylonLowVoltage: print out faulty response with verbose 5
git-svn-id: https://svn.fhem.de/fhem/trunk@28532 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
aa273cc8ef
commit
5e5db69717
@ -1,5 +1,6 @@
|
||||
# Add changes at the top of the list. Keep it in ASCII, and 80-char wide.
|
||||
# Do not insert empty lines here, update check depends on it.
|
||||
- feature: 70_PylonLowVoltage: print out faulty response with verbose 5
|
||||
- bugfix: 88_HMCCU: fixed device detection bug
|
||||
- feature: 93_DbRep: sqlCmd executing ckey:latest possible
|
||||
- new: 73_PRESENCE2: cover version von 73_PRESENCE.pm
|
||||
|
@ -15,7 +15,7 @@
|
||||
# Copyright notice
|
||||
#
|
||||
# (c) 2019 Harald Schmitz (70_Pylontech.pm)
|
||||
# (c) 2023 Heiko Maaz
|
||||
# (c) 2023 - 2024 Heiko Maaz
|
||||
#
|
||||
# This script is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
@ -122,6 +122,7 @@ BEGIN {
|
||||
|
||||
# Versions History intern (Versions history by Heiko Maaz)
|
||||
my %vNotesIntern = (
|
||||
"0.2.1" => "18.02.2024 doOnError: print out faulty response, Forum:https://forum.fhem.de/index.php?msg=1303912 ",
|
||||
"0.2.0" => "15.12.2023 extend possible number of batteries up to 14 ",
|
||||
"0.1.11" => "28.10.2023 add needed data format to commandref ",
|
||||
"0.1.10" => "18.10.2023 new function pseudoHexToText in _callManufacturerInfo for translate battery name and Manufactorer ",
|
||||
@ -688,6 +689,7 @@ sub startUpdate {
|
||||
readings => $readings,
|
||||
sock => $socket,
|
||||
state => $errtxt,
|
||||
res => '',
|
||||
verbose => 3
|
||||
}
|
||||
);
|
||||
@ -769,6 +771,7 @@ sub _openSocket {
|
||||
doOnError ({ hash => $hash,
|
||||
readings => $readings,
|
||||
sock => $socket,
|
||||
res => '',
|
||||
state => 'disconnected'
|
||||
}
|
||||
);
|
||||
@ -786,6 +789,7 @@ sub _openSocket {
|
||||
or do { doOnError ({ hash => $hash,
|
||||
readings => $readings,
|
||||
state => 'no connection to RS485 gateway established',
|
||||
res => '',
|
||||
verbose => 3
|
||||
}
|
||||
);
|
||||
@ -844,6 +848,7 @@ sub _callSerialNumber {
|
||||
doOnError ({ hash => $hash,
|
||||
readings => $readings,
|
||||
sock => $socket,
|
||||
res => $res,
|
||||
state => $rtnerr
|
||||
}
|
||||
);
|
||||
@ -879,6 +884,7 @@ sub _callManufacturerInfo {
|
||||
doOnError ({ hash => $hash,
|
||||
readings => $readings,
|
||||
sock => $socket,
|
||||
res => $res,
|
||||
state => $rtnerr
|
||||
}
|
||||
);
|
||||
@ -920,6 +926,7 @@ sub _callProtocolVersion {
|
||||
doOnError ({ hash => $hash,
|
||||
readings => $readings,
|
||||
sock => $socket,
|
||||
res => $res,
|
||||
state => $rtnerr
|
||||
}
|
||||
);
|
||||
@ -954,6 +961,7 @@ sub _callSoftwareVersion {
|
||||
doOnError ({ hash => $hash,
|
||||
readings => $readings,
|
||||
sock => $socket,
|
||||
res => $res,
|
||||
state => $rtnerr
|
||||
}
|
||||
);
|
||||
@ -989,6 +997,7 @@ sub _callSystemParameters {
|
||||
doOnError ({ hash => $hash,
|
||||
readings => $readings,
|
||||
sock => $socket,
|
||||
res => $res,
|
||||
state => $rtnerr
|
||||
}
|
||||
);
|
||||
@ -1034,6 +1043,7 @@ sub _callAlarmInfo {
|
||||
doOnError ({ hash => $hash,
|
||||
readings => $readings,
|
||||
sock => $socket,
|
||||
res => $res,
|
||||
state => $rtnerr
|
||||
}
|
||||
);
|
||||
@ -1078,6 +1088,7 @@ sub _callChargeManagmentInfo {
|
||||
doOnError ({ hash => $hash,
|
||||
readings => $readings,
|
||||
sock => $socket,
|
||||
res => $res,
|
||||
state => $rtnerr
|
||||
}
|
||||
);
|
||||
@ -1126,6 +1137,7 @@ sub _callAnalogValue {
|
||||
doOnError ({ hash => $hash,
|
||||
readings => $readings,
|
||||
sock => $socket,
|
||||
res => $res,
|
||||
state => $rtnerr
|
||||
}
|
||||
);
|
||||
@ -1201,6 +1213,7 @@ sub _callAnalogValue {
|
||||
doOnError ({ hash => $hash,
|
||||
readings => $readings,
|
||||
sock => $socket,
|
||||
res => '',
|
||||
state => $err
|
||||
}
|
||||
);
|
||||
@ -1389,6 +1402,7 @@ sub doOnError {
|
||||
my $readings = $paref->{readings}; # Referenz auf das Hash der zu erstellenden Readings
|
||||
my $state = $paref->{state};
|
||||
my $socket = $paref->{sock};
|
||||
my $res = $paref->{res} // '';
|
||||
my $verbose = $paref->{verbose} // 4;
|
||||
|
||||
ualarm(0);
|
||||
@ -1400,6 +1414,11 @@ sub doOnError {
|
||||
|
||||
Log3 ($name, $verbose, "$name - ".$readings->{state});
|
||||
|
||||
if ($res) {
|
||||
Log3 ($name, 5, "$name - faulty data is printed out now: ");
|
||||
__resultLog ($hash, $res);
|
||||
}
|
||||
|
||||
_closeSocket ($hash);
|
||||
|
||||
return;
|
||||
|
@ -15,7 +15,7 @@
|
||||
# Copyright notice
|
||||
#
|
||||
# (c) 2019 Harald Schmitz (70_Pylontech.pm)
|
||||
# (c) 2023 Heiko Maaz
|
||||
# (c) 2023 - 2024 Heiko Maaz
|
||||
#
|
||||
# This script is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
@ -122,6 +122,7 @@ BEGIN {
|
||||
|
||||
# Versions History intern (Versions history by Heiko Maaz)
|
||||
my %vNotesIntern = (
|
||||
"0.2.1" => "18.02.2024 doOnError: print out faulty response, Forum:https://forum.fhem.de/index.php?msg=1303912 ",
|
||||
"0.2.0" => "15.12.2023 extend possible number of batteries up to 14 ",
|
||||
"0.1.11" => "28.10.2023 add needed data format to commandref ",
|
||||
"0.1.10" => "18.10.2023 new function pseudoHexToText in _callManufacturerInfo for translate battery name and Manufactorer ",
|
||||
@ -688,6 +689,7 @@ sub startUpdate {
|
||||
readings => $readings,
|
||||
sock => $socket,
|
||||
state => $errtxt,
|
||||
res => '',
|
||||
verbose => 3
|
||||
}
|
||||
);
|
||||
@ -769,6 +771,7 @@ sub _openSocket {
|
||||
doOnError ({ hash => $hash,
|
||||
readings => $readings,
|
||||
sock => $socket,
|
||||
res => '',
|
||||
state => 'disconnected'
|
||||
}
|
||||
);
|
||||
@ -786,6 +789,7 @@ sub _openSocket {
|
||||
or do { doOnError ({ hash => $hash,
|
||||
readings => $readings,
|
||||
state => 'no connection to RS485 gateway established',
|
||||
res => '',
|
||||
verbose => 3
|
||||
}
|
||||
);
|
||||
@ -844,6 +848,7 @@ sub _callSerialNumber {
|
||||
doOnError ({ hash => $hash,
|
||||
readings => $readings,
|
||||
sock => $socket,
|
||||
res => $res,
|
||||
state => $rtnerr
|
||||
}
|
||||
);
|
||||
@ -879,6 +884,7 @@ sub _callManufacturerInfo {
|
||||
doOnError ({ hash => $hash,
|
||||
readings => $readings,
|
||||
sock => $socket,
|
||||
res => $res,
|
||||
state => $rtnerr
|
||||
}
|
||||
);
|
||||
@ -920,6 +926,7 @@ sub _callProtocolVersion {
|
||||
doOnError ({ hash => $hash,
|
||||
readings => $readings,
|
||||
sock => $socket,
|
||||
res => $res,
|
||||
state => $rtnerr
|
||||
}
|
||||
);
|
||||
@ -954,6 +961,7 @@ sub _callSoftwareVersion {
|
||||
doOnError ({ hash => $hash,
|
||||
readings => $readings,
|
||||
sock => $socket,
|
||||
res => $res,
|
||||
state => $rtnerr
|
||||
}
|
||||
);
|
||||
@ -989,6 +997,7 @@ sub _callSystemParameters {
|
||||
doOnError ({ hash => $hash,
|
||||
readings => $readings,
|
||||
sock => $socket,
|
||||
res => $res,
|
||||
state => $rtnerr
|
||||
}
|
||||
);
|
||||
@ -1034,6 +1043,7 @@ sub _callAlarmInfo {
|
||||
doOnError ({ hash => $hash,
|
||||
readings => $readings,
|
||||
sock => $socket,
|
||||
res => $res,
|
||||
state => $rtnerr
|
||||
}
|
||||
);
|
||||
@ -1078,6 +1088,7 @@ sub _callChargeManagmentInfo {
|
||||
doOnError ({ hash => $hash,
|
||||
readings => $readings,
|
||||
sock => $socket,
|
||||
res => $res,
|
||||
state => $rtnerr
|
||||
}
|
||||
);
|
||||
@ -1126,6 +1137,7 @@ sub _callAnalogValue {
|
||||
doOnError ({ hash => $hash,
|
||||
readings => $readings,
|
||||
sock => $socket,
|
||||
res => $res,
|
||||
state => $rtnerr
|
||||
}
|
||||
);
|
||||
@ -1201,6 +1213,7 @@ sub _callAnalogValue {
|
||||
doOnError ({ hash => $hash,
|
||||
readings => $readings,
|
||||
sock => $socket,
|
||||
res => '',
|
||||
state => $err
|
||||
}
|
||||
);
|
||||
@ -1389,6 +1402,7 @@ sub doOnError {
|
||||
my $readings = $paref->{readings}; # Referenz auf das Hash der zu erstellenden Readings
|
||||
my $state = $paref->{state};
|
||||
my $socket = $paref->{sock};
|
||||
my $res = $paref->{res} // '';
|
||||
my $verbose = $paref->{verbose} // 4;
|
||||
|
||||
ualarm(0);
|
||||
@ -1400,6 +1414,11 @@ sub doOnError {
|
||||
|
||||
Log3 ($name, $verbose, "$name - ".$readings->{state});
|
||||
|
||||
if ($res) {
|
||||
Log3 ($name, 5, "$name - faulty data is printed out now: ");
|
||||
__resultLog ($hash, $res);
|
||||
}
|
||||
|
||||
_closeSocket ($hash);
|
||||
|
||||
return;
|
||||
|
Loading…
x
Reference in New Issue
Block a user