diff --git a/fhem/CHANGED b/fhem/CHANGED index b7bd5ff47..f1691e5b8 100644 --- a/fhem/CHANGED +++ b/fhem/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: 82_LGTV_WebOS: Version 0.8.0, fix screenMsg Charset problem - bugfix: 93_DbLog: V2.18.3, cannot load V2.18.2, new internal 'model' - bugfix: list: do not change the upper casing of hashes (Forum #73828) - bugfix: 71_YAMAHA_NP: Prevent directPlay from starting netradio stream diff --git a/fhem/FHEM/82_LGTV_WebOS.pm b/fhem/FHEM/82_LGTV_WebOS.pm index 152c83be3..e7f29187b 100644 --- a/fhem/FHEM/82_LGTV_WebOS.pm +++ b/fhem/FHEM/82_LGTV_WebOS.pm @@ -31,8 +31,19 @@ ################################# ######### Wichtige Hinweise und Links ################# - - +# +## Das JSON Modul immer in einem eval aufrufen +# $data = eval{decode_json($data)}; +# +# if($@){ +# Log3($SELF, 2, "$TYPE ($SELF) - error while request: $@"); +# +# readingsSingleUpdate($hash, "state", "error", 1); +# +# return; +# } +## +## ## # @@ -49,14 +60,14 @@ use MIME::Base64; use IO::Socket::INET; use Digest::SHA qw(sha1_hex); use JSON qw(decode_json encode_json); -use Encode qw(encode_utf8); +use Encode qw(encode_utf8 decode_utf8); use Blocking; -my $version = "0.6.0"; +my $version = "0.8.0"; @@ -412,7 +423,7 @@ sub LGTV_WebOS_Set($@) { return "usage: screenMsg " if( @args < 1 ); my $msg = join(" ", @args); - $payload{$lgCommands{$cmd}->[1]} = $msg; + $payload{$lgCommands{$cmd}->[1]} = decode_utf8($msg); $uri = $lgCommands{$cmd}->[0]; } elsif($cmd eq 'on' or $cmd eq 'off') {