mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-05-04 22:19:38 +00:00
37_plex.pm: better error checking
git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@13953 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
9f127e8316
commit
c432975c3a
@ -4069,10 +4069,12 @@ Log 1, "!!!!!!!!!!";
|
|||||||
my $obj = eval { decode_json($data) };
|
my $obj = eval { decode_json($data) };
|
||||||
|
|
||||||
if( $obj ) {
|
if( $obj ) {
|
||||||
|
Log3 $pname, 5, "$pname: websocket data: ". Dumper $obj;
|
||||||
|
|
||||||
my $phash = $hash->{phash};
|
my $phash = $hash->{phash};
|
||||||
my $handled = 0;
|
my $handled = 0;
|
||||||
|
|
||||||
if( $obj->{_elementType} eq 'NotificationContainer' ) {
|
if( $obj->{_elementType} && $obj->{_elementType} eq 'NotificationContainer' ) {
|
||||||
if( $obj->{type} eq 'playing' ) {
|
if( $obj->{type} eq 'playing' ) {
|
||||||
$handled = 1;
|
$handled = 1;
|
||||||
|
|
||||||
@ -4142,7 +4144,11 @@ Log 1, "!!!!!!!!!!";
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if( $obj->{type} ) {
|
||||||
Log3 $pname, 4, "$pname: unhandled websocket text type: $obj->{type}: $data" if( !$handled );
|
Log3 $pname, 4, "$pname: unhandled websocket text type: $obj->{type}: $data" if( !$handled );
|
||||||
|
} else {
|
||||||
|
Log3 $pname, 4, "$pname: unhandled websocket data: $data" if( !$handled );
|
||||||
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
Log3 $pname, 2, "$pname: unhandled websocket text $data";
|
Log3 $pname, 2, "$pname: unhandled websocket text $data";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user