Skip to content

Commit

Permalink
Several display fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
tcharp38 committed Mar 2, 2025
1 parent a74657b commit 76cb8ec
Show file tree
Hide file tree
Showing 7 changed files with 63 additions and 28 deletions.
8 changes: 0 additions & 8 deletions TODO.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,6 @@ RefreshData
Supprimer ce support ? Voir #2580 => ERROR bind0030
En lien avec le point suivant (updateField)

Cluster 0004
La cmde 'addGroup' devrait sauver le groupe qq part => ab::groups ?
ab::groups={'01': '1001', '02': '2002'}

Notes pour les remotes:
- qq devices sont configurés en 'bindToGroup' (ex: trafrionoff)
- d'autres envoient vers adr de groupe et bind pas necessaire

Lorsqu'un equipement quitte le réseau
il doit etre désactivé
plus aucun envoi ne doit lui etre fait
Expand Down
38 changes: 21 additions & 17 deletions desktop/js/Abeille.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,10 @@ function refreshEqInfos() {
document.getElementById("idEqAddr").value = curEq.addr;
document.getElementById("idZgType").value = curEq.zgType;

// document.getElementById("idZbModel").value = curEq.zbModel;
document.getElementById("idZbModel").value = curEq.zigbee.modelId;
// document.getElementById("idZbManuf").value = curEq.zbManuf;
document.getElementById("idZbManuf").value = curEq.zigbee.manufId;
if (typeof curEq.zigbee.modelId != "undefined")
document.getElementById("idZbModel").value = curEq.zigbee.modelId;
if (typeof curEq.zigbee.manufId != "undefined")
document.getElementById("idZbManuf").value = curEq.zigbee.manufId;

document.getElementById("idModelSig").value = curEq.model.modelSig;
document.getElementById("idModelName").value =
Expand Down Expand Up @@ -139,7 +139,8 @@ function refreshEqInfos() {
document.getElementById("idVariables").innerHTML = h;
}

switch (curEq.zigbee.logicalType) {
if (typeof curEq.zigbee.logicalType != "undefined") {
switch (curEq.zigbee.logicalType) {
case 0x00:
logicalType = "{{Coordinateur}}";
break;
Expand All @@ -152,19 +153,22 @@ function refreshEqInfos() {
default:
logicalType = curEq.zigbee.logicalType + "/?";
break;
}
}
} else
logicalType = "";
document.getElementById("idZbLogicalType").value = logicalType;
mc = parseInt(curEq.zigbee.macCapa, 16);
document.getElementById("idMacCapa").value = mc
.toString(16)
.toUpperCase();
console.log("maccap=", mc);
if ((mc >> 3) & 1) $("#idZbRxOnWhenIdle").show();
else $("#idZbRxOnWhenIdle").hide();
// rxOnWhenIdle = curEq.zigbee.rxOnWhenIdle;
// document.getElementById("idZbRxOnWhenIdle").value = rxOnWhenIdle
// ? "{{Oui}}"
// : "{{Non}}";

if (typeof curEq.zigbee.macCapa != "undefined") {
mc = parseInt(curEq.zigbee.macCapa, 16);
document.getElementById("idMacCapa").value = mc
.toString(16)
.toUpperCase();

console.log("maccap=", mc);
if ((mc >> 3) & 1) $("#idZbRxOnWhenIdle").show();
else $("#idZbRxOnWhenIdle").hide();
}

if (typeof curEq.zigbee.manufCode != "undefined")
document.getElementById("idManufCode").value =
curEq.zigbee.manufCode;
Expand Down
2 changes: 1 addition & 1 deletion desktop/php/Abeille-Eq-Advanced-Device.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
<label class="col-sm-3 control-label">MAC capabilities</label>
<div class="col-sm-5">
<input id="idMacCapa" type="text" readonly title="{{Node descriptor/MAC capabilities}}" value="">
<input id="idZbRxOnWhenIdle" type="text" readonly title="{{'Oui' si l'équipement est toujours en écoute}}" value="{{Toujours en écoute}}" />
<input id="idZbRxOnWhenIdle" type="text" readonly title="{{Indique si l'équipement est toujours en écoute}}" value="" />
</div>
</div>

Expand Down
4 changes: 2 additions & 2 deletions desktop/php/Abeille-Eq-Advanced-Specific.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@

<label>{{Télécommande}}</label></br>

<div class="form-group">
<!-- <div class="form-group">
<label class="col-sm-3 control-label">{{Adresse groupe}}</label>
<div class="col-sm-9">
<input class="eqLogicAttr form-control" data-l1key="configuration" data-l2key="Groupe" placeholder="{{Adresse courte en hex sur 4 digits (ex: AE12)}}"/>
</div>
</div>
</div> -->

<div class="form-group">
<label class="col-sm-3 control-label">{{Durée (s)}}</label>
Expand Down
2 changes: 2 additions & 0 deletions desktop/php/Abeille-Groups.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ function displayGroups($zgId) {

$groups = $zigbee['groups'];
foreach ($groups as $epId => $grps) {
if ($epId == "")
continue; // Skipping unexpected case
echo '<tr><td>'.$dis1.$eqHName.$dis2.'</td>';
echo '<td >'.$epId.'</td>';
echo '<td >';
Expand Down
34 changes: 34 additions & 0 deletions docs/dev/dealing_with_groups.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
***
*** Abeille developer internal doc
*** Dealing with Zigbee groups
*** (C) Tcharp38
***

Reminder: Zigbee groups allow to "group" several target devices with a single "group address" and send group commands.
This for example allow to switch On/Off several light bulb with a single group On/Off command sent to group instead of device.

Target control
==============

Zigbee groups on server side (target devices) are quite easy to deal with since there are
all commands available thru cluster 0004 to add/get/remove any group.
Moreover these devices are ALWAYS ON meaning that we can send them a cmd at any time.

Abeille is collecting & storing current group status in eqLogic DB thru "configuration/zigbee/groups" oject.
Object is sorted per end point since each EP can be affected to a different set of groups.

"ab::zigbee": {
"groups" : {'01': '1001', '02': '2002'}
}

Remote
======

On the other side (control device), this is much more complex.
The remote control
- has to support "sent to group"
- is a device not always listening network

If remote control is Abeille (virtual remote or any command from Abeille itself),
groups are selected thru "variables" (currently in 'main' tab).
These "variables" must be aligned to group to control.
3 changes: 3 additions & 0 deletions docs/fr_FR/Changelog.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# ChangeLog

- Améliorations: Ajout support SonOff SNZB-02P (2748)
- Améliorations: Affichage onglet 'avancé'.
- Corrections: Suppression 'adresse groupe' onglet avancé => 'variables'
- Corrections: Affichage des groupes Zigbee.

## 250216-BETA-1

Expand Down

0 comments on commit 76cb8ec

Please sign in to comment.