Skip to content

Commit

Permalink
missing conversion
Browse files Browse the repository at this point in the history
  • Loading branch information
KiwiHC16 committed Oct 25, 2020
1 parent 68e3476 commit 110070a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions core/class/AbeilleParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -2321,7 +2321,9 @@ function decode8100($dest, $payload, $ln, $qos, $dummy)
. ', ClustId=' .substr($payload, 8, 4)
. ', AttrId=' .substr($payload, 12, 4)
. ', AttrStatus=' .substr($payload, 16, 2)
. ', AttrDataType='.substr($payload, 18, 2) );
. ', AttrDataType='.substr($payload, 18, 2)
. ', sizeOfAttribute='.substr($payload, 20, 4)
);

$dataType = substr($payload, 18, 2);
// IKEA OnOff state reply data type: 10
Expand Down Expand Up @@ -2356,7 +2358,7 @@ function decode8100($dest, $payload, $ln, $qos, $dummy)
$data = hexdec(substr($payload, 24, 2));
}
if ($dataType == "42") {
$data = hex2bin(substr($payload, 24, $sizeOfAttribute*2));
$data = hex2bin(substr($payload, 24, hexdec($sizeOfAttribute)*2));
}
//deamonlog('Data byte: '.$data);
if (isset($data)) {
Expand Down

0 comments on commit 110070a

Please sign in to comment.