diff --git a/fhem/FHEM/70_XBMC.pm b/fhem/FHEM/70_XBMC.pm index f6066ade0..367c9561f 100644 --- a/fhem/FHEM/70_XBMC.pm +++ b/fhem/FHEM/70_XBMC.pm @@ -29,7 +29,7 @@ sub XBMC_Initialize($$) $hash->{ReadFn} = "XBMC_Read"; $hash->{ReadyFn} = "XBMC_Ready"; $hash->{UndefFn} = "XBMC_Undefine"; - $hash->{AttrList} = "fork:enable,disable compatibilityMode:xbmc,plex offMode:quit,hibernate,shutdown,standby pingInterval powerCmdOn powerCmdOff " . $readingFnAttributes; + $hash->{AttrList} = "fork:enable,disable compatibilityMode:xbmc,plex offMode:quit,hibernate,shutdown,standby pingInterval " . $readingFnAttributes; $data{RC_makenotify}{XBMC} = "XBMC_RCmakenotify"; $data{RC_layout}{XBMC_RClayout} = "XBMC_RClayout"; @@ -75,21 +75,6 @@ sub XBMC_Define($$) return undef; } -sub XBMC_PowerCmd($$) -{ - my ($hash, $power) = @_; - - my $attrName = $power ? "powerCmdOn" : "powerCmdOff"; - my $cmdToExec = AttrVal($hash->{NAME}, $attrName, ''); - - return "Error: Attribute $attrName not set!" if (length($cmdToExec) == 0); - - # execute the power command - fhem($cmdToExec); - - return "Executed command: $cmdToExec"; -} - # Force a connection attempt to XBMC as soon as possible # (e.g. you know you just started it and want to connect immediately without waiting up to 60 s) sub XBMC_Connect($) @@ -851,12 +836,6 @@ sub XBMC_Set($@) elsif($cmd eq 'connect') { return XBMC_Connect($hash); } - elsif($cmd eq 'poweron') { - return XBMC_PowerCmd($hash, 1); - } - elsif($cmd eq 'poweroff') { - return XBMC_PowerCmd($hash, 0); - } my $res = "Unknown argument " . $cmd . ", choose one of " . "off play:all,audio,video,picture playpause:all,audio,video,picture pause:all,audio,video,picture " . "prev:all,audio,video,picture next:all,audio,video,picture goto stop:all,audio,video,picture " . @@ -893,7 +872,7 @@ sub XBMC_Set($@) "mute:toggle,on,off volume:slider,0,1,100 quit:noArg " . "eject:noArg hibernate:noArg reboot:noArg shutdown:noArg suspend:noArg " . "videolibrary:scan,clean audiolibrary:scan,clean statusRequest jsonraw " . - "connect poweron poweroff"; + "connect"; return $res ; } @@ -1459,8 +1438,6 @@ sub XBMC_HTTP_Request($$@)
attr <XBMC_device> fork enable
which will move the search for XBMC into a separate process.
-