zigbee-herdsman-converters 15.0.113 → 15.0.115
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/devices/develco.js +24 -0
- package/devices/lidl.js +1 -1
- package/devices/nue_3a.js +1 -1
- package/devices/owon.js +5 -0
- package/devices/third_reality.js +4 -3
- package/devices/tuya.js +87 -1
- package/lib/tuya.js +4 -3
- package/package.json +1 -1
package/devices/develco.js
CHANGED
|
@@ -487,6 +487,30 @@ module.exports = [
|
|
|
487
487
|
.withDescription('Indicates reason if any fault'),
|
|
488
488
|
exposes.binary('fault', ea.STATE, true, false).withDescription('Indicates whether the device are in fault state')],
|
|
489
489
|
},
|
|
490
|
+
{
|
|
491
|
+
zigbeeModel: ['SPLZB-141'],
|
|
492
|
+
model: 'SPLZB-141',
|
|
493
|
+
vendor: 'Develco',
|
|
494
|
+
description: 'Power plug',
|
|
495
|
+
fromZigbee: [fz.on_off, develco.fz.electrical_measurement, develco.fz.metering],
|
|
496
|
+
toZigbee: [tz.on_off],
|
|
497
|
+
exposes: [e.switch(), e.power(), e.current(), e.voltage(), e.energy(), e.ac_frequency()],
|
|
498
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
499
|
+
const endpoint = device.getEndpoint(2);
|
|
500
|
+
await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff', 'haElectricalMeasurement', 'seMetering']);
|
|
501
|
+
await reporting.onOff(endpoint);
|
|
502
|
+
await reporting.readEletricalMeasurementMultiplierDivisors(endpoint);
|
|
503
|
+
await reporting.activePower(endpoint);
|
|
504
|
+
await reporting.rmsCurrent(endpoint);
|
|
505
|
+
await reporting.rmsVoltage(endpoint);
|
|
506
|
+
await reporting.readMeteringMultiplierDivisor(endpoint);
|
|
507
|
+
await reporting.currentSummDelivered(endpoint);
|
|
508
|
+
await reporting.acFrequency(endpoint);
|
|
509
|
+
},
|
|
510
|
+
endpoint: (device) => {
|
|
511
|
+
return {default: 2};
|
|
512
|
+
},
|
|
513
|
+
},
|
|
490
514
|
{
|
|
491
515
|
zigbeeModel: ['HESZB-120'],
|
|
492
516
|
model: 'HESZB-120',
|
package/devices/lidl.js
CHANGED
|
@@ -553,7 +553,7 @@ module.exports = [
|
|
|
553
553
|
model: 'HG06337',
|
|
554
554
|
vendor: 'Lidl',
|
|
555
555
|
description: 'Silvercrest smart plug (EU, CH, FR, BS, DK)',
|
|
556
|
-
extend: tuya.extend.switch(),
|
|
556
|
+
extend: tuya.extend.switch({indicatorMode: true}),
|
|
557
557
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
558
558
|
const endpoint = device.getEndpoint(11);
|
|
559
559
|
await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff']);
|
package/devices/nue_3a.js
CHANGED
|
@@ -37,7 +37,7 @@ module.exports = [
|
|
|
37
37
|
model: 'HGZB-01',
|
|
38
38
|
vendor: 'Nue / 3A',
|
|
39
39
|
description: 'Smart Zigbee 3.0 light controller',
|
|
40
|
-
extend: extend.switch(),
|
|
40
|
+
extend: extend.switch({disablePowerOnBehavior: true}),
|
|
41
41
|
whiteLabel: [{vendor: 'Zemismart', model: 'ZW-EU-01', description: 'Smart light relay - 1 gang'},
|
|
42
42
|
{vendor: 'Moes', model: 'ZK-CH-2U', description: 'Plug with 2 USB ports'}],
|
|
43
43
|
configure: async (device, coordinatorEndpoint, logger) => {
|
package/devices/owon.js
CHANGED
|
@@ -109,6 +109,7 @@ module.exports = [
|
|
|
109
109
|
zigbeeModel: ['WSP403-E'],
|
|
110
110
|
model: 'WSP403',
|
|
111
111
|
vendor: 'OWON',
|
|
112
|
+
whiteLabel: [{vendor: 'Oz Smart Things', model: 'WSP403'}],
|
|
112
113
|
description: 'Smart plug',
|
|
113
114
|
fromZigbee: [fz.on_off, fz.metering],
|
|
114
115
|
toZigbee: [tz.on_off],
|
|
@@ -121,6 +122,10 @@ module.exports = [
|
|
|
121
122
|
await reporting.instantaneousDemand(endpoint, {min: 5, max: constants.repInterval.MINUTES_5, change: 2}); // divider 1000: 2W
|
|
122
123
|
await reporting.currentSummDelivered(endpoint, {min: 5, max: constants.repInterval.MINUTES_5,
|
|
123
124
|
change: [10, 10]}); // divider 1000: 0,01kWh
|
|
125
|
+
|
|
126
|
+
// At least some white label devices, like the Oz Smart Things device, don't report a power source so we need to force it
|
|
127
|
+
device.powerSource = 'Mains (single phase)';
|
|
128
|
+
device.save();
|
|
124
129
|
},
|
|
125
130
|
},
|
|
126
131
|
{
|
package/devices/third_reality.js
CHANGED
|
@@ -171,10 +171,10 @@ module.exports = [
|
|
|
171
171
|
model: '3RSP02028BZ',
|
|
172
172
|
vendor: 'Third Reality',
|
|
173
173
|
description: 'Zigbee / BLE smart plug with power',
|
|
174
|
-
fromZigbee: [fz.on_off, fz.electrical_measurement, fz.metering],
|
|
175
|
-
toZigbee: [tz.on_off],
|
|
174
|
+
fromZigbee: [fz.on_off, fz.electrical_measurement, fz.metering, fz.power_on_behavior],
|
|
175
|
+
toZigbee: [tz.on_off, tz.power_on_behavior],
|
|
176
176
|
ota: ota.zigbeeOTA,
|
|
177
|
-
exposes: [e.switch(), e.ac_frequency(), e.power(), e.power_factor(), e.energy(), e.current(), e.voltage()],
|
|
177
|
+
exposes: [e.switch(), e.power_on_behavior(), e.ac_frequency(), e.power(), e.power_factor(), e.energy(), e.current(), e.voltage()],
|
|
178
178
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
179
179
|
const endpoint = device.getEndpoint(1);
|
|
180
180
|
await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff', 'haElectricalMeasurement', 'seMetering']);
|
|
@@ -199,6 +199,7 @@ module.exports = [
|
|
|
199
199
|
description: 'Zigbee vibration sensor',
|
|
200
200
|
fromZigbee: [fz.ias_vibration_alarm_1, fz.battery],
|
|
201
201
|
toZigbee: [],
|
|
202
|
+
ota: ota.zigbeeOTA,
|
|
202
203
|
exposes: [e.vibration(), e.battery_low(), e.battery(), e.battery_voltage()],
|
|
203
204
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
204
205
|
const endpoint = device.getEndpoint(1);
|
package/devices/tuya.js
CHANGED
|
@@ -514,6 +514,14 @@ const tzLocal = {
|
|
|
514
514
|
};
|
|
515
515
|
|
|
516
516
|
const fzLocal = {
|
|
517
|
+
TS0222_humidity: {
|
|
518
|
+
...fz.humidity,
|
|
519
|
+
convert: (model, msg, publish, options, meta) => {
|
|
520
|
+
const result = fz.humidity.convert(model, msg, publish, options, meta);
|
|
521
|
+
result.humidity *= 10;
|
|
522
|
+
return result;
|
|
523
|
+
},
|
|
524
|
+
},
|
|
517
525
|
TS110E: {
|
|
518
526
|
cluster: 'genLevelCtrl',
|
|
519
527
|
type: ['attributeReport', 'readResponse'],
|
|
@@ -1517,7 +1525,11 @@ module.exports = [
|
|
|
1517
1525
|
vendor: 'TuYa',
|
|
1518
1526
|
description: 'Water leak detector',
|
|
1519
1527
|
fromZigbee: [fz.ias_water_leak_alarm_1, fz.battery],
|
|
1520
|
-
whiteLabel: [
|
|
1528
|
+
whiteLabel: [
|
|
1529
|
+
{vendor: 'CR Smart Home', model: 'TS0207'},
|
|
1530
|
+
tuya.whitelabel('Meian', 'SW02', 'Water leak sensor', ['_TZ3000_kyb656no']),
|
|
1531
|
+
tuya.whitelabel('Aubess', 'IH-K665', 'Water leak sensor', ['_TZ3000_k4ej3ww2']),
|
|
1532
|
+
],
|
|
1521
1533
|
toZigbee: [],
|
|
1522
1534
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
1523
1535
|
const endpoint = device.getEndpoint(1);
|
|
@@ -3993,6 +4005,18 @@ module.exports = [
|
|
|
3993
4005
|
],
|
|
3994
4006
|
onEvent: tuya.onEventSetTime,
|
|
3995
4007
|
},
|
|
4008
|
+
{
|
|
4009
|
+
fingerprint: tuya.fingerprint('TS0222', ['_TZ3000_kky16aay']),
|
|
4010
|
+
model: 'TS0222_temperature_humidity',
|
|
4011
|
+
vendor: 'TuYa',
|
|
4012
|
+
description: 'Temperature & humidity sensor',
|
|
4013
|
+
fromZigbee: [fzLocal.TS0222_humidity, fz.battery, fz.temperature, fz.illuminance],
|
|
4014
|
+
toZigbee: [],
|
|
4015
|
+
exposes: [e.battery(), e.temperature(), e.humidity(), e.illuminance()],
|
|
4016
|
+
whiteLabel: [
|
|
4017
|
+
tuya.whitelabel('TuYa', 'QT-07S', 'Soil sensor', ['_TZ3000_kky16aay']),
|
|
4018
|
+
],
|
|
4019
|
+
},
|
|
3996
4020
|
{
|
|
3997
4021
|
fingerprint: [{modelID: 'TS0222', manufacturerName: '_TYZB01_4mdqxxnn'},
|
|
3998
4022
|
{modelID: 'TS0222', manufacturerName: '_TYZB01_m6ec2pgj'}],
|
|
@@ -5173,4 +5197,66 @@ module.exports = [
|
|
|
5173
5197
|
],
|
|
5174
5198
|
},
|
|
5175
5199
|
},
|
|
5200
|
+
{
|
|
5201
|
+
fingerprint: [
|
|
5202
|
+
{modelID: 'TS0601', manufacturerName: '_TZE200_vmcgja59'},
|
|
5203
|
+
],
|
|
5204
|
+
model: 'TS0601_switch_8',
|
|
5205
|
+
vendor: 'TuYa',
|
|
5206
|
+
description: '8 Gang switch',
|
|
5207
|
+
fromZigbee: [tuya.fz.datapoints],
|
|
5208
|
+
toZigbee: [tuya.tz.datapoints],
|
|
5209
|
+
configure: tuya.configureMagicPacket,
|
|
5210
|
+
exposes: [
|
|
5211
|
+
tuya.exposes.switch().withEndpoint('l1'),
|
|
5212
|
+
tuya.exposes.switch().withEndpoint('l2'),
|
|
5213
|
+
tuya.exposes.switch().withEndpoint('l3'),
|
|
5214
|
+
tuya.exposes.switch().withEndpoint('l4'),
|
|
5215
|
+
tuya.exposes.switch().withEndpoint('l5'),
|
|
5216
|
+
tuya.exposes.switch().withEndpoint('l6'),
|
|
5217
|
+
tuya.exposes.switch().withEndpoint('l7'),
|
|
5218
|
+
tuya.exposes.switch().withEndpoint('l8'),
|
|
5219
|
+
],
|
|
5220
|
+
endpoint: (device) => {
|
|
5221
|
+
return {'l1': 1, 'l2': 1, 'l3': 1, 'l4': 1, 'l5': 1, 'l6': 1, 'l7': 1, 'l8': 1};
|
|
5222
|
+
},
|
|
5223
|
+
meta: {
|
|
5224
|
+
multiEndpoint: true,
|
|
5225
|
+
tuyaDatapoints: [
|
|
5226
|
+
[1, 'state_l1', tuya.valueConverter.onOff],
|
|
5227
|
+
[2, 'state_l2', tuya.valueConverter.onOff],
|
|
5228
|
+
[3, 'state_l3', tuya.valueConverter.onOff],
|
|
5229
|
+
[4, 'state_l4', tuya.valueConverter.onOff],
|
|
5230
|
+
[5, 'state_l5', tuya.valueConverter.onOff],
|
|
5231
|
+
[6, 'state_l6', tuya.valueConverter.onOff],
|
|
5232
|
+
[0x65, 'state_l7', tuya.valueConverter.onOff],
|
|
5233
|
+
[0x66, 'state_l8', tuya.valueConverter.onOff],
|
|
5234
|
+
],
|
|
5235
|
+
},
|
|
5236
|
+
whiteLabel: [
|
|
5237
|
+
tuya.whitelabel('ZYXH', 'TS0601_switch_8', '8 Gang switch', ['_TZE200_vmcgja59']),
|
|
5238
|
+
],
|
|
5239
|
+
},
|
|
5240
|
+
{
|
|
5241
|
+
fingerprint: tuya.fingerprint('TS01FF', ['_TZ3000_rqbjepe8']),
|
|
5242
|
+
model: 'TS011F_4',
|
|
5243
|
+
description: '2 gang plug',
|
|
5244
|
+
vendor: 'TuYa',
|
|
5245
|
+
ota: ota.zigbeeOTA,
|
|
5246
|
+
extend: tuya.extend.switch({
|
|
5247
|
+
electricalMeasurements: true, powerOutageMemory: true, indicatorMode: true, childLock: true, endpoints: ['l1', 'l2']}),
|
|
5248
|
+
endpoint: (device) => {
|
|
5249
|
+
return {l1: 1, l2: 2};
|
|
5250
|
+
},
|
|
5251
|
+
meta: {multiEndpoint: true, multiEndpointSkip: ['energy', 'current', 'voltage', 'power']},
|
|
5252
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
5253
|
+
await tuya.configureMagicPacket(device, coordinatorEndpoint, logger);
|
|
5254
|
+
const endpoint = device.getEndpoint(1);
|
|
5255
|
+
endpoint.saveClusterAttributeKeyValue('haElectricalMeasurement', {acCurrentDivisor: 1000, acCurrentMultiplier: 1});
|
|
5256
|
+
endpoint.saveClusterAttributeKeyValue('seMetering', {divisor: 100, multiplier: 1});
|
|
5257
|
+
device.save();
|
|
5258
|
+
},
|
|
5259
|
+
options: [exposes.options.measurement_poll_interval()],
|
|
5260
|
+
onEvent: (type, data, device, options) => tuya.onEventMeasurementPoll(type, data, device, options, true, false),
|
|
5261
|
+
},
|
|
5176
5262
|
];
|
package/lib/tuya.js
CHANGED
|
@@ -1663,11 +1663,12 @@ const tuyaTz = {
|
|
|
1663
1663
|
const state = {};
|
|
1664
1664
|
const datapoints = utils.getMetaValue(entity, meta.mapped, 'tuyaDatapoints', undefined, undefined);
|
|
1665
1665
|
if (!datapoints) throw new Error('No datapoints map defined');
|
|
1666
|
-
for (const [
|
|
1667
|
-
const convertedKey = meta.mapped.meta.multiEndpoint && meta.endpoint_name
|
|
1666
|
+
for (const [attr, value] of Object.entries(meta.message)) {
|
|
1667
|
+
const convertedKey = meta.mapped.meta.multiEndpoint && meta.endpoint_name && !attr.startsWith(`${key}_`) ?
|
|
1668
|
+
`${attr}_${meta.endpoint_name}` : attr;
|
|
1668
1669
|
const dpEntry = datapoints.find((d) => d[1] === convertedKey);
|
|
1669
1670
|
if (!dpEntry || !dpEntry[1]) {
|
|
1670
|
-
throw new Error(`No datapoint defined for '${
|
|
1671
|
+
throw new Error(`No datapoint defined for '${attr}'`);
|
|
1671
1672
|
}
|
|
1672
1673
|
if (dpEntry[3] && dpEntry[3].skip && dpEntry[3].skip(meta)) continue;
|
|
1673
1674
|
const dpId = dpEntry[0];
|