Skip to content

Commit

Permalink
getBindingTable: address => addr
Browse files Browse the repository at this point in the history
  • Loading branch information
tcharp38 committed May 9, 2024
1 parent 4933b21 commit 0d3dd60
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 12 deletions.
16 changes: 7 additions & 9 deletions core/class/AbeilleCmdProcess.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -2842,16 +2842,14 @@ function processCmd($Command) {
return;

// Msg Type = 0x0530
$cmd = "0530";
$zgCmd = "0530";

// <address mode: uint8_t>
// <target short address: uint16_t>
// <source endpoint: uint8_t>
// <destination endpoint: uint8_t>

// <profile ID: uint16_t>
// <cluster ID: uint16_t>

// <security mode: uint8_t>
// <radius: uint8_t>
// <data length: uint8_t>
Expand All @@ -2874,20 +2872,20 @@ function processCmd($Command) {
$data1 = $addrMode.$addr.$srcEp.$dstEp.$clustId.$profId.$secMode.$radius.$dataLength;
$data = $data1.$data2;

$this->addCmdToQueue2(PRIO_NORM, $dest, $cmd, $data, $addr, $addrMode);
$this->addCmdToQueue2(PRIO_NORM, $dest, $zgCmd, $data, $addr, $addrMode);
return;
} // End $cmdName == 'getRoutingTable'

// Zigbee command: Get binding table (Mgmt_Bind_req)
// Mandatory params: 'address'
// Mandatory params: 'addr'
// Optional params: none
else if ($cmdName == 'getBindingTable') {
$required = ['address'];
$required = ['addr'];
if (!$this->checkRequiredParams($required, $Command))
return;

// Msg Type = 0x0530
$cmd = "0530";
$zgCmd = "0530";

// <address mode: uint8_t>
// <target short address: uint16_t>
Expand All @@ -2899,7 +2897,7 @@ function processCmd($Command) {
// <radius: uint8_t>

$addrMode = "02"; // Short addr mode
$addr = $Command['address'];
$addr = $Command['addr'];
$srcEp = "00";
$dstEp = "00";
$profId = "0000";
Expand All @@ -2915,7 +2913,7 @@ function processCmd($Command) {
$data1 = $addrMode.$addr.$srcEp.$dstEp.$clustId.$profId.$secMode.$radius.$dataLength;
$data = $data1.$data2;

$this->addCmdToQueue2(PRIO_NORM, $dest, $cmd, $data, $addr, $addrMode);
$this->addCmdToQueue2(PRIO_NORM, $dest, $zgCmd, $data, $addr, $addrMode);
return;
}

Expand Down
4 changes: 2 additions & 2 deletions core/class/AbeilleParser.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -795,12 +795,12 @@ function deviceUpdates($net, $addr, $ep, $updates = []) {
if ($profalux && ($eq['modelId'] !== false) && ($eq['modelId'] !== 'MAI-ZTS')) {
if (!isset($eq['bindingTableSize'])) {
parserLog('debug', ' Profalux v2: Requesting binding table size.');
msgToCmd(PRIO_NORM, "Cmd".$net."/".$addr."/getBindingTable", "address=".$addr);
msgToCmd(PRIO_NORM, "Cmd".$net."/".$addr."/getBindingTable", "");
return false; // Remote still not binded with curtain
}
if ($eq['bindingTableSize'] == 0) {
parserLog('debug', ' Profalux v2: Waiting remote to be binded.');
msgToCmd(PRIO_NORM, "Cmd".$net."/".$addr."/getBindingTable", "address=".$addr);
msgToCmd(PRIO_NORM, "Cmd".$net."/".$addr."/getBindingTable", "");
return false; // Remote still not binded with curtain
}
parserLog('debug', ' Profalux v2: Remote binded. Let\'s configure.');
Expand Down
2 changes: 1 addition & 1 deletion desktop/js/Abeille.js
Original file line number Diff line number Diff line change
Expand Up @@ -1948,7 +1948,7 @@ function interrogate(request) {
payload = "";
} else if (request == "getBindingTable") {
topic = "Cmd" + logicalId + "_getBindingTable";
payload = "address=" + eqAddr;
payload = "";
} else if (request == "getNeighborTable") {
topic = "Cmd" + logicalId + "_getNeighborTable";
startIdx = document.getElementById("idStartIdx").value;
Expand Down
1 change: 1 addition & 0 deletions docs/fr_FR/Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
- Amélioration aspect visuel.

- Support multi-passerelles: Des tas de modifs internes.
- Interne: Cmd: Mise-à-jour 'getBindingTable()' (suppression champ 'address')

## 240501-STABLE-1

Expand Down

0 comments on commit 0d3dd60

Please sign in to comment.