50_MOBILEALERTSGW.pm: Added Internal lastGateway

git-svn-id: https://svn.fhem.de/fhem/trunk@29871 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
MarkusF
2025-04-18 12:52:00 +00:00
parent 4d01948eb1
commit 3d68b5867b
2 changed files with 8 additions and 6 deletions

View File

@@ -1,5 +1,6 @@
# Add changes at the top of the list. Keep it in ASCII, and 80-char wide. # 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 # Do not insert empty lines here, update check depends on it
- feature: 50_MOBILEALERTSGW: Added Internal lastGateway
- feature: 76_SolarForecast: Major release 1.51.0 - feature: 76_SolarForecast: Major release 1.51.0
- feature: 76_SolarForecast: Version 1.50.3 - feature: 76_SolarForecast: Version 1.50.3
- bufgix: 72_FRITZBOX: set <name> smartHome <deviceID> <tempOffset:value> - bufgix: 72_FRITZBOX: set <name> smartHome <deviceID> <tempOffset:value>

View File

@@ -267,8 +267,8 @@ sub MOBILEALERTSGW_Set ($$@) {
Log3 $MA_wname, 5, Log3 $MA_wname, 5,
"$MA_wname MOBILEALERTSGW: Good Checksum got: 0x" "$MA_wname MOBILEALERTSGW: Good Checksum got: 0x"
. sprintf( "%02X", $sum ); . sprintf( "%02X", $sum );
my %addvals = ( lastGateway => "Debuginsert");
Dispatch( $hash, $data, undef ); Dispatch( $hash, $data, \%addvals );
return undef; return undef;
} }
else { else {
@@ -476,7 +476,7 @@ sub MOBILEALERTSGW_Read($$) {
Log3 $MA_wname, 4, Log3 $MA_wname, 4,
"$MA_wname MOBILEALERTSGW: $MA_cname: Data from $gwserial $gwmac"; "$MA_wname MOBILEALERTSGW: $MA_cname: Data from $gwserial $gwmac";
MOBILEALERTSGW_DefaultAnswer($hash); MOBILEALERTSGW_DefaultAnswer($hash);
MOBILEALERTSGW_DecodeData( $hash, $POSTdata ); MOBILEALERTSGW_DecodeData( $hash, $gwserial, $POSTdata);
} }
else { else {
TcpServer_WriteBlocking( $MA_chash, TcpServer_WriteBlocking( $MA_chash,
@@ -572,8 +572,8 @@ sub MOBILEALERTSGW_DecodeInit($$) {
"$MA_wname MOBILEALERTSGW: Uptime (s): " . $upTime . " ID: " . $ID; "$MA_wname MOBILEALERTSGW: Uptime (s): " . $upTime . " ID: " . $ID;
} }
sub MOBILEALERTSGW_DecodeData($$) { sub MOBILEALERTSGW_DecodeData($$$) {
my ( $hash, $POSTdata ) = @_; my ( $hash, $gwserial, $POSTdata ) = @_;
my $verbose = GetVerbose($MA_wname); my $verbose = GetVerbose($MA_wname);
for ( my $pos = 0 ; $pos < length($POSTdata) ; $pos += MA_PACKAGE_LENGTH ) { for ( my $pos = 0 ; $pos < length($POSTdata) ; $pos += MA_PACKAGE_LENGTH ) {
@@ -605,7 +605,8 @@ sub MOBILEALERTSGW_DecodeData($$) {
"$MA_wname MOBILEALERTSGW: Data for $deviceID: " "$MA_wname MOBILEALERTSGW: Data for $deviceID: "
. unpack( "H*", $data ) . unpack( "H*", $data )
if ( $verbose >= 5 ); if ( $verbose >= 5 );
my $found = Dispatch( $defs{$MA_wname}, $data, undef ); my %addvals = ( lastGateway => $gwserial);
my $found = Dispatch( $defs{$MA_wname}, $data, \%addvals );
} }
} }
} }