From 376cb3d24efcc848a6da5802770eb272146f9fa0 Mon Sep 17 00:00:00 2001 From: LeonGaultier Date: Wed, 11 Mar 2020 03:49:16 +0000 Subject: [PATCH] 74_AMADDevice: add logreport is attribut fhemServerIP not set git-svn-id: https://svn.fhem.de/fhem/trunk@21406 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/CHANGED | 1 + fhem/FHEM/74_AMADDevice.pm | 24 ++++++++++++------------ 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/fhem/CHANGED b/fhem/CHANGED index c0f4ad06d..d127fc9cc 100644 --- a/fhem/CHANGED +++ b/fhem/CHANGED @@ -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. + - change: 74_AMADDevice: add logreport is attribut fhemServerIP not set - change: 93_DbRep: better logfile messages in some cases of index operation - feature: 44_TEK603: new attribute "disable" - change: 12_OilFox: package FHEM::OilFox diff --git a/fhem/FHEM/74_AMADDevice.pm b/fhem/FHEM/74_AMADDevice.pm index 909e2bc15..c6d0ad51b 100644 --- a/fhem/FHEM/74_AMADDevice.pm +++ b/fhem/FHEM/74_AMADDevice.pm @@ -277,7 +277,6 @@ sub Define($$) { $iodev = $hash->{IODev}->{NAME}; -# $hash->{VERSIONFLOWSET} = FHEM::Meta::Get( $defs{$iodev}, 'x_flowsetversion' ); $hash->{VERSIONFLOWSET} = $defs{$iodev}->{VERSIONFLOWSET}; my $d = $modules{AMADDevice}{defptr}{$amad_id}; @@ -358,7 +357,7 @@ sub Attr(@) { "AMADDevice ($name) - set remoteServer to other" ); } - $hash->{MODEL} = $attrVal; + $hash->{MODEL} = $attrVal; $hash->{DEF} = $hash->{HOST} . ' ' . $hash->{AMAD_ID} . ' ' . $attrVal; } @@ -510,6 +509,12 @@ sub GetUpdate($) { checkDeviceState($hash); } + elsif ( AttrVal( $bname, 'fhemServerIP', 'not set' ) ne 'not set' ) { + + Log3( $name, 1, +"AMADDevice ($name) - GetUpdate, attribut fhemServerIP not set in bridge device" + ); + } else { Log3( $name, 4, @@ -784,7 +789,7 @@ sub Set($$@) { my $openurl = join( ' ', @args ); my $browser = AttrVal( $name, 'setOpenUrlBrowser', 'com.android.chrome|com.google.android.apps.chrome.Main' ); - my ($bapp,$bappclass) = split( /\|/, $browser ); + my ( $bapp, $bappclass ) = split( /\|/, $browser ); $path .= 'openURL?url=' @@ -818,15 +823,10 @@ sub Set($$@) { } elsif ( lc $cmd eq 'openapp' ) { -# my $app = join( ' ', @args ); - my ($app,$appclass) = split( /\|/, $args[0] ); + my ( $app, $appclass ) = split( /\|/, $args[0] ); - $path .= - 'openApp?app=' - . $app; - $path .= - '&appclass=' - . $appclass + $path .= 'openApp?app=' . $app; + $path .= '&appclass=' . $appclass if ( defined($appclass) ); $method = 'POST'; @@ -1689,7 +1689,7 @@ sub CreateChangeBtDeviceValue($$) { ], "release_status": "stable", "license": "GPL_2", - "version": "v4.4.7", + "version": "v4.4.8", "author": [ "Marko Oldenburg " ],