Skip to content

Commit

Permalink
Philips support.. still to do
Browse files Browse the repository at this point in the history
  • Loading branch information
tcharp38 committed Nov 19, 2024
1 parent 09afbd8 commit 668bd3f
Showing 1 changed file with 23 additions and 23 deletions.
46 changes: 23 additions & 23 deletions core/class/AbeilleParser.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -3455,29 +3455,29 @@ function decode8002($dest, $payload, $lqi) {
// return;
}

// // Philips Hue specific cluster
// // Used by RWL021, RDM001
// // TODO: Private case to be revisited
// if ($clustId == "FC00") {
// $buttonEventTxt = array (
// '00' => 'Short press',
// '01' => 'Long press',
// '02' => 'Release short press',
// '03' => 'Release long press',
// );
// $attrId = substr($pl, 2, 2).substr($pl, 0, 2);
// $button = $attrId;
// // $buttonEvent = substr($payload, 24 + 2, 2);
// $buttonEvent = substr($pl, 0 + 2, 2);
// // $buttonDuree = hexdec(substr($payload, 24 + 6, 2));
// $buttonDuree = hexdec(substr($pl, 0 + 6, 2));
// parserLog2("debug", $srcAddr, " TOBEREVISITED: Philips Hue proprietary: Button=".$button.", Event=".$buttonEvent." (".$buttonEventTxt[$buttonEvent]."), duration=".$buttonDuree);

// $attrReportN = [
// array( "name" => $clustId."-".$srcEp."-".$attrId."-Event", "value" => $buttonEvent ),
// array( "name" => $clustId."-".$srcEp."-".$attrId."-Duree", "value" => $buttonDuree ),
// ];
// } // End cluster FC00
// Philips Hue specific cluster
// Used by RWL021, RDM001
// TODO: Private case to be revisited
if ($clustId == "FC00") {
$buttonEventTxt = array (
'00' => 'Short press',
'01' => 'Long press',
'02' => 'Release short press',
'03' => 'Release long press',
);
$attrId = substr($pl, 2, 2).substr($pl, 0, 2);
$button = $attrId;
// $buttonEvent = substr($payload, 24 + 2, 2);
$buttonEvent = substr($pl, 0 + 2, 2);
// $buttonDuree = hexdec(substr($payload, 24 + 6, 2));
$buttonDuree = hexdec(substr($pl, 0 + 6, 2));
parserLog2("debug", $srcAddr, " TOBEREVISITED: Philips Hue proprietary: Button=".$button.", Event=".$buttonEvent." (".$buttonEventTxt[$buttonEvent]."), duration=".$buttonDuree);

$attrReportN = [
array( "name" => $clustId."-".$srcEp."-".$attrId."-Event", "value" => $buttonEvent ),
array( "name" => $clustId."-".$srcEp."-".$attrId."-Duree", "value" => $buttonDuree ),
];
} // End cluster FC00
}
} // End '$cmd == "01"'

Expand Down

0 comments on commit 668bd3f

Please sign in to comment.