diff --git a/CHANGED b/CHANGED index 876026e64..bb62b13b2 100644 --- a/CHANGED +++ b/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. + - feature: 70_BRAVIA: add requestReboot (thx schnakker) - change: 57_SSCal: commandref reviewed - feature: 98_RandomTimer: Add offState attribute to e.g. evaluate state reading instead of STATE; NOTE: this will be diff --git a/FHEM/70_BRAVIA.pm b/FHEM/70_BRAVIA.pm index 60e54fd29..a91ef7de5 100644 --- a/FHEM/70_BRAVIA.pm +++ b/FHEM/70_BRAVIA.pm @@ -24,6 +24,10 @@ # along with fhem. If not, see . # ############################################################################## +# +# 05.03.2020 Sandro Gertz: add "requestReboot" +# +############################################################################## package main; @@ -204,7 +208,6 @@ sub Get($@) { return "argument is missing" if ( int(@a) < 2 ); $what = $a[1]; - if ( $what =~ /^(power|presence|input|channel|volume|mute)$/ ) { my $value = ReadingsVal($name, $what, ""); if ($value ne "") { @@ -306,6 +309,7 @@ sub Set($@) { $usage .= " channel:$channels" if ( $channels ne "" ); $usage .= " openUrl application:" . $apps if ( $apps ne "" ); $usage .= " text" if (ReadingsVal($name, "requestFormat", "") eq "json"); + $usage .= " requestReboot:noArg " if (ReadingsVal($name, "requestFormat", "") eq "json"); my $cmd = ''; my $result; @@ -745,7 +749,13 @@ sub Set($@) { readingsSingleUpdate( $hash, "upnp", $a[2], 1 ) if ( ReadingsVal($name, "upnp", "") ne $a[2] ); } - + + # reboot + elsif ($a[1] eq "requestReboot") { + Log3($name, 2, "BRAVIA set $name " . $a[1]); + SendCommand( $hash, "requestReboot" ); + } + # text elsif ( $a[1] eq "text" ) { return "No 2nd argument given" if ( !defined( $a[2] ) ); @@ -2256,6 +2266,9 @@ sub GetNormalizedName($) {
  • requestFormat
    "xml" for xml based communication (models from 2011 and 2012)
    "json" for communication with models from 2013 and newer
  • +
  • requestReboot
    + Reboots the TV immediately. + This Feature is available on models from 2013 and newer.
  • remoteControl
    Sends command directly to TV.
  • statusRequest
    @@ -2337,7 +2350,7 @@ sub GetNormalizedName($) {