Skip to content

Commit

Permalink
Merge branch '1.11' into Temp
Browse files Browse the repository at this point in the history
  • Loading branch information
asgothian authored Jan 30, 2025
2 parents 9bb500b + 82bf0ec commit 1371f9d
Show file tree
Hide file tree
Showing 11 changed files with 88 additions and 117 deletions.
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,17 @@ You can thank the authors by these links:

-----------------------------------------------------------------------------------------------------
## Changelog
### 1.11.1 (2025-01-02)
* (asgothian) Fix Pairing
* (asgothian) change ping
* (asgothian) delay map generation until refresh is activated
* (asgothian) remove bindings tab from zigbee tab
* (asgothian) reorder tabs in configuration
* (asgothian) remove binding tab from configuration
* (asgothian) remove map from configuration
* (asgothian) add debug to zigbee tab (work in progress)
* (asgothian) Herdsman 3.2.0, Converters 21.11.0

### 1.10.14 (2025-01-01)
* (arteck) Herdsman 2.1.9, Converters 20.58.0
* (asgothian) Fix: Aqara T1M (CL-L02D)
Expand Down
12 changes: 3 additions & 9 deletions admin/admin.js
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,7 @@ function getCard(dev) {
rooms.push(dev.rooms[r]);
}
}
console.warn('debug for ' + ieee + ' is ' + isDebug);
const room = rooms.join(',') || '&nbsp';
const paired = (dev.paired) ? '' : '<i class="material-icons right">leak_remove</i>';
const rid = id.split('.').join('_');
Expand Down Expand Up @@ -632,11 +633,13 @@ function showDevices() {
const name = getDevName(dev_block);
toggleDebugDevice(id, name);
});

$('.card-reveal-buttons button[name=\'swapimage\']').click(function () {
const dev_block = $(this).parents('div.device');
const id = getDevId(dev_block);
selectImageOverride(id);
});

$('.card-reveal-buttons button[name=\'editgrp\']').click(function () {
const dev_block = $(this).parents('div.device');
const id = dev_block.attr('id').replace(namespace + '.group_', '');
Expand Down Expand Up @@ -795,15 +798,6 @@ async function toggleDebugDevice(id) {
});
}

/*
sendTo(namespace, 'getLocalImages', {}, function(msg) {
if (msg && msg.imageData) {
// const element = $('#localimages');
console.warn('imageData length is ' + msg.imageData.length);
localImages = msg.imageData;
}
});
*/

function updateDeviceImage(device, image, global) {
console.warn(`update device image : ${JSON.stringify(device)} : ${image} : ${global}`);
Expand Down
Binary file added admin/img/PTM 215Z.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added admin/img/ZY-M100-24GV3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
29 changes: 15 additions & 14 deletions io-package.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
{
"common": {
"name": "zigbee",
"version": "1.10.15",
"version": "1.11.2",
"news": {
"1.10.15": {
"en": "Work in progress",
"de": "Work in progress",
"ru": "Work in progress",
"pt": "Work in progress",
"nl": "Work in progress",
"fr": "Work in progress",
"it": "Work in progress",
"es": "Work in progress",
"pl": "Work in progress",
"uk": "Work in progress",
"zh-cn": "Work in progress"
"1.11.2": {
"en": "debug for states",
"de": "debug for states",
"ru": "debug for states",
"pt": "debug for states",
"nl": "debug for states",
"fr": "debug for states",
"it": "debug for states",
"es": "debug for states",
"pl": "debug for states",
"uk": "debug for states",
"zh-cn": "debug for states"
},
"1.10.14": {
"en": "Herdsman 2.1.9, Converters 20.58.0\nFix: Aqara T1M (CL-L02D) \ndeleteDeviceStates change to deleteObj",
Expand Down Expand Up @@ -222,7 +222,8 @@
"cancel"
]
}
]
],
"installedFrom": "asgothian/ioBroker.zigbee#1.11"
},
"native": {
"port": "",
Expand Down
2 changes: 2 additions & 0 deletions lib/commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ class Commands {
this.getDebugDevices(obj.from, obj.command, obj.message, obj.callback);
}
break;

case 'getLocalImages':
if (obj.message && typeof obj.message === 'object') {
this.getLocalImages(obj.from, obj.command, obj.message, obj.callback);
Expand Down Expand Up @@ -570,6 +571,7 @@ class Commands {
}
}


async getLocalImages(from, command, msg, callback) {
if (this.stController) {
const id = msg.id;
Expand Down
1 change: 0 additions & 1 deletion lib/exclude.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,6 @@ class Exclude {
}
}


async getExclude(callback) {
try {
const exclude = this.localConfig.getOverridesWithKey('legacy', true)
Expand Down
20 changes: 16 additions & 4 deletions lib/statescontroller.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ class StatesController extends EventEmitter {
this.warn(`unable to extract id from state ${id}`);
return [];
}
const stateKey = arr[1];
const stateKey = arr[1];
this.warn('statekey is ' + stateKey + ', arr is ' + JSON.stringify(arr) + ' id was ' + id);
if (typeof (this.debugDevices) != 'array') this.getDebugDevices(() => {
const idx = this.debugDevices.indexOf(stateKey);
Expand Down Expand Up @@ -689,17 +689,29 @@ class StatesController extends EventEmitter {
this.emit('debugmessage', {id: id, message:message});
}

async elevatedMessage(device, message, isError) {
if (isError) this.error(message); else this.warn(message);
// emit data here for debug tab later

}

async elevatedDebugMessage(id, message, isError) {
if (isError) this.error(message); else this.warn(message);
this.emit('debugmessage', {id: id, message:message});
}

async publishToState(devId, model, payload) {
const devStates = await this.getDevStates(`0x${devId}`, model);

const has_elevated_debug = (this.checkDebugDevice(devId) && !payload.hasOwnProperty('msg_from_zigbee'));

if (has_elevated_debug)

if (has_elevated_debug)
{
this.elevatedMessage(devId, `ELEVATED I01: message received '${JSON.stringify(payload)}' from device ${devId} type '${model}'`, false);
}
if (!devStates) {
if (has_elevated_debug)
if (has_elevated_debug)
this.elevatedMessage(devId, `ELEVATED IE02: no device states for device ${devId} type '${model}'`, true)
return;
}
Expand All @@ -711,7 +723,7 @@ class StatesController extends EventEmitter {
const states = statesMapping.commonStates.concat(
devStates.states.filter(statedesc => payload.hasOwnProperty(statedesc.prop || statedesc.id))
);

for (const stateInd in states) {
const statedesc = states[stateInd];
let value;
Expand Down
5 changes: 1 addition & 4 deletions lib/zigbeecontroller.js
Original file line number Diff line number Diff line change
Expand Up @@ -530,7 +530,6 @@ class ZigbeeController extends EventEmitter {
this.emit('pairing', 'Pairing time left', this._permitJoinTime);
this._permitJoinTime -= 1;
}, 1000);

}
}
else {
Expand All @@ -540,12 +539,10 @@ class ZigbeeController extends EventEmitter {
this.emit('pairing', 'Pairing time left', 0);
this.emit('pairing', 'Closing network.');
}

}
catch (error) {
this.error(`Error in handlePermitJoinChanged: ${error.message}`);
this.error(`Error in handlePermitJoinChanged: ${error.message}`);
}

}

// Remove device
Expand Down
Loading

0 comments on commit 1371f9d

Please sign in to comment.