1 Commits

Author SHA1 Message Date
0cd97cd6a1 Update README.md 2019-07-10 12:21:22 +02:00
2 changed files with 4 additions and 3 deletions

View File

@@ -48,7 +48,7 @@ use SetExtensions;
sub XiaomiSmartHome_updateSingleReading($$); sub XiaomiSmartHome_updateSingleReading($$);
my $iv="\x17\x99\x6d\x09\x3d\x28\xdd\xb3\xba\x69\x5a\x2e\x6f\x58\x56\x2e"; my $iv="\x17\x99\x6d\x09\x3d\x28\xdd\xb3\xba\x69\x5a\x2e\x6f\x58\x56\x2e";
my $version = "1.43"; my $version = "1.41";
my %XiaomiSmartHome_gets = ( my %XiaomiSmartHome_gets = (
"getDevices" => ["get_id_list", '^.+get_id_list_ack' ], "getDevices" => ["get_id_list", '^.+get_id_list_ack' ],
@@ -132,16 +132,16 @@ sub XiaomiSmartHome_Read($) {
InternalTimer(gettimeofday() + 2, "XiaomiSmartHome_connect", $hash, 0); InternalTimer(gettimeofday() + 2, "XiaomiSmartHome_connect", $hash, 0);
return; return;
} }
my $json = $hash->{helper}{JSON}->incr_parse($buf);
my $decoded = eval{decode_json($buf)}; my $decoded = eval{decode_json($buf)};
if ($@) { if ($@) {
Log3 $name, 1, "$name: Read> Error while request: $@ " . $buf; Log3 $name, 1, "$name: Read> Error while request: $@";
return; return;
} }
if ( ! $decoded ) { if ( ! $decoded ) {
Log3 $name, 5, "$name: Read> Error no JSON Data " . $buf; Log3 $name, 5, "$name: Read> Error no JSON Data " . $buf;
return; return;
} }
my $json = $hash->{helper}{JSON}->incr_parse($buf);
if ($json) if ($json)
{ {
Log3 $name, 5, "$name: Read> [PLAIN] " . $buf; Log3 $name, 5, "$name: Read> [PLAIN] " . $buf;

View File

@@ -41,3 +41,4 @@ Changing and switching the LED from the gateway and changing ringtone and volume
* Karsten B * Karsten B
* Juergen K * Juergen K
* FHEM-Wohnung * FHEM-Wohnung
* Chrisnitt