diff --git a/fhem/CHANGED b/fhem/CHANGED index 9e1c2c880..c3ef4dbc2 100644 --- a/fhem/CHANGED +++ b/fhem/CHANGED @@ -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. + - feature: 74_AMADDevice: add class support for openApp, + fix bug then change attr remoteServer set Internal MODEL - change: 76_SMAInverter: readings bat_loadtotal / bat_loadtoday included, thanks to 300P - change: 70_SolarEdgeAPI: increment version number for previous change diff --git a/fhem/FHEM/73_AMADCommBridge.pm b/fhem/FHEM/73_AMADCommBridge.pm index 099c92ee3..e0a2535a5 100644 --- a/fhem/FHEM/73_AMADCommBridge.pm +++ b/fhem/FHEM/73_AMADCommBridge.pm @@ -1463,7 +1463,7 @@ sub ParseMsg($$) { "release_status": "stable", "license": "GPL_2", "version": "v4.4.3", - "x_flowsetversion": "4.4.2", + "x_flowsetversion": "4.4.3", "author": [ "Marko Oldenburg " ], diff --git a/fhem/FHEM/74_AMADDevice.pm b/fhem/FHEM/74_AMADDevice.pm index 723433857..909e2bc15 100644 --- a/fhem/FHEM/74_AMADDevice.pm +++ b/fhem/FHEM/74_AMADDevice.pm @@ -54,7 +54,7 @@ use FHEM::Meta; use Data::Dumper; #only for Debugging use GPUtils qw(GP_Import GP_Export); -require '73_AMADCommBridge.pm' unless ( defined( *{"main::AMADCommBridge_Initialize"} ) ); +main::LoadModule('AMADCommBridge'); my $missingModul = ''; eval "use Encode qw(encode encode_utf8);1" or $missingModul .= 'Encode '; @@ -358,6 +358,7 @@ sub Attr(@) { "AMADDevice ($name) - set remoteServer to other" ); } + $hash->{MODEL} = $attrVal; $hash->{DEF} = $hash->{HOST} . ' ' . $hash->{AMAD_ID} . ' ' . $attrVal; } @@ -783,15 +784,15 @@ sub Set($$@) { my $openurl = join( ' ', @args ); my $browser = AttrVal( $name, 'setOpenUrlBrowser', 'com.android.chrome|com.google.android.apps.chrome.Main' ); - my @browserapp = split( /\|/, $browser ); + my ($bapp,$bappclass) = split( /\|/, $browser ); $path .= 'openURL?url=' . $openurl . '&browserapp=' - . $browserapp[0] + . $bapp . '&browserappclass=' - . $browserapp[1]; + . $bappclass; $method = 'POST'; } @@ -817,9 +818,17 @@ sub Set($$@) { } elsif ( lc $cmd eq 'openapp' ) { - my $app = join( ' ', @args ); +# my $app = join( ' ', @args ); + my ($app,$appclass) = split( /\|/, $args[0] ); + + $path .= + 'openApp?app=' + . $app; + $path .= + '&appclass=' + . $appclass + if ( defined($appclass) ); - $path .= 'openApp?app=' . $app; $method = 'POST'; } @@ -1435,7 +1444,7 @@ sub CreateChangeBtDeviceValue($$) { Attribut