2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-01-31 06:39:11 +00:00

76_SMAInverter: readings bat_loadtotal / bat_loadtoday included, thanks to 300P

git-svn-id: https://svn.fhem.de/fhem/trunk@20399 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
nasseeder1 2019-10-23 16:48:57 +00:00
parent afaaff1bd7
commit 33d770a5f5
3 changed files with 356 additions and 297 deletions

View File

@ -1,5 +1,7 @@
# 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.
- change: 76_SMAInverter: readings bat_loadtotal / bat_loadtoday included,
thanks to 300P
- change: 70_SolarEdgeAPI: increment version number for previous change
- change: 70_SolarEdgeAPI: show SolarEdge logo to comply with API requirements
- update: 98_MSwitch: New Version 2.6a

File diff suppressed because it is too large Load Diff

View File

@ -23,16 +23,16 @@ package main;
use strict;
use warnings;
eval "use IO::Socket::INET;1" or my $MissModulSocket = "IO::Socket::INET";
eval "use DateTime;1" or my $MissModulDateTime = "DateTime";
eval "use IO::Socket::INET;1" or my $MissModulSocket = "IO::Socket::INET";
eval "use DateTime;1" or my $MissModulDateTime = "DateTime";
use Time::HiRes qw(gettimeofday tv_interval);
use Blocking;
use Time::Local;
eval "use FHEM::Meta;1" or my $modMetaAbsent = 1;
eval "use FHEM::Meta;1" or my $modMetaAbsent = 1;
# Versions History by DS_Starter
our %SMAInverter_vNotesIntern = (
"2.14.0" => "08.10.2019 readings bat_loadtotal (BAT_LOADTOTAL), bat_loadtoday (BAT_LOADTODAY) included by 300P",
"2.14.0" => "08.10.2019 readings bat_loadtotal (BAT_LOADTOTAL), bat_loadtoday (BAT_LOADTODAY) included by 300P, Forum: #topic,56080.msg986302.html#msg986302",
"2.13.4" => "30.08.2019 STP10.0-3AV-40 298 included into %SMAInverter_devtypes ",
"2.13.3" => "28.08.2019 commandref revised ",
"2.13.2" => "27.08.2019 fix WARNING: Use of uninitialized value \$_ in substitution (s///) at /opt/fhem//FHEM/Blocking.pm line 238 ",
@ -687,7 +687,7 @@ sub SMAInverter_getstatusDoParse($) {
($sup_DeviceStatus,$inv_STATUS,$inv_susyid,$inv_serial) = SMAInverter_SMAcommand($hash, $hash->{HOST}, 0x51800200, 0x00214800, 0x002148FF);
}
elsif ($i eq "sup_SpotBatteryLoad") {
($sup_SpotBatteryLoad,$inv_BAT_LOADTODAY,$inv_BAT_LOADTOTAL,$inv_susyid,$inv_serial) = SMAInverter_SMAcommand($hash, $hash->{HOST}, 0x54000200, 0x00461F00, 0x00461FFF);
($sup_SpotBatteryLoad,$inv_BAT_LOADTODAY,$inv_BAT_LOADTOTAL,$inv_susyid,$inv_serial) = SMAInverter_SMAcommand($hash, $hash->{HOST}, 0x54000200, 0x00496700, 0x004967FF);
}
}
@ -1210,12 +1210,7 @@ sub SMAInverter_SMAcommand($$$$$) {
return (1,$inv_SPOT_ETODAY,$inv_SPOT_ETOTAL,$inv_susyid,$inv_serial);
}
####300?
if($data_ID eq 0x461F) {
if($data_ID eq 0x4967) {
if (length($data) >= 66) {
$inv_BAT_LOADTOTAL = unpack("V*", substr($data, 62, 4));
} else {