zigbee-herdsman-converters 14.0.693 → 15.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -0
- package/devices/centralite.js +1 -1
- package/devices/legrand.js +17 -8
- package/devices/paulmann.js +2 -1
- package/devices/tuya.js +12 -1
- package/devices/woolley.js +12 -0
- package/lib/ota/common.js +7 -3
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -3,6 +3,11 @@
|
|
|
3
3
|
# zigbee-herdsman-converters
|
|
4
4
|
Collection of device converters to be used with zigbee-herdsman.
|
|
5
5
|
|
|
6
|
+
## Breaking changes
|
|
7
|
+
15.0.0
|
|
8
|
+
- OTA `isUpdateAvailable` now returns an object instead of a boolean (e.g. `{available: true, currentFileVersion: 120, otaFileVersion: 125}`)
|
|
9
|
+
- OTA `updateToLatest` now returns a number (`fileVersion` of the new OTA) instead of a void
|
|
10
|
+
|
|
6
11
|
## Contributing
|
|
7
12
|
See [Zigbee2MQTT how to support new devices](https://www.zigbee2mqtt.io/advanced/support-new-devices/01_support_new_devices.html).
|
|
8
13
|
|
package/devices/centralite.js
CHANGED
|
@@ -129,7 +129,7 @@ module.exports = [
|
|
|
129
129
|
// For some this fails so set manually
|
|
130
130
|
// https://github.com/Koenkk/zigbee2mqtt/issues/3575
|
|
131
131
|
endpoint.saveClusterAttributeKeyValue('haElectricalMeasurement', {
|
|
132
|
-
acCurrentDivisor:
|
|
132
|
+
acCurrentDivisor: 1000, acCurrentMultiplier: 1, powerMultiplier: 1, powerDivisor: 10});
|
|
133
133
|
}
|
|
134
134
|
await reporting.rmsVoltage(endpoint, {change: 2}); // Voltage reports in V
|
|
135
135
|
await reporting.rmsCurrent(endpoint, {change: 10}); // Current reports in mA
|
package/devices/legrand.js
CHANGED
|
@@ -123,14 +123,7 @@ module.exports = [
|
|
|
123
123
|
model: '067776',
|
|
124
124
|
vendor: 'Legrand',
|
|
125
125
|
description: 'Netatmo wired shutter switch',
|
|
126
|
-
|
|
127
|
-
fromZigbee: [
|
|
128
|
-
// Devices can send an identify message when the configuration button is pressed
|
|
129
|
-
// (behind the physical buttons)
|
|
130
|
-
// Used on the official gateway to send to every devices an identify command (green)
|
|
131
|
-
fz.identify, fz.ignore_basic_report,
|
|
132
|
-
// support binary report on moving state (supposed)
|
|
133
|
-
fz.legrand_binary_input_moving, fz.cover_position_tilt],
|
|
126
|
+
fromZigbee: [fz.identify, fz.ignore_basic_report, fz.legrand_binary_input_moving, fz.cover_position_tilt],
|
|
134
127
|
toZigbee: [tz.cover_state, tz.cover_position_tilt, tz.legrand_identify, tz.legrand_settingEnableLedInDark],
|
|
135
128
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
136
129
|
const endpoint = device.getEndpoint(1);
|
|
@@ -139,6 +132,22 @@ module.exports = [
|
|
|
139
132
|
},
|
|
140
133
|
exposes: [e.cover_position()],
|
|
141
134
|
},
|
|
135
|
+
{
|
|
136
|
+
// swbuildid 001a requires coverInverted: https://github.com/Koenkk/zigbee2mqtt/issues/15101#issuecomment-1356787490
|
|
137
|
+
fingerprint: [{modelID: ' Shutter switch with neutral\u0000\u0000\u0000', softwareBuildID: '001a'}],
|
|
138
|
+
model: '067776_001a',
|
|
139
|
+
vendor: 'Legrand',
|
|
140
|
+
description: 'Netatmo wired shutter switch',
|
|
141
|
+
fromZigbee: [fz.identify, fz.ignore_basic_report, fz.legrand_binary_input_moving, fz.cover_position_tilt],
|
|
142
|
+
toZigbee: [tz.cover_state, tz.cover_position_tilt, tz.legrand_identify, tz.legrand_settingEnableLedInDark],
|
|
143
|
+
meta: {coverInverted: true},
|
|
144
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
145
|
+
const endpoint = device.getEndpoint(1);
|
|
146
|
+
await reporting.bind(endpoint, coordinatorEndpoint, ['genBinaryInput', 'closuresWindowCovering', 'genIdentify']);
|
|
147
|
+
await reporting.currentPositionLiftPercentage(endpoint);
|
|
148
|
+
},
|
|
149
|
+
exposes: [e.cover_position()],
|
|
150
|
+
},
|
|
142
151
|
{
|
|
143
152
|
zigbeeModel: [
|
|
144
153
|
' Remote switch\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000'],
|
package/devices/paulmann.js
CHANGED
|
@@ -11,7 +11,8 @@ module.exports = [
|
|
|
11
11
|
description: 'Smart switch 4 buttons white',
|
|
12
12
|
fromZigbee: [fz.command_on, fz.command_off, fz.battery],
|
|
13
13
|
toZigbee: [],
|
|
14
|
-
exposes: [e.battery(), e.action(['on_1', 'off_1', 'on_2', 'off_2'
|
|
14
|
+
exposes: [e.battery(), e.action(['on_1', 'off_1', 'on_2', 'off_2', 'brightness_move_up_1', 'brightness_move_down_1',
|
|
15
|
+
'brightness_move_stop_1', 'brightness_move_up_2', 'brightness_move_down_2', 'brightness_move_stop_2'])],
|
|
15
16
|
meta: {multiEndpoint: true},
|
|
16
17
|
},
|
|
17
18
|
{
|
package/devices/tuya.js
CHANGED
|
@@ -1632,6 +1632,7 @@ module.exports = [
|
|
|
1632
1632
|
{modelID: 'TS0201', manufacturerName: '_TZ3000_6uzkisv2'},
|
|
1633
1633
|
{modelID: 'TS0201', manufacturerName: '_TZ3000_xr3htd96'},
|
|
1634
1634
|
{modelID: 'TS0601', manufacturerName: '_TZE200_9yapgbuv'},
|
|
1635
|
+
{modelID: 'TS0601', manufacturerName: '_TZE200_yjjdcqsq'},
|
|
1635
1636
|
],
|
|
1636
1637
|
model: 'WSD500A',
|
|
1637
1638
|
vendor: 'TuYa',
|
|
@@ -3662,7 +3663,17 @@ module.exports = [
|
|
|
3662
3663
|
model: 'TS110E_1gang_1',
|
|
3663
3664
|
vendor: 'TuYa',
|
|
3664
3665
|
description: '1 channel dimmer',
|
|
3665
|
-
|
|
3666
|
+
fromZigbee: extend.light_onoff_brightness({disablePowerOnBehavior: true, disableMoveStep: true, disableTransition: true})
|
|
3667
|
+
.fromZigbee.concat([tuya.fz.power_on_behavior, fzLocal.TS110E_switch_type, fzLocal.TS110E]),
|
|
3668
|
+
toZigbee: extend.light_onoff_brightness({disablePowerOnBehavior: true, disableMoveStep: true, disableTransition: true})
|
|
3669
|
+
.toZigbee.concat([tuya.tz.power_on_behavior, tzLocal.TS110E_options]),
|
|
3670
|
+
meta: {multiEndpoint: true},
|
|
3671
|
+
exposes: [e.light_brightness(), e.power_on_behavior(), tuya.exposes.switchType()],
|
|
3672
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
3673
|
+
await tuya.configureMagicPacket(device, coordinatorEndpoint, logger);
|
|
3674
|
+
await extend.light_onoff_brightness().configure(device, coordinatorEndpoint, logger);
|
|
3675
|
+
await reporting.bind(device.getEndpoint(1), coordinatorEndpoint, ['genOnOff', 'genLevelCtrl']);
|
|
3676
|
+
},
|
|
3666
3677
|
},
|
|
3667
3678
|
{
|
|
3668
3679
|
fingerprint: tuya.fingerprint('TS110E', ['_TZ3210_ngqk6jia']),
|
package/devices/woolley.js
CHANGED
|
@@ -14,4 +14,16 @@ module.exports = [
|
|
|
14
14
|
await reporting.onOff(endpoint);
|
|
15
15
|
},
|
|
16
16
|
},
|
|
17
|
+
{
|
|
18
|
+
zigbeeModel: ['SA-030-1'],
|
|
19
|
+
model: 'SA-030',
|
|
20
|
+
vendor: 'Woolley',
|
|
21
|
+
description: 'Smart plug',
|
|
22
|
+
extend: extend.switch(),
|
|
23
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
24
|
+
const endpoint = device.getEndpoint(1);
|
|
25
|
+
await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff']);
|
|
26
|
+
await reporting.onOff(endpoint);
|
|
27
|
+
},
|
|
28
|
+
},
|
|
17
29
|
];
|
package/lib/ota/common.js
CHANGED
|
@@ -258,7 +258,7 @@ async function isUpdateAvailable(device, logger, isNewImageAvailable, requestPay
|
|
|
258
258
|
if (available > 0) {
|
|
259
259
|
logger.warn(`Firmware on '${device.ieeeAddr}' is newer than latest firmware online.`);
|
|
260
260
|
}
|
|
261
|
-
return
|
|
261
|
+
return {...available, available: available < 0};
|
|
262
262
|
}
|
|
263
263
|
|
|
264
264
|
async function isNewImageAvailable(current, logger, device, getImageMeta) {
|
|
@@ -270,7 +270,11 @@ async function isNewImageAvailable(current, logger, device, getImageMeta) {
|
|
|
270
270
|
return -1; // Negative number means the new firmware is 'newer' than current one
|
|
271
271
|
}
|
|
272
272
|
|
|
273
|
-
return
|
|
273
|
+
return {
|
|
274
|
+
available: Math.sign(current.fileVersion - meta.fileVersion),
|
|
275
|
+
currentFileVersion: current.fileVersion,
|
|
276
|
+
otaFileVersion: meta.fileVersion,
|
|
277
|
+
};
|
|
274
278
|
}
|
|
275
279
|
|
|
276
280
|
async function updateToLatest(device, logger, onProgress, getNewImage, getImageMeta = null, downloadImage = null) {
|
|
@@ -393,7 +397,7 @@ async function updateToLatest(device, logger, onProgress, getNewImage, getImageM
|
|
|
393
397
|
logger.debug('Got device announce or timed out, call resolve');
|
|
394
398
|
clearInterval(timer);
|
|
395
399
|
device.removeListener('deviceAnnounce', cb);
|
|
396
|
-
resolve();
|
|
400
|
+
resolve(image.header.fileVersion);
|
|
397
401
|
};
|
|
398
402
|
timer = setTimeout(cb, 120 * 1000); // timeout after 2 minutes
|
|
399
403
|
device.once('deviceAnnounce', cb);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "zigbee-herdsman-converters",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "15.0.0",
|
|
4
4
|
"description": "Collection of device converters to be used with zigbee-herdsman",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"files": [
|
|
@@ -37,8 +37,8 @@
|
|
|
37
37
|
"axios": "^1.2.1",
|
|
38
38
|
"buffer-crc32": "^0.2.13",
|
|
39
39
|
"https-proxy-agent": "^5.0.1",
|
|
40
|
-
"tar-stream": "^
|
|
41
|
-
"zigbee-herdsman": "^0.14.
|
|
40
|
+
"tar-stream": "^3.0.0",
|
|
41
|
+
"zigbee-herdsman": "^0.14.81"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"eslint": "*",
|