From 3382f84606a817ae1df7f95a9cbc3759a292c8bc Mon Sep 17 00:00:00 2001 From: Marko Oldenburg Date: Sun, 25 Dec 2022 17:36:24 +0100 Subject: [PATCH 1/3] add new reading power for msg support --- controls_LGTV_WebOS.txt | 2 +- lib/FHEM/Devices/LGTV/LGTVWebOS.pm | 21 +++++++++++++-------- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/controls_LGTV_WebOS.txt b/controls_LGTV_WebOS.txt index 69ab362..3a65761 100644 --- a/controls_LGTV_WebOS.txt +++ b/controls_LGTV_WebOS.txt @@ -1,2 +1,2 @@ UPD 2022-03-31_06:48:33 18968 FHEM/82_LGTV_WebOS.pm -UPD 2022-03-31_14:55:57 55129 lib/FHEM/Devices/LGTV/LGTVWebOS.pm +UPD 2022-12-25_17:34:32 55512 lib/FHEM/Devices/LGTV/LGTVWebOS.pm diff --git a/lib/FHEM/Devices/LGTV/LGTVWebOS.pm b/lib/FHEM/Devices/LGTV/LGTVWebOS.pm index 92c3184..e9707c1 100644 --- a/lib/FHEM/Devices/LGTV/LGTVWebOS.pm +++ b/lib/FHEM/Devices/LGTV/LGTVWebOS.pm @@ -53,7 +53,7 @@ BEGIN { init_done selectlist defs - ) + ) ); } @@ -133,7 +133,7 @@ my %lgCommands = ( "getAudioStatus" => ["ssap://audio/getStatus"], "getCurrentChannel" => ["ssap://tv/getCurrentChannel"], "getChannelProgramInfo" => ["ssap://tv/getChannelProgramInfo"], - "getForegroundAppInfo" => + "getForegroundAppInfo" => ["ssap://com.webos.applicationManager/getForegroundAppInfo"], "getAppList" => ["ssap://com.webos.applicationManager/listApps"], "getAppStatus" => ["ssap://com.webos.service.appstatus/getAppStatus"], @@ -156,12 +156,12 @@ my %lgCommands = ( "closeApp" => ["ssap://system.launcher/close"], "openApp" => ["ssap://system.launcher/open"], "closeWebApp" => ["ssap://webapp/closeWebApp"], - "openChannel" => [ "ssap://tv/openChannel", "channelNumber" ], + "openChannel" => [ "ssap://tv/openChannel", "channelNumber" ], "launchApp" => [ "ssap://system.launcher/launch", "id" ], "screenMsg" => [ "ssap://system.notifications/createToast", "message" ], - "mute" => [ "ssap://audio/setMute", "mute" ], - "volume" => [ "ssap://audio/setVolume", "volume" ], - "switchInput" => [ "ssap://tv/switchInput", "input" ], + "mute" => [ "ssap://audio/setMute", "mute" ], + "volume" => [ "ssap://audio/setVolume", "volume" ], + "switchInput" => [ "ssap://tv/switchInput", "input" ], ); my %openApps = ( @@ -363,6 +363,8 @@ sub TimerStatusRequest { else { ::readingsBulkUpdateIfChanged( $hash, 'state', 'off' ) if ( ::ReadingsVal( $name, 'state', 'off' ) ne 'off' ); + ::readingsBulkUpdateIfChanged( $hash, 'power', 'off' ) + if ( ::ReadingsVal( $name, 'power', 'off' ) ne 'off' ); Presence($hash) if ( ::AttrVal( $name, 'pingPresence', 0 ) == 1 ); @@ -686,6 +688,7 @@ sub Close { delete( $hash->{FD} ); ::readingsSingleUpdate( $hash, 'state', 'off', 1 ); + ::readingsSingleUpdate( $hash, 'power', 'off', 1 ); ::Log3( $name, 4, "LGTV_WebOS ($name) - Socket Disconnected" ); @@ -962,6 +965,7 @@ sub ResponseProcessing { "LGTV_WebOS ($name) - Sucessfull WS connection to $hash->{HOST}" ); ::readingsSingleUpdate( $hash, 'state', 'on', 1 ); + ::readingsSingleUpdate( $hash, 'power', 'on', 1 ); } else { @@ -1342,6 +1346,7 @@ sub WriteReadings { } ::readingsBulkUpdateIfChanged( $hash, 'state', 'on' ); + ::readingsBulkUpdateIfChanged( $hash, 'power', 'on' ); ::readingsEndUpdate( $hash, 1 ); @@ -1409,7 +1414,7 @@ sub Pairing { "signatures" => [ { "signatureVersion" => 1, - "signature" => + "signature" => "eyJhbGdvcml0aG0iOiJSU0EtU0hBMjU2Iiwia2V5SWQiOiJ0ZXN0LXNpZ25pbmctY2VydCIsInNpZ25hdHVyZVZlcnNpb24iOjF9.hrVRgjCwXVvE2OOSpDZ58hR+59aFNwYDyjQgKk3auukd7pcegmE2CzPCa0bJ0ZsRAcKkCTJrWo5iDzNhMBWRyaMOv5zWSrthlf7G128qvIlpMT0YNY+n/FaOHE73uLrS/g7swl3/qH/BGFG2Hu4RlL48eb3lLKqTt2xKHdCs6Cd4RMfJPYnzgvI4BNrFUKsjkcu+WD4OO2A27Pq1n50cMchmcaXadJhGrOqH5YmHdOCj5NSHzJYrsW0HPlpuAx/ECMeIZYDh6RMqaFM2DXzdKX9NmmyqzJ3o/0lkk/N97gfVRLW5hA29yeAwaCViZNCP8iC9aO0q9fQojoa7NQnAtw==" } ] @@ -1440,7 +1445,7 @@ sub CreateSendCommand { if ( $type ne 'register' ); $command->{id} = $type . "_" . ::gettimeofday(); $command->{type} = $type; - $command->{uri} = $uri if ($uri); + $command->{uri} = $uri if ($uri); $command->{payload} = $payload if ( defined($payload) ); #::Log3( $name, 5, "LGTV_WebOS ($name) - Payload Message: $command->{payload}{message}" ); -- 2.45.2 From 6bb3a5971c29aa28efe8a0ca6f309da79fa53908 Mon Sep 17 00:00:00 2001 From: Marko Oldenburg Date: Tue, 16 May 2023 04:08:38 +0200 Subject: [PATCH 2/3] [optional scope]: [optional body] [Ticket: no] --- FHEM/82_LGTV_WebOS.pm | 2 +- controls_LGTV_WebOS.txt | 4 ++-- lib/FHEM/Devices/LGTV/LGTVWebOS.pm | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/FHEM/82_LGTV_WebOS.pm b/FHEM/82_LGTV_WebOS.pm index 8f69fcd..8f5cc4c 100644 --- a/FHEM/82_LGTV_WebOS.pm +++ b/FHEM/82_LGTV_WebOS.pm @@ -2,7 +2,7 @@ # # Developed with VSCodium and richterger perl plugin. # -# (c) 2017-2022 Copyright: Marko Oldenburg (fhemdevelopment at cooltux dot net) +# (c) 2017-2023 Copyright: Marko Oldenburg (fhemdevelopment at cooltux dot net) # All rights reserved # # Special thanks goes to comitters: diff --git a/controls_LGTV_WebOS.txt b/controls_LGTV_WebOS.txt index 3a65761..eff5ab3 100644 --- a/controls_LGTV_WebOS.txt +++ b/controls_LGTV_WebOS.txt @@ -1,2 +1,2 @@ -UPD 2022-03-31_06:48:33 18968 FHEM/82_LGTV_WebOS.pm -UPD 2022-12-25_17:34:32 55512 lib/FHEM/Devices/LGTV/LGTVWebOS.pm +UPD 2023-05-16_04:07:27 18968 FHEM/82_LGTV_WebOS.pm +UPD 2023-05-16_04:07:11 55512 lib/FHEM/Devices/LGTV/LGTVWebOS.pm diff --git a/lib/FHEM/Devices/LGTV/LGTVWebOS.pm b/lib/FHEM/Devices/LGTV/LGTVWebOS.pm index e9707c1..e8cd3c2 100644 --- a/lib/FHEM/Devices/LGTV/LGTVWebOS.pm +++ b/lib/FHEM/Devices/LGTV/LGTVWebOS.pm @@ -2,7 +2,7 @@ # # Developed with VSCodium and richterger perl plugin. # -# (c) 2017-2022 Copyright: Marko Oldenburg (fhemdevelopment at cooltux dot net) +# (c) 2017-2023 Copyright: Marko Oldenburg (fhemdevelopment at cooltux dot net) # All rights reserved # # Special thanks goes to comitters: -- 2.45.2 From b812c8b9ba6c9e640c3e2b0148c4950157491c3a Mon Sep 17 00:00:00 2001 From: Marko Oldenburg Date: Tue, 16 May 2023 04:16:43 +0200 Subject: [PATCH 3/3] version change [Ticket: no] --- FHEM/82_LGTV_WebOS.pm | 2 +- controls_LGTV_WebOS.txt | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/FHEM/82_LGTV_WebOS.pm b/FHEM/82_LGTV_WebOS.pm index 8f5cc4c..f1aa219 100644 --- a/FHEM/82_LGTV_WebOS.pm +++ b/FHEM/82_LGTV_WebOS.pm @@ -368,7 +368,7 @@ __END__ ], "release_status": "stable", "license": "GPL_2", - "version": "v3.6.5", + "version": "v3.6.9", "author": [ "Marko Oldenburg " ], diff --git a/controls_LGTV_WebOS.txt b/controls_LGTV_WebOS.txt index eff5ab3..3e08321 100644 --- a/controls_LGTV_WebOS.txt +++ b/controls_LGTV_WebOS.txt @@ -1,2 +1,2 @@ -UPD 2023-05-16_04:07:27 18968 FHEM/82_LGTV_WebOS.pm -UPD 2023-05-16_04:07:11 55512 lib/FHEM/Devices/LGTV/LGTVWebOS.pm +UPD 2023-05-16_04:16:05 18968 FHEM/82_LGTV_WebOS.pm +UPD 2023-05-16_04:14:37 55512 lib/FHEM/Devices/LGTV/LGTVWebOS.pm -- 2.45.2