From 06c19b179e47d269071b43a137543a3a92a6778f Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Sun, 11 Apr 2021 14:36:42 +0000 Subject: [PATCH 1/6] Automatic updated controls and CHANGED --- CHANGED | 1 + controls_BRAVIA.txt | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGED b/CHANGED index 4b43b71..05a0f00 100644 --- a/CHANGED +++ b/CHANGED @@ -1,3 +1,4 @@ +2021-04-11 - Merge branch 'master' into dev 2021-04-11 - SVN upload 2021-01-24 - Merge branch 'master' into dev 2021-01-24 - SVN upload diff --git a/controls_BRAVIA.txt b/controls_BRAVIA.txt index a12ddc0..2d59791 100644 --- a/controls_BRAVIA.txt +++ b/controls_BRAVIA.txt @@ -1 +1 @@ -UPD 2021-04-11_16:28:16 94150 FHEM/70_BRAVIA.pm +UPD 2021-04-11_16:31:40 94150 FHEM/70_BRAVIA.pm From afa16b48558849e892d4662ddf94608dca3f5ef4 Mon Sep 17 00:00:00 2001 From: vuffiraa72 Date: Tue, 17 May 2022 21:25:30 +0200 Subject: [PATCH 2/6] check state before renewing registration --- CHANGED | 35 ++++++++++++++++++++++++----------- FHEM/70_BRAVIA.pm | 2 +- 2 files changed, 25 insertions(+), 12 deletions(-) diff --git a/CHANGED b/CHANGED index 05a0f00..05a580d 100644 --- a/CHANGED +++ b/CHANGED @@ -1,17 +1,30 @@ -2021-04-11 - Merge branch 'master' into dev -2021-04-11 - SVN upload -2021-01-24 - Merge branch 'master' into dev -2021-01-24 - SVN upload +2021-04-11 - fix registration renewal 2021-01-14 - fix volume info from headphone 2020-11-16 - escape curly bracket in regexp 2020-07-14 - PBP: modifier with regular expressions -2020-07-02 - Merge branch 'master' into dev -2020-07-02 - SVN upload: getSupportedApiInfo if available +2020-07-14 - PBP: other issues +2020-07-14 - PBP: Lexical loop variables +2020-07-14 - PBP: return statement, indirect object syntax +2020-07-14 - PBP: subroutine prototypes +2020-07-14 - renamed package FHEM::BRAVIA 2020-07-02 - trigger getSupportedApiInfo if available only -2020-06-16 - Merge branch 'master' into dev -2020-06-16 - SVN upload: use audio service instead of upnp 2020-06-16 - use audio service instead of upnp -2020-06-06 - Merge branch 'master' into dev -2020-06-06 - SVN upload: fix register procedure -2020-06-06 - Merge branch 'dev' 2020-06-06 - setup github workflow +2020-06-06 - fix register procedure +2020-03-08 - Update controls_BRAVIA.txt +2020-03-07 - add documentation "requestReboot" +2020-03-07 - optimize "requestReboot" +2020-03-05 - add "requestReboot" +2020-01-06 - Merge commit 'f295750a00051fdc980d76eddf46253e90228fc7' into dev +2020-01-06 - Update README.pm +2020-01-01 - Update controls_BRAVIA.txt +2019-12-31 - Add attribute wolBroadcast +2019-12-31 - Add attribute wolBroadcast +2019-12-31 - Adopt README for dev branch +2019-12-30 - Upload latest version from SVN +2019-12-30 - Merge pull request #1 from fhem/add-license-1 +2019-12-30 - Create LICENSE +2019-12-20 - Update README.md +2019-12-20 - Create README.md +2019-12-20 - Rename BRAVIA/70_BRAVIA.pm to BRAVIA/FHEM/70_BRAVIA.pm +2019-12-20 - Rename 70_BRAVIA.pm to BRAVIA/70_BRAVIA.pm \ No newline at end of file diff --git a/FHEM/70_BRAVIA.pm b/FHEM/70_BRAVIA.pm index f02a043..ef330c9 100644 --- a/FHEM/70_BRAVIA.pm +++ b/FHEM/70_BRAVIA.pm @@ -791,7 +791,7 @@ sub SendCommand { my $return; my $requestFormat = ReadingsVal($name, "requestFormat", ""); - if ($service ne "register" && $service ne "getStatus") { + if ($service ne "register" && $service ne "getStatus" && ReadingsVal($name, "state", "") eq "on") { return if CheckRegistration($hash, $service, $cmd, $param, @successor); } From 679d181ba78b418f0f6aa0b0e7a636dbc9c37666 Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Tue, 17 May 2022 19:25:57 +0000 Subject: [PATCH 3/6] Automatic updated controls and CHANGED --- CHANGED | 1 + controls_BRAVIA.txt | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGED b/CHANGED index 05a580d..a6649f5 100644 --- a/CHANGED +++ b/CHANGED @@ -1,3 +1,4 @@ +2022-05-17 - check state before renewing registration 2021-04-11 - fix registration renewal 2021-01-14 - fix volume info from headphone 2020-11-16 - escape curly bracket in regexp diff --git a/controls_BRAVIA.txt b/controls_BRAVIA.txt index 2d59791..bf75b46 100644 --- a/controls_BRAVIA.txt +++ b/controls_BRAVIA.txt @@ -1 +1 @@ -UPD 2021-04-11_16:31:40 94150 FHEM/70_BRAVIA.pm +UPD 2022-05-17_21:25:30 94193 FHEM/70_BRAVIA.pm From a519a1ea76c539a8bef3715e31de5d8ed7b2336e Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Sun, 16 Jul 2023 16:56:16 +0000 Subject: [PATCH 4/6] Automatic updated controls and CHANGED --- controls_BRAVIA.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/controls_BRAVIA.txt b/controls_BRAVIA.txt index 0103f95..14bc8e0 100644 --- a/controls_BRAVIA.txt +++ b/controls_BRAVIA.txt @@ -1 +1 @@ -UPD 2023-07-16_18:10:54 94193 FHEM/70_BRAVIA.pm +UPD 2023-07-16_18:55:51 94193 FHEM/70_BRAVIA.pm From ce2ee0cac28a894b732cb2cf4809f995f843a8ce Mon Sep 17 00:00:00 2001 From: vuffiraa72 Date: Sun, 4 Aug 2024 13:17:04 +0200 Subject: [PATCH 5/6] add set enable / disable --- FHEM/70_BRAVIA.pm | 28 ++++++++++++++++++++++++---- 1 file changed, 24 insertions(+), 4 deletions(-) diff --git a/FHEM/70_BRAVIA.pm b/FHEM/70_BRAVIA.pm index 053eb3a..8f2d0f9 100644 --- a/FHEM/70_BRAVIA.pm +++ b/FHEM/70_BRAVIA.pm @@ -183,7 +183,7 @@ sub GetStatus { RemoveInternalTimer($hash); InternalTimer( gettimeofday() + $interval, \&GetStatus, $hash, 0 ); - return if ( AttrVal($name, "disable", 0) == 1 ); + return if ( ReadingsVal($name, "mode", "") eq "disabled" or AttrVal($name, "disable", 0) == 1 ); # check device availability if (!$update) { @@ -235,6 +235,7 @@ sub Set { my $inputs = ""; my $apps = ""; my $mutes = "toggle"; + my $mode = ReadingsVal($name, "mode", "enabled"); if ( ReadingsVal($name, "input", "") ne "-" ) { $hash->{helper}{lastInput} = ReadingsVal($name, "input", ""); @@ -308,7 +309,9 @@ 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"); + $usage .= " requestReboot:noArg" if (ReadingsVal($name, "requestFormat", "") eq "json"); + $usage .= " enable:noArg " if ( $mode ne "enabled" ); + $usage .= " disable:noArg " if ( $mode eq "enabled" ); my $cmd = ''; @@ -745,9 +748,9 @@ sub Set { # reboot elsif ($a[1] eq "requestReboot") { - Log3($name, 2, "BRAVIA set $name " . $a[1]); + Log3($name, 2, "BRAVIA set $name " . $a[1]); SendCommand( $hash, "requestReboot" ); - } + } # text elsif ( $a[1] eq "text" ) { @@ -760,6 +763,15 @@ sub Set { SendCommand( $hash, "text", $text ); } + # mode: enable / disable + elsif ( $a[1] eq "enable" or $a[1] eq "disable" ) { + Log3($name, 2, "BRAVIA set $name " . $a[1]); + if ( AttrVal($name, "disable", "") ) { + return ("device is deactivated by disable attribute, delete disable attribute first"); + } + readingsSingleUpdate( $hash, 'mode', $a[1] eq "enable" ? "enabled" : "disabled", 1 ); + } + # return usage hint else { return $usage; @@ -2330,6 +2342,10 @@ sub GetNormalizedName { Switches a channel back.
  • channelUp
    Switches a channel forward.
  • +
  • enable
    + Enables the internal task to pull the status and other information from the TV.
  • +
  • disable
    + Disables the internal task to pull the status and other information from the TV.
  • input
    List of input channels. Imputs are available with models from 2013 and newer.
  • @@ -2452,6 +2468,10 @@ sub GetNormalizedName { Einen Kanal zurück schalten.
  • channelUp
    Einen Kanal weiter schalten.
  • +
  • enable
    + Aktiviert den internen Task zum regelmäßigen Abrufen des Status des TV und weiterer Informationen.
  • +
  • disable
    + Unterbricht den internen Task zum regelmäßigen Abrufen des Status des TV und weiterer Informationen.
  • input
    Liste der Eingänge. Eingänge sind ab Modelljahr 2013 verfügbar.
  • From 0f3d4c9d5c3cffaadaffde9f8d6329eb83020669 Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Sun, 4 Aug 2024 11:17:21 +0000 Subject: [PATCH 6/6] Automatic updated controls and CHANGED --- CHANGED | 1 + controls_BRAVIA.txt | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGED b/CHANGED index 123dd59..896ba0e 100644 --- a/CHANGED +++ b/CHANGED @@ -1,3 +1,4 @@ +2024-08-04 - add set enable / disable 2022-05-17 - check state before renewing registration 2021-04-11 - fix registration renewal 2021-01-14 - fix volume info from headphone diff --git a/controls_BRAVIA.txt b/controls_BRAVIA.txt index 14bc8e0..00ca271 100644 --- a/controls_BRAVIA.txt +++ b/controls_BRAVIA.txt @@ -1 +1 @@ -UPD 2023-07-16_18:55:51 94193 FHEM/70_BRAVIA.pm +UPD 2024-08-04_13:17:04 95414 FHEM/70_BRAVIA.pm