zigbee-herdsman-converters 14.0.423 → 14.0.427
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/converters/fromZigbee.js +16 -3
- package/converters/toZigbee.js +16 -2
- package/devices/aurora_lighting.js +29 -7
- package/devices/bega.js +7 -0
- package/devices/enbrighten.js +7 -1
- package/devices/gidealed.js +11 -0
- package/devices/jumitech.js +18 -0
- package/devices/lixee.js +48 -29
- package/devices/meazon.js +1 -1
- package/devices/miboxer.js +7 -4
- package/devices/moes.js +2 -1
- package/devices/philips.js +10 -1
- package/devices/schneider_electric.js +10 -6
- package/devices/sonoff.js +2 -2
- package/devices/stelpro.js +3 -3
- package/devices/the_light_group.js +7 -0
- package/devices/tuya.js +53 -10
- package/devices/xiaomi.js +12 -16
- package/lib/constants.js +8 -0
- package/lib/legacy.js +8 -6
- package/lib/utils.js +2 -1
- package/npm-shrinkwrap.json +76 -76
- package/package.json +3 -3
- package/devices/cr_smart_home.js +0 -51
package/converters/fromZigbee.js
CHANGED
|
@@ -1837,7 +1837,7 @@ const converters = {
|
|
|
1837
1837
|
case tuya.dataPoints.nousBattery:
|
|
1838
1838
|
return {battery: value};
|
|
1839
1839
|
case tuya.dataPoints.nousTempUnitConvert:
|
|
1840
|
-
return {temperature_unit_convert: {0x00: '
|
|
1840
|
+
return {temperature_unit_convert: {0x00: 'celsius', 0x01: 'fahrenheit'}[value]};
|
|
1841
1841
|
case tuya.dataPoints.nousMaxTemp:
|
|
1842
1842
|
return {max_temperature: calibrateAndPrecisionRoundOptions(value / 10, options, 'temperature')};
|
|
1843
1843
|
case tuya.dataPoints.nousMinTemp:
|
|
@@ -3224,8 +3224,9 @@ const converters = {
|
|
|
3224
3224
|
}
|
|
3225
3225
|
|
|
3226
3226
|
if (msg.data.hasOwnProperty('12288')) {
|
|
3227
|
-
result.energy_consumed = precisionRound(msg.data['12288'], 2);
|
|
3227
|
+
result.energy_consumed = precisionRound(msg.data['12288'], 2); // deprecated
|
|
3228
3228
|
result.energyconsumed = result.energy_consumed; // deprecated
|
|
3229
|
+
result.energy = result.energy_consumed;
|
|
3229
3230
|
}
|
|
3230
3231
|
|
|
3231
3232
|
if (msg.data.hasOwnProperty('12291')) {
|
|
@@ -5524,7 +5525,7 @@ const converters = {
|
|
|
5524
5525
|
|
|
5525
5526
|
// Maybe other QKBG also support release/hold?
|
|
5526
5527
|
const actionLookup = !isLegacyEnabled(options) && ['QBKG03LM', 'QBKG22LM', 'QBKG04LM', 'QBKG21LM'].includes(model.model) ?
|
|
5527
|
-
{0: 'hold', 1: 'release'} : {0: 'single', 1: 'single'};
|
|
5528
|
+
{0: 'hold', 1: 'release', 2: 'double'} : {0: 'single', 1: 'single'};
|
|
5528
5529
|
|
|
5529
5530
|
// Dont' use postfixWithEndpointName here, endpoints don't match
|
|
5530
5531
|
if (mapping) {
|
|
@@ -7540,6 +7541,17 @@ const converters = {
|
|
|
7540
7541
|
return result;
|
|
7541
7542
|
},
|
|
7542
7543
|
},
|
|
7544
|
+
wiser_lighting_ballast_configuration: {
|
|
7545
|
+
cluster: 'lightingBallastCfg',
|
|
7546
|
+
type: ['attributeReport', 'readResponse'],
|
|
7547
|
+
convert: (model, msg, publish, options, meta) => {
|
|
7548
|
+
const result = converters.lighting_ballast_configuration.convert(model, msg, publish, options, meta);
|
|
7549
|
+
if (msg.data.hasOwnProperty('wiserControlMode')) {
|
|
7550
|
+
result.dimmer_mode = constants.wiserDimmerControlMode[msg.data['wiserControlMode']];
|
|
7551
|
+
}
|
|
7552
|
+
return result;
|
|
7553
|
+
},
|
|
7554
|
+
},
|
|
7543
7555
|
schneider_ui_action: {
|
|
7544
7556
|
cluster: 'wiserDeviceInfo',
|
|
7545
7557
|
type: 'attributeReport',
|
|
@@ -8153,6 +8165,7 @@ const converters = {
|
|
|
8153
8165
|
}
|
|
8154
8166
|
if (dp === tuya.dataPoints.hochTotalActivePower) {
|
|
8155
8167
|
result.energy_consumed = value / 100;
|
|
8168
|
+
result.energy = result.energy_consumed;
|
|
8156
8169
|
}
|
|
8157
8170
|
if (dp === tuya.dataPoints.hochLocking) {
|
|
8158
8171
|
result.trip = value ? 'trip' : 'clear';
|
package/converters/toZigbee.js
CHANGED
|
@@ -2449,7 +2449,9 @@ const converters = {
|
|
|
2449
2449
|
matsee_garage_door_opener: {
|
|
2450
2450
|
key: ['trigger'],
|
|
2451
2451
|
convertSet: (entity, key, value, meta) => {
|
|
2452
|
-
|
|
2452
|
+
const state = meta.message.hasOwnProperty('trigger') ? meta.message.trigger : true;
|
|
2453
|
+
tuya.sendDataPointBool(entity, tuya.dataPoints.garageDoorTrigger, state);
|
|
2454
|
+
return {state: {trigger: state}};
|
|
2453
2455
|
},
|
|
2454
2456
|
},
|
|
2455
2457
|
SPZ01_power_outage_memory: {
|
|
@@ -5289,7 +5291,7 @@ const converters = {
|
|
|
5289
5291
|
convertSet: async (entity, key, value, meta) => {
|
|
5290
5292
|
switch (key) {
|
|
5291
5293
|
case 'temperature_unit_convert':
|
|
5292
|
-
await tuya.sendDataPointEnum(entity, tuya.dataPoints.nousTempUnitConvert, ['
|
|
5294
|
+
await tuya.sendDataPointEnum(entity, tuya.dataPoints.nousTempUnitConvert, ['celsius', 'fahrenheit'].indexOf(value));
|
|
5293
5295
|
break;
|
|
5294
5296
|
case 'min_temperature':
|
|
5295
5297
|
await tuya.sendDataPointValue(entity, tuya.dataPoints.nousMinTemp, Math.round(value * 10));
|
|
@@ -6317,6 +6319,18 @@ const converters = {
|
|
|
6317
6319
|
await entity.read('lightingBallastCfg', [0xe000], {manufacturerCode: 0x105e});
|
|
6318
6320
|
},
|
|
6319
6321
|
},
|
|
6322
|
+
wiser_dimmer_mode: {
|
|
6323
|
+
key: ['dimmer_mode'],
|
|
6324
|
+
convertSet: async (entity, key, value, meta) => {
|
|
6325
|
+
const controlMode = utils.getKey(constants.wiserDimmerControlMode, value, value, Number);
|
|
6326
|
+
await entity.write('lightingBallastCfg', {'wiserControlMode': controlMode},
|
|
6327
|
+
{manufacturerCode: herdsman.Zcl.ManufacturerCode.SCHNEIDER});
|
|
6328
|
+
return {state: {dimmer_mode: value}};
|
|
6329
|
+
},
|
|
6330
|
+
convertGet: async (entity, key, meta) => {
|
|
6331
|
+
await entity.read('lightingBallastCfg', ['wiserControlMode'], {manufacturerCode: herdsman.Zcl.ManufacturerCode.SCHNEIDER});
|
|
6332
|
+
},
|
|
6333
|
+
},
|
|
6320
6334
|
schneider_temperature_measured_value: {
|
|
6321
6335
|
key: ['temperature_measured_value'],
|
|
6322
6336
|
convertSet: async (entity, key, value, meta) => {
|
|
@@ -4,7 +4,7 @@ const tz = require('../converters/toZigbee');
|
|
|
4
4
|
const reporting = require('../lib/reporting');
|
|
5
5
|
const extend = require('../lib/extend');
|
|
6
6
|
const e = exposes.presets;
|
|
7
|
-
const utils = require('
|
|
7
|
+
const utils = require('../lib/utils');
|
|
8
8
|
const ea = exposes.access;
|
|
9
9
|
|
|
10
10
|
const tzLocal = {
|
|
@@ -20,6 +20,14 @@ const tzLocal = {
|
|
|
20
20
|
},
|
|
21
21
|
};
|
|
22
22
|
|
|
23
|
+
const disableBatteryRotaryDimmerReporting = async (endpoint) => {
|
|
24
|
+
// The default is for the device to also report the on/off and
|
|
25
|
+
// brightness at the same time as sending on/off and step commands.
|
|
26
|
+
// Disable the reporting by setting the max interval to 0xFFFF.
|
|
27
|
+
await reporting.brightness(endpoint, {max: 0xFFFF});
|
|
28
|
+
await reporting.onOff(endpoint, {max: 0xFFFF});
|
|
29
|
+
};
|
|
30
|
+
|
|
23
31
|
const batteryRotaryDimmer = (...endpointsIds) => ({
|
|
24
32
|
fromZigbee: [fz.battery, fz.command_on, fz.command_off, fz.command_step, fz.command_step_color_temperature],
|
|
25
33
|
toZigbee: [],
|
|
@@ -32,15 +40,29 @@ const batteryRotaryDimmer = (...endpointsIds) => ({
|
|
|
32
40
|
await reporting.batteryVoltage(endpoints[0]);
|
|
33
41
|
|
|
34
42
|
for await (const endpoint of endpoints) {
|
|
35
|
-
logger.debug(`processing endpoint ${endpoint.ID}`);
|
|
36
43
|
await reporting.bind(endpoint, coordinatorEndpoint,
|
|
37
44
|
['genIdentify', 'genOnOff', 'genLevelCtrl', 'lightingColorCtrl']);
|
|
38
45
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
46
|
+
await disableBatteryRotaryDimmerReporting(endpoint);
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
onEvent: async (type, data, device) => {
|
|
50
|
+
// The rotary dimmer devices appear to lose the configured reportings when they
|
|
51
|
+
// re-announce themselves which they do roughly every 6 hours.
|
|
52
|
+
if (type === 'deviceAnnounce') {
|
|
53
|
+
for (const endpoint of device.endpoints) {
|
|
54
|
+
// First disable the default reportings (for the dimmer endpoints only)
|
|
55
|
+
if ([1, 2].includes(endpoint.ID)) {
|
|
56
|
+
await disableBatteryRotaryDimmerReporting(endpoint);
|
|
57
|
+
}
|
|
58
|
+
// Then re-apply the configured reportings
|
|
59
|
+
for (const c of endpoint.configuredReportings) {
|
|
60
|
+
await endpoint.configureReporting(c.cluster.name, [{
|
|
61
|
+
attribute: c.attribute.name, minimumReportInterval: c.minimumReportInterval,
|
|
62
|
+
maximumReportInterval: c.maximumReportInterval, reportableChange: c.reportableChange,
|
|
63
|
+
}]);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
44
66
|
}
|
|
45
67
|
},
|
|
46
68
|
});
|
package/devices/bega.js
CHANGED
|
@@ -12,4 +12,11 @@ module.exports = [
|
|
|
12
12
|
description: 'Zigbee control module DALI',
|
|
13
13
|
extend: extend.light_onoff_brightness(),
|
|
14
14
|
},
|
|
15
|
+
{
|
|
16
|
+
zigbeeModel: ['BEGA 13557 bulb E27 RGBW 805lm'],
|
|
17
|
+
model: '13557',
|
|
18
|
+
vendor: 'Bega',
|
|
19
|
+
description: 'LED lamp with adjustable LED color temperature (Tunable White - RGBW) for use in luminaires with E27 lamp base',
|
|
20
|
+
extend: extend.light_onoff_brightness_colortemp_color({colorTempRange: [153, 556]}),
|
|
21
|
+
},
|
|
15
22
|
];
|
package/devices/enbrighten.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
const fz = {...require('../converters/fromZigbee'), legacy: require('../lib/legacy').fromZigbee};
|
|
2
|
+
const exposes = require('../lib/exposes');
|
|
2
3
|
const reporting = require('../lib/reporting');
|
|
3
4
|
const extend = require('../lib/extend');
|
|
5
|
+
const e = exposes.presets;
|
|
4
6
|
|
|
5
7
|
module.exports = [
|
|
6
8
|
{
|
|
@@ -21,11 +23,15 @@ module.exports = [
|
|
|
21
23
|
vendor: 'Enbrighten',
|
|
22
24
|
description: 'Zigbee in-wall smart switch',
|
|
23
25
|
extend: extend.switch(),
|
|
26
|
+
fromZigbee: [...extend.switch().fromZigbee, fz.metering],
|
|
24
27
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
25
28
|
const endpoint = device.getEndpoint(1);
|
|
26
|
-
await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff']);
|
|
29
|
+
await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff', 'seMetering']);
|
|
27
30
|
await reporting.onOff(endpoint);
|
|
31
|
+
await reporting.readMeteringMultiplierDivisor(endpoint);
|
|
32
|
+
await reporting.instantaneousDemand(endpoint);
|
|
28
33
|
},
|
|
34
|
+
exposes: [e.switch(), e.power(), e.energy()],
|
|
29
35
|
},
|
|
30
36
|
{
|
|
31
37
|
zigbeeModel: ['43080'],
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
const extend = require('../lib/extend');
|
|
2
|
+
|
|
3
|
+
module.exports = [
|
|
4
|
+
{
|
|
5
|
+
zigbeeModel: ['A11'],
|
|
6
|
+
model: 'ZC05M',
|
|
7
|
+
vendor: 'GIDEALED',
|
|
8
|
+
description: 'Smart Zigbee RGB LED strip controller',
|
|
9
|
+
extend: extend.light_onoff_brightness_colortemp_color({supportsHS: true, colorTempRange: [153, 500]}),
|
|
10
|
+
},
|
|
11
|
+
];
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
const reporting = require('../lib/reporting');
|
|
2
|
+
const extend = require('../lib/extend');
|
|
3
|
+
|
|
4
|
+
module.exports = [
|
|
5
|
+
{
|
|
6
|
+
zigbeeModel: ['J2182548'],
|
|
7
|
+
model: 'J2182548',
|
|
8
|
+
vendor: 'JUMITECH APS',
|
|
9
|
+
description: 'ZigBee AC phase-cut dimmer single-line',
|
|
10
|
+
extend: extend.light_onoff_brightness({noConfigure: true}),
|
|
11
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
12
|
+
await extend.light_onoff_brightness().configure(device, coordinatorEndpoint, logger);
|
|
13
|
+
const endpoint = device.getEndpoint(1);
|
|
14
|
+
await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff', 'genLevelCtrl']);
|
|
15
|
+
await reporting.onOff(endpoint);
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
];
|
package/devices/lixee.js
CHANGED
|
@@ -192,6 +192,9 @@ const fzLocal = {
|
|
|
192
192
|
},
|
|
193
193
|
};
|
|
194
194
|
|
|
195
|
+
|
|
196
|
+
// we are doing it with exclusion and not inclusion because the list is dynamic (based on zlinky mode),
|
|
197
|
+
// and change based on that. Just some few attributes are useless, so we exclude them
|
|
195
198
|
const tarifsDef = {
|
|
196
199
|
histo_BASE: {fname: 'Historique - BASE',
|
|
197
200
|
currentTarf: 'BASE', excluded: [
|
|
@@ -295,19 +298,19 @@ const clustersDef = {
|
|
|
295
298
|
const exposedData = [
|
|
296
299
|
// Historique
|
|
297
300
|
{cluster: clustersDef._0x0702, att: 'meterSerialNumber', reportable: false, onlyProducer: false, linkyPhase: linkyPhaseDef.single, linkyMode: linkyModeDef.legacy, exposes: exposes.text('ADCO', ea.STATE).withProperty('meter_serial_number').withDescription('Serial Number')},
|
|
298
|
-
{cluster: clustersDef._0x0702, att: 'currentSummDelivered', reportable: true, report: {change: 100}, onlyProducer: false, linkyPhase: linkyPhaseDef.
|
|
301
|
+
{cluster: clustersDef._0x0702, att: 'currentSummDelivered', reportable: true, report: {change: 100}, onlyProducer: false, linkyPhase: linkyPhaseDef.all, linkyMode: linkyModeDef.legacy, exposes: exposes.numeric('BASE', ea.STATE).withUnit('kWh').withProperty('current_summ_delivered').withDescription('Base index')},
|
|
299
302
|
{cluster: clustersDef._0xFF66, att: 'currentTarif', reportable: false, onlyProducer: false, linkyPhase: linkyPhaseDef.single, linkyMode: linkyModeDef.legacy, exposes: exposes.text('OPTARIF', ea.STATE).withProperty('current_tarif').withDescription('Tarif option')},
|
|
300
303
|
{cluster: clustersDef._0x0B01, att: 'availablePower', reportable: false, onlyProducer: false, linkyPhase: linkyPhaseDef.single, linkyMode: linkyModeDef.legacy, exposes: exposes.numeric('ISOUSC', ea.STATE).withUnit('A').withProperty('available_power').withDescription('Subscribed intensity level')},
|
|
301
|
-
{cluster: clustersDef._0x0702, att: 'currentTier1SummDelivered', reportable: false, report: {change: 100
|
|
302
|
-
{cluster: clustersDef._0x0702, att: 'currentTier2SummDelivered', reportable: false, report: {change: 100
|
|
303
|
-
{cluster: clustersDef._0x0702, att: 'currentTier1SummDelivered', reportable: false, report: {change: 100
|
|
304
|
-
{cluster: clustersDef._0x0702, att: 'currentTier2SummDelivered', reportable: false, report: {change: 100
|
|
305
|
-
{cluster: clustersDef._0x0702, att: 'currentTier1SummDelivered', reportable: false, report: {change: 100
|
|
306
|
-
{cluster: clustersDef._0x0702, att: 'currentTier2SummDelivered', reportable: false, report: {change: 100
|
|
307
|
-
{cluster: clustersDef._0x0702, att: 'currentTier3SummDelivered', reportable: false, report: {change: 100
|
|
308
|
-
{cluster: clustersDef._0x0702, att: 'currentTier4SummDelivered', reportable: false, report: {change: 100
|
|
309
|
-
{cluster: clustersDef._0x0702, att: 'currentTier5SummDelivered', reportable: false, report: {change: 100
|
|
310
|
-
{cluster: clustersDef._0x0702, att: 'currentTier6SummDelivered', reportable: false, report: {change: 100
|
|
304
|
+
{cluster: clustersDef._0x0702, att: 'currentTier1SummDelivered', reportable: false, report: {change: 100}, onlyProducer: false, linkyPhase: linkyPhaseDef.single, linkyMode: linkyModeDef.legacy, exposes: exposes.numeric('HCHC', ea.STATE).withUnit('kWh').withProperty('current_tier1_summ_delivered').withDescription('HCHC index')},
|
|
305
|
+
{cluster: clustersDef._0x0702, att: 'currentTier2SummDelivered', reportable: false, report: {change: 100}, onlyProducer: false, linkyPhase: linkyPhaseDef.single, linkyMode: linkyModeDef.legacy, exposes: exposes.numeric('HCHP', ea.STATE).withUnit('kWh').withProperty('current_tier2_summ_delivered').withDescription('HCHP index')},
|
|
306
|
+
{cluster: clustersDef._0x0702, att: 'currentTier1SummDelivered', reportable: false, report: {change: 100}, onlyProducer: false, linkyPhase: linkyPhaseDef.single, linkyMode: linkyModeDef.legacy, exposes: exposes.numeric('EJPHN', ea.STATE).withUnit('kWh').withProperty('current_tier1_summ_delivered').withDescription('EJPHN index')},
|
|
307
|
+
{cluster: clustersDef._0x0702, att: 'currentTier2SummDelivered', reportable: false, report: {change: 100}, onlyProducer: false, linkyPhase: linkyPhaseDef.single, linkyMode: linkyModeDef.legacy, exposes: exposes.numeric('EJPHPM', ea.STATE).withUnit('kWh').withProperty('current_tier2_summ_delivered').withDescription('EJPHPM index')},
|
|
308
|
+
{cluster: clustersDef._0x0702, att: 'currentTier1SummDelivered', reportable: false, report: {change: 100}, onlyProducer: false, linkyPhase: linkyPhaseDef.single, linkyMode: linkyModeDef.legacy, exposes: exposes.numeric('BBRHCJB', ea.STATE).withUnit('kWh').withProperty('current_tier1_summ_delivered').withDescription('BBRHCJB index')},
|
|
309
|
+
{cluster: clustersDef._0x0702, att: 'currentTier2SummDelivered', reportable: false, report: {change: 100}, onlyProducer: false, linkyPhase: linkyPhaseDef.single, linkyMode: linkyModeDef.legacy, exposes: exposes.numeric('BBRHPJB', ea.STATE).withUnit('kWh').withProperty('current_tier2_summ_delivered').withDescription('BBRHPJB index')},
|
|
310
|
+
{cluster: clustersDef._0x0702, att: 'currentTier3SummDelivered', reportable: false, report: {change: 100}, onlyProducer: false, linkyPhase: linkyPhaseDef.single, linkyMode: linkyModeDef.legacy, exposes: exposes.numeric('BBRHCJW', ea.STATE).withUnit('kWh').withProperty('current_tier3_summ_delivered').withDescription('BBRHCJW index')},
|
|
311
|
+
{cluster: clustersDef._0x0702, att: 'currentTier4SummDelivered', reportable: false, report: {change: 100}, onlyProducer: false, linkyPhase: linkyPhaseDef.single, linkyMode: linkyModeDef.legacy, exposes: exposes.numeric('BBRHPJW', ea.STATE).withUnit('kWh').withProperty('current_tier4_summ_delivered').withDescription('BBRHPJW index')},
|
|
312
|
+
{cluster: clustersDef._0x0702, att: 'currentTier5SummDelivered', reportable: false, report: {change: 100}, onlyProducer: false, linkyPhase: linkyPhaseDef.single, linkyMode: linkyModeDef.legacy, exposes: exposes.numeric('BBRHCJR', ea.STATE).withUnit('kWh').withProperty('current_tier5_summ_delivered').withDescription('BBRHCJR index')},
|
|
313
|
+
{cluster: clustersDef._0x0702, att: 'currentTier6SummDelivered', reportable: false, report: {change: 100}, onlyProducer: false, linkyPhase: linkyPhaseDef.single, linkyMode: linkyModeDef.legacy, exposes: exposes.numeric('BBRHPJR', ea.STATE).withUnit('kWh').withProperty('current_tier6_summ_delivered').withDescription('BBRHPJR index')},
|
|
311
314
|
{cluster: clustersDef._0x0B04, att: 'rmsCurrent', reportable: true, onlyProducer: false, linkyPhase: linkyPhaseDef.single, linkyMode: linkyModeDef.legacy, exposes: exposes.numeric('IINST', ea.STATE).withUnit('A').withProperty('rms_current').withDescription('RMS current')},
|
|
312
315
|
{cluster: clustersDef._0x0B04, att: 'rmsCurrent', reportable: true, onlyProducer: false, linkyPhase: linkyPhaseDef.three, linkyMode: linkyModeDef.legacy, exposes: exposes.numeric('IINST1', ea.STATE).withUnit('A').withProperty('rms_current').withDescription('RMS current (phase 1)')},
|
|
313
316
|
{cluster: clustersDef._0x0B04, att: 'rmsCurrentPhB', reportable: true, onlyProducer: false, linkyPhase: linkyPhaseDef.three, linkyMode: linkyModeDef.legacy, exposes: exposes.numeric('IINST2', ea.STATE).withUnit('A').withProperty('rms_current_ph_b').withDescription('RMS current (phase 2)')},
|
|
@@ -317,7 +320,7 @@ const exposedData = [
|
|
|
317
320
|
{cluster: clustersDef._0x0B04, att: 'rmsCurrentMaxPhB', reportable: false, onlyProducer: false, linkyPhase: linkyPhaseDef.three, linkyMode: linkyModeDef.legacy, exposes: exposes.numeric('IMAX2', ea.STATE).withUnit('A').withProperty('rms_current_max_ph_b').withDescription('RMS current peak (phase 2)')},
|
|
318
321
|
{cluster: clustersDef._0x0B04, att: 'rmsCurrentMaxPhC', reportable: false, onlyProducer: false, linkyPhase: linkyPhaseDef.three, linkyMode: linkyModeDef.legacy, exposes: exposes.numeric('IMAX3', ea.STATE).withUnit('A').withProperty('rms_current_max_ph_c').withDescription('RMS current peak (phase 3)')},
|
|
319
322
|
{cluster: clustersDef._0x0B04, att: 'activePowerMax', reportable: false, onlyProducer: false, linkyPhase: linkyPhaseDef.three, linkyMode: linkyModeDef.legacy, exposes: exposes.numeric('PMAX', ea.STATE).withUnit('W').withProperty('active_power_max').withDescription('Three-phase power peak')},
|
|
320
|
-
{cluster: clustersDef._0x0B04, att: 'apparentPower', reportable: true, onlyProducer: false, linkyPhase: linkyPhaseDef.
|
|
323
|
+
{cluster: clustersDef._0x0B04, att: 'apparentPower', reportable: true, onlyProducer: false, linkyPhase: linkyPhaseDef.all, linkyMode: linkyModeDef.legacy, exposes: exposes.numeric('PAPP', ea.STATE).withUnit('VA').withProperty('apparent_power').withDescription('Apparent power')},
|
|
321
324
|
{cluster: clustersDef._0x0702, att: 'activeRegisterTierDelivered', reportable: false, onlyProducer: false, linkyPhase: linkyPhaseDef.single, linkyMode: linkyModeDef.legacy, exposes: exposes.text('PTEC', ea.STATE).withProperty('active_register_tier_delivered').withDescription('Current pricing period')},
|
|
322
325
|
{cluster: clustersDef._0xFF66, att: 'tomorrowColor', reportable: true, onlyProducer: false, linkyPhase: linkyPhaseDef.single, linkyMode: linkyModeDef.legacy, exposes: exposes.text('DEMAIN', ea.STATE).withProperty('tomorrow_color').withDescription('Tomorrow color')},
|
|
323
326
|
{cluster: clustersDef._0xFF66, att: 'scheduleHPHC', reportable: false, onlyProducer: false, linkyPhase: linkyPhaseDef.single, linkyMode: linkyModeDef.legacy, exposes: exposes.numeric('HHPHC', ea.STATE).withProperty('schedule_h_p_h_c').withDescription('Schedule HPHC')},
|
|
@@ -334,16 +337,16 @@ const exposedData = [
|
|
|
334
337
|
{cluster: clustersDef._0x0B01, att: 'softwareRevision', reportable: false, onlyProducer: false, linkyPhase: linkyPhaseDef.single, linkyMode: linkyModeDef.standard, exposes: exposes.numeric('VTIC', ea.STATE).withProperty('software_revision').withDescription('Customer tele-information protocol version')},
|
|
335
338
|
{cluster: clustersDef._0xFF66, att: 'currentDate', reportable: false, onlyProducer: false, linkyPhase: linkyPhaseDef.single, linkyMode: linkyModeDef.standard, exposes: exposes.text('DATE', ea.STATE).withProperty('current_date').withDescription('Current date and time')},
|
|
336
339
|
{cluster: clustersDef._0x0702, att: 'currentSummDelivered', reportable: true, report: {change: 100}, onlyProducer: false, linkyPhase: linkyPhaseDef.single, linkyMode: linkyModeDef.standard, exposes: exposes.numeric('EAST', ea.STATE).withUnit('kWh').withProperty('current_summ_delivered').withDescription('Total active power delivered')},
|
|
337
|
-
{cluster: clustersDef._0x0702, att: 'currentTier1SummDelivered', reportable: true, report: {change: 100
|
|
338
|
-
{cluster: clustersDef._0x0702, att: 'currentTier2SummDelivered', reportable: true, report: {change: 100
|
|
339
|
-
{cluster: clustersDef._0x0702, att: 'currentTier3SummDelivered', reportable: true, report: {change: 100
|
|
340
|
-
{cluster: clustersDef._0x0702, att: 'currentTier4SummDelivered', reportable: false, report: {change: 100
|
|
341
|
-
{cluster: clustersDef._0x0702, att: 'currentTier5SummDelivered', reportable: false, report: {change: 100
|
|
342
|
-
{cluster: clustersDef._0x0702, att: 'currentTier6SummDelivered', reportable: false, report: {change: 100
|
|
343
|
-
{cluster: clustersDef._0x0702, att: 'currentTier7SummDelivered', reportable: false, report: {change: 100
|
|
344
|
-
{cluster: clustersDef._0x0702, att: 'currentTier8SummDelivered', reportable: false, report: {change: 100
|
|
345
|
-
{cluster: clustersDef._0x0702, att: 'currentTier9SummDelivered', reportable: false, report: {change: 100
|
|
346
|
-
{cluster: clustersDef._0x0702, att: 'currentTier10SummDelivered', reportable: false, report: {change: 100
|
|
340
|
+
{cluster: clustersDef._0x0702, att: 'currentTier1SummDelivered', reportable: true, report: {change: 100}, onlyProducer: false, linkyPhase: linkyPhaseDef.single, linkyMode: linkyModeDef.standard, exposes: exposes.numeric('EASF01', ea.STATE).withUnit('kWh').withProperty('current_tier1_summ_delivered').withDescription('Total provider active power delivered (index 01)')},
|
|
341
|
+
{cluster: clustersDef._0x0702, att: 'currentTier2SummDelivered', reportable: true, report: {change: 100}, onlyProducer: false, linkyPhase: linkyPhaseDef.single, linkyMode: linkyModeDef.standard, exposes: exposes.numeric('EASF02', ea.STATE).withUnit('kWh').withProperty('current_tier2_summ_delivered').withDescription('Total provider active power delivered (index 02)')},
|
|
342
|
+
{cluster: clustersDef._0x0702, att: 'currentTier3SummDelivered', reportable: true, report: {change: 100}, onlyProducer: false, linkyPhase: linkyPhaseDef.single, linkyMode: linkyModeDef.standard, exposes: exposes.numeric('EASF03', ea.STATE).withUnit('kWh').withProperty('current_tier3_summ_delivered').withDescription('Total provider active power delivered (index 03)')},
|
|
343
|
+
{cluster: clustersDef._0x0702, att: 'currentTier4SummDelivered', reportable: false, report: {change: 100}, onlyProducer: false, linkyPhase: linkyPhaseDef.single, linkyMode: linkyModeDef.standard, exposes: exposes.numeric('EASF04', ea.STATE).withUnit('kWh').withProperty('current_tier4_summ_delivered').withDescription('Total provider active power delivered (index 04)')},
|
|
344
|
+
{cluster: clustersDef._0x0702, att: 'currentTier5SummDelivered', reportable: false, report: {change: 100}, onlyProducer: false, linkyPhase: linkyPhaseDef.single, linkyMode: linkyModeDef.standard, exposes: exposes.numeric('EASF05', ea.STATE).withUnit('kWh').withProperty('current_tier5_summ_delivered').withDescription('Total provider active power delivered (index 05)')},
|
|
345
|
+
{cluster: clustersDef._0x0702, att: 'currentTier6SummDelivered', reportable: false, report: {change: 100}, onlyProducer: false, linkyPhase: linkyPhaseDef.single, linkyMode: linkyModeDef.standard, exposes: exposes.numeric('EASF06', ea.STATE).withUnit('kWh').withProperty('current_tier6_summ_delivered').withDescription('Total provider active power delivered (index 06)')},
|
|
346
|
+
{cluster: clustersDef._0x0702, att: 'currentTier7SummDelivered', reportable: false, report: {change: 100}, onlyProducer: false, linkyPhase: linkyPhaseDef.single, linkyMode: linkyModeDef.standard, exposes: exposes.numeric('EASF07', ea.STATE).withUnit('kWh').withProperty('current_tier7_summ_delivered').withDescription('Total provider active power delivered (index 07)')},
|
|
347
|
+
{cluster: clustersDef._0x0702, att: 'currentTier8SummDelivered', reportable: false, report: {change: 100}, onlyProducer: false, linkyPhase: linkyPhaseDef.single, linkyMode: linkyModeDef.standard, exposes: exposes.numeric('EASF08', ea.STATE).withUnit('kWh').withProperty('current_tier8_summ_delivered').withDescription('Total provider active power delivered (index 08)')},
|
|
348
|
+
{cluster: clustersDef._0x0702, att: 'currentTier9SummDelivered', reportable: false, report: {change: 100}, onlyProducer: false, linkyPhase: linkyPhaseDef.single, linkyMode: linkyModeDef.standard, exposes: exposes.numeric('EASF09', ea.STATE).withUnit('kWh').withProperty('current_tier9_summ_delivered').withDescription('Total provider active power delivered (index 09)')},
|
|
349
|
+
{cluster: clustersDef._0x0702, att: 'currentTier10SummDelivered', reportable: false, report: {change: 100}, onlyProducer: false, linkyPhase: linkyPhaseDef.single, linkyMode: linkyModeDef.standard, exposes: exposes.numeric('EASF10', ea.STATE).withUnit('kWh').withProperty('current_tier10_summ_delivered').withDescription('Total provider active power delivered (index 10)')},
|
|
347
350
|
{cluster: clustersDef._0xFF66, att: 'activeEnerfyOutD01', reportable: true, report: {change: 100}, onlyProducer: false, linkyPhase: linkyPhaseDef.single, linkyMode: linkyModeDef.standard, exposes: exposes.numeric('EASD01', ea.STATE).withUnit('kWh').withProperty('active_enerfy_out_d01').withDescription('Active energy withdrawn Distributor (index 01)')},
|
|
348
351
|
{cluster: clustersDef._0xFF66, att: 'activeEnerfyOutD02', reportable: false, report: {change: 100}, onlyProducer: false, linkyPhase: linkyPhaseDef.single, linkyMode: linkyModeDef.standard, exposes: exposes.numeric('EASD02', ea.STATE).withUnit('kWh').withProperty('active_enerfy_out_d02').withDescription('Active energy withdrawn Distributor (index 02)')},
|
|
349
352
|
{cluster: clustersDef._0xFF66, att: 'activeEnerfyOutD03', reportable: false, report: {change: 100}, onlyProducer: false, linkyPhase: linkyPhaseDef.single, linkyMode: linkyModeDef.standard, exposes: exposes.numeric('EASD03', ea.STATE).withUnit('kWh').withProperty('active_enerfy_out_d03').withDescription('Active energy withdrawn Distributor (index 03)')},
|
|
@@ -469,7 +472,7 @@ function getCurrentConfig(device, options, logger=console) {
|
|
|
469
472
|
case linkyMode == linkyModeDef.legacy && tarifsDef.histo_EJP.currentTarf:
|
|
470
473
|
myExpose = myExpose.filter((a) => !tarifsDef.histo_EJP.excluded.includes(a.exposes.name));
|
|
471
474
|
break;
|
|
472
|
-
case linkyMode == linkyModeDef.legacy && currentTarf.startsWith(tarifsDef.histo_BBR.currentTarf):
|
|
475
|
+
case linkyMode == linkyModeDef.legacy && currentTarf && currentTarf.startsWith(tarifsDef.histo_BBR.currentTarf):
|
|
473
476
|
myExpose = myExpose.filter((a) => !tarifsDef.histo_BBR.excluded.includes(a.exposes.name));
|
|
474
477
|
break;
|
|
475
478
|
case linkyMode == linkyModeDef.standard && tarifsDef.stand_SEM_WE_MERCR.currentTarf:
|
|
@@ -514,8 +517,9 @@ const definition = {
|
|
|
514
517
|
.withDescription(`Power with single or three phase. May require restart (default: auto)`),
|
|
515
518
|
exposes.enum(`production`, ea.SET, ['auto', 'true', 'false']).withDescription(`If you produce energy back to the grid (works ONLY when linky_mode: ${linkyModeDef.standard}, default: auto)`),
|
|
516
519
|
exposes.enum(`tarif`, ea.SET, [...Object.entries(tarifsDef).map(( [k, v] ) => (v.fname)), 'auto'])
|
|
517
|
-
.withDescription(`
|
|
520
|
+
.withDescription(`Overrides the automatic current tarif. This option will exclude unnecesary attributes. Open a issue to support more of them. Default: auto`),
|
|
518
521
|
exposes.options.precision(`kWh`),
|
|
522
|
+
exposes.numeric(`measurement_poll_chunk`, ea.SET).withValueMin(1).withDescription(`During the poll, request multiple exposes to the Zlinky at once for reducing Zigbee network overload. Too much request at once could exceed device limit. Requieres Z2M restart. Default: 1`),
|
|
519
523
|
],
|
|
520
524
|
configure: async (device, coordinatorEndpoint, logger, options) => {
|
|
521
525
|
const endpoint = device.getEndpoint(1);
|
|
@@ -544,7 +548,7 @@ const definition = {
|
|
|
544
548
|
for (const e of suscribeNew) {
|
|
545
549
|
let params = {
|
|
546
550
|
att: e.att,
|
|
547
|
-
min:
|
|
551
|
+
min: repInterval.MINUTE,
|
|
548
552
|
max: repInterval.MINUTES_15,
|
|
549
553
|
change: 1,
|
|
550
554
|
};
|
|
@@ -567,18 +571,33 @@ const definition = {
|
|
|
567
571
|
ota: ota.lixee,
|
|
568
572
|
onEvent: async (type, data, device, options) => {
|
|
569
573
|
const endpoint = device.getEndpoint(1);
|
|
570
|
-
if (type === '
|
|
574
|
+
if (type === 'start') {
|
|
575
|
+
endpoint.read('liXeePrivate', ['linkyMode', 'currentTarif'], {manufacturerCode: null});
|
|
576
|
+
} else if (type === 'stop') {
|
|
571
577
|
clearInterval(globalStore.getValue(device, 'interval'));
|
|
572
578
|
globalStore.clearValue(device, 'interval');
|
|
573
579
|
} else if (!globalStore.hasValue(device, 'interval')) {
|
|
574
580
|
const seconds = options && options.measurement_poll_interval ? options.measurement_poll_interval : 60;
|
|
581
|
+
const measurement_poll_chunk = options && options.measurement_poll_chunk ? options.measurement_poll_chunk : 1;
|
|
575
582
|
|
|
576
583
|
const interval = setInterval(async () => {
|
|
577
584
|
const currentExposes = getCurrentConfig(device, options)
|
|
578
585
|
.filter((e) => !endpoint.configuredReportings.some((r) => r.cluster.name == e.cluster && r.attribute.name == e.att));
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
586
|
+
|
|
587
|
+
for (const key in clustersDef) {
|
|
588
|
+
if (Object.hasOwnProperty.call(clustersDef, key)) {
|
|
589
|
+
const cluster = clustersDef[key];
|
|
590
|
+
|
|
591
|
+
const targ = currentExposes.filter((e)=> e.cluster == cluster).map((e)=> e.att);
|
|
592
|
+
if (targ.length) {
|
|
593
|
+
let i; let j;
|
|
594
|
+
// Split array by chunks
|
|
595
|
+
for (i = 0, j = targ.length; i < j; i += measurement_poll_chunk) {
|
|
596
|
+
await endpoint
|
|
597
|
+
.read(cluster, targ.slice(i, i + measurement_poll_chunk), {manufacturerCode: null});
|
|
598
|
+
}
|
|
599
|
+
}
|
|
600
|
+
}
|
|
582
601
|
}
|
|
583
602
|
}, seconds * 1000);
|
|
584
603
|
globalStore.putValue(device, 'interval', interval);
|
package/devices/meazon.js
CHANGED
|
@@ -13,7 +13,7 @@ module.exports = [
|
|
|
13
13
|
vendor: 'Meazon',
|
|
14
14
|
description: 'Bizy plug meter',
|
|
15
15
|
fromZigbee: [fz.command_on, fz.legacy.genOnOff_cmdOn, fz.command_off, fz.legacy.genOnOff_cmdOff, fz.on_off, fz.meazon_meter],
|
|
16
|
-
exposes: [e.switch(), e.power(), e.voltage(), e.current()],
|
|
16
|
+
exposes: [e.switch(), e.power(), e.voltage(), e.current(), e.energy()],
|
|
17
17
|
toZigbee: [tz.on_off],
|
|
18
18
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
19
19
|
const endpoint = device.getEndpoint(10);
|
package/devices/miboxer.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
const exposes = require('../lib/exposes');
|
|
2
|
-
const fz = {...require('../converters/fromZigbee'), legacy: require('../lib/legacy').fromZigbee};
|
|
3
2
|
const tz = require('../converters/toZigbee');
|
|
4
3
|
const e = exposes.presets;
|
|
5
4
|
const ea = exposes.access;
|
|
@@ -12,8 +11,11 @@ module.exports = [
|
|
|
12
11
|
model: 'FUT039Z',
|
|
13
12
|
vendor: 'Miboxer',
|
|
14
13
|
description: 'RGB+CCT LED controller',
|
|
15
|
-
toZigbee:
|
|
16
|
-
|
|
14
|
+
toZigbee: extend.light_onoff_brightness_colortemp_color().toZigbee.concat([
|
|
15
|
+
tz.tuya_do_not_disturb, tz.tuya_color_power_on_behavior,
|
|
16
|
+
]),
|
|
17
|
+
meta: {applyRedFix: true, enhancedHue: false},
|
|
18
|
+
fromZigbee: extend.light_onoff_brightness_colortemp_color().fromZigbee,
|
|
17
19
|
exposes: [e.light_brightness_colortemp_colorhs([153, 500]).removeFeature('color_temp_startup'),
|
|
18
20
|
exposes.binary('do_not_disturb', ea.STATE_SET, true, false)
|
|
19
21
|
.withDescription('Do not disturb mode'),
|
|
@@ -31,7 +33,8 @@ module.exports = [
|
|
|
31
33
|
onEvent: tuya.onEventSetTime,
|
|
32
34
|
},
|
|
33
35
|
{
|
|
34
|
-
fingerprint: [{modelID: 'TS0502B', manufacturerName: '_TZ3210_frm6149r'}
|
|
36
|
+
fingerprint: [{modelID: 'TS0502B', manufacturerName: '_TZ3210_frm6149r'},
|
|
37
|
+
{modelID: 'TS0502B', manufacturerName: '_TZ3210_jtifm80b'}],
|
|
35
38
|
model: 'FUT035Z',
|
|
36
39
|
description: 'Dual white LED controller',
|
|
37
40
|
vendor: 'Miboxer',
|
package/devices/moes.js
CHANGED
|
@@ -10,7 +10,8 @@ const ea = exposes.access;
|
|
|
10
10
|
|
|
11
11
|
module.exports = [
|
|
12
12
|
{
|
|
13
|
-
fingerprint: [{modelID: 'TS011F', manufacturerName: '_TZ3000_cymsnfvf'}
|
|
13
|
+
fingerprint: [{modelID: 'TS011F', manufacturerName: '_TZ3000_cymsnfvf'},
|
|
14
|
+
{modelID: 'TS011F', manufacturerName: '_TZ3000_2xlvlnez'}],
|
|
14
15
|
model: 'ZP-LZ-FR2U',
|
|
15
16
|
vendor: 'Moes',
|
|
16
17
|
description: 'Zigbee 3.0 dual USB wireless socket plug',
|
package/devices/philips.js
CHANGED
|
@@ -2437,6 +2437,15 @@ module.exports = [
|
|
|
2437
2437
|
extend: hueExtend.light_onoff_brightness_colortemp({colorTempRange: [153, 454]}),
|
|
2438
2438
|
ota: ota.zigbeeOTA,
|
|
2439
2439
|
},
|
|
2440
|
+
{
|
|
2441
|
+
zigbeeModel: ['LCX001'],
|
|
2442
|
+
model: '929002422702',
|
|
2443
|
+
vendor: 'Philips',
|
|
2444
|
+
description: 'Hue Play gradient lightstrip 55',
|
|
2445
|
+
meta: {turnsOffAtBrightness1: true},
|
|
2446
|
+
extend: hueExtend.light_onoff_brightness_colortemp_color({colorTempRange: [153, 500]}),
|
|
2447
|
+
ota: ota.zigbeeOTA,
|
|
2448
|
+
},
|
|
2440
2449
|
{
|
|
2441
2450
|
zigbeeModel: ['LCX002'],
|
|
2442
2451
|
model: '929002422801',
|
|
@@ -2492,7 +2501,7 @@ module.exports = [
|
|
|
2492
2501
|
ota: ota.zigbeeOTA,
|
|
2493
2502
|
},
|
|
2494
2503
|
{
|
|
2495
|
-
zigbeeModel: ['5633030P6'],
|
|
2504
|
+
zigbeeModel: ['5633030P6', '929003046501'],
|
|
2496
2505
|
model: '5633030P6',
|
|
2497
2506
|
vendor: 'Philips',
|
|
2498
2507
|
description: 'Hue White ambiance Pillar spotlamp',
|
|
@@ -100,13 +100,15 @@ module.exports = [
|
|
|
100
100
|
model: 'CCT5010-0001',
|
|
101
101
|
vendor: 'Schneider Electric',
|
|
102
102
|
description: 'Micro module dimmer',
|
|
103
|
-
fromZigbee: [fz.on_off, fz.brightness, fz.level_config, fz.
|
|
104
|
-
toZigbee: [tz.light_onoff_brightness, tz.level_config, tz.ballast_config],
|
|
103
|
+
fromZigbee: [fz.on_off, fz.brightness, fz.level_config, fz.wiser_lighting_ballast_configuration],
|
|
104
|
+
toZigbee: [tz.light_onoff_brightness, tz.level_config, tz.ballast_config, tz.wiser_dimmer_mode],
|
|
105
105
|
exposes: [e.light_brightness().withLevelConfig(),
|
|
106
106
|
exposes.numeric('ballast_minimum_level', ea.ALL).withValueMin(1).withValueMax(254)
|
|
107
107
|
.withDescription('Specifies the minimum light output of the ballast'),
|
|
108
108
|
exposes.numeric('ballast_maximum_level', ea.ALL).withValueMin(1).withValueMax(254)
|
|
109
|
-
.withDescription('Specifies the maximum light output of the ballast')
|
|
109
|
+
.withDescription('Specifies the maximum light output of the ballast'),
|
|
110
|
+
exposes.enum('dimmer_mode', ea.ALL, ['auto', 'rc', 'rl', 'rl_led'])
|
|
111
|
+
.withDescription('Sets dimming mode to autodetect or fixed RC/RL/RL_LED mode (max load is reduced in RL_LED)')],
|
|
110
112
|
whiteLabel: [{vendor: 'Elko', model: 'EKO07090'}],
|
|
111
113
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
112
114
|
await extend.light_onoff_brightness().configure(device, coordinatorEndpoint, logger);
|
|
@@ -134,13 +136,15 @@ module.exports = [
|
|
|
134
136
|
model: 'WDE002334',
|
|
135
137
|
vendor: 'Schneider Electric',
|
|
136
138
|
description: 'Rotary dimmer',
|
|
137
|
-
fromZigbee: [fz.on_off, fz.brightness, fz.level_config, fz.
|
|
138
|
-
toZigbee: [tz.light_onoff_brightness, tz.level_config, tz.ballast_config],
|
|
139
|
+
fromZigbee: [fz.on_off, fz.brightness, fz.level_config, fz.wiser_lighting_ballast_configuration],
|
|
140
|
+
toZigbee: [tz.light_onoff_brightness, tz.level_config, tz.ballast_config, tz.wiser_dimmer_mode],
|
|
139
141
|
exposes: [e.light_brightness().withLevelConfig(),
|
|
140
142
|
exposes.numeric('ballast_minimum_level', ea.ALL).withValueMin(1).withValueMax(254)
|
|
141
143
|
.withDescription('Specifies the minimum light output of the ballast'),
|
|
142
144
|
exposes.numeric('ballast_maximum_level', ea.ALL).withValueMin(1).withValueMax(254)
|
|
143
|
-
.withDescription('Specifies the maximum light output of the ballast')
|
|
145
|
+
.withDescription('Specifies the maximum light output of the ballast'),
|
|
146
|
+
exposes.enum('dimmer_mode', ea.ALL, ['auto', 'rc', 'rl', 'rl_led'])
|
|
147
|
+
.withDescription('Sets dimming mode to autodetect or fixed RC/RL/RL_LED mode (max load is reduced in RL_LED)')],
|
|
144
148
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
145
149
|
const endpoint = device.getEndpoint(3);
|
|
146
150
|
await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff', 'genLevelCtrl', 'lightingBallastCfg']);
|
package/devices/sonoff.js
CHANGED
|
@@ -78,7 +78,7 @@ module.exports = [
|
|
|
78
78
|
vendor: 'SONOFF',
|
|
79
79
|
whiteLabel: [{vendor: 'eWeLink', model: 'RHK07'}],
|
|
80
80
|
description: 'Wireless button',
|
|
81
|
-
exposes: [e.battery(), e.action(['single', 'double', 'long'])],
|
|
81
|
+
exposes: [e.battery(), e.action(['single', 'double', 'long']), e.battery_voltage()],
|
|
82
82
|
fromZigbee: [fz.ewelink_action, fz.battery],
|
|
83
83
|
toZigbee: [],
|
|
84
84
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
@@ -144,7 +144,7 @@ module.exports = [
|
|
|
144
144
|
await reporting.batteryVoltage(endpoint);
|
|
145
145
|
await reporting.batteryPercentageRemaining(endpoint);
|
|
146
146
|
},
|
|
147
|
-
exposes: [e.occupancy(), e.battery_low(), e.tamper(), e.battery()],
|
|
147
|
+
exposes: [e.occupancy(), e.battery_low(), e.tamper(), e.battery(), e.battery_voltage()],
|
|
148
148
|
},
|
|
149
149
|
{
|
|
150
150
|
zigbeeModel: ['S26R2ZB'],
|
package/devices/stelpro.js
CHANGED
|
@@ -47,7 +47,7 @@ module.exports = [
|
|
|
47
47
|
toZigbee: [tz.thermostat_local_temperature, tz.thermostat_occupancy, tz.thermostat_occupied_heating_setpoint,
|
|
48
48
|
tz.thermostat_temperature_display_mode, tz.thermostat_keypad_lockout, tz.thermostat_system_mode,
|
|
49
49
|
tz.thermostat_running_state, tz.stelpro_thermostat_outdoor_temperature],
|
|
50
|
-
exposes: [e.local_temperature(), e.keypad_lockout(),
|
|
50
|
+
exposes: [e.local_temperature(), e.keypad_lockout(), e.humidity(),
|
|
51
51
|
exposes.climate().withSetpoint('occupied_heating_setpoint', 5, 30, 0.5).withLocalTemperature()
|
|
52
52
|
.withSystemMode(['off', 'auto', 'heat']).withRunningState(['idle', 'heat'])],
|
|
53
53
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
@@ -79,7 +79,7 @@ module.exports = [
|
|
|
79
79
|
toZigbee: [tz.thermostat_local_temperature, tz.thermostat_occupancy, tz.thermostat_occupied_heating_setpoint,
|
|
80
80
|
tz.thermostat_temperature_display_mode, tz.thermostat_keypad_lockout, tz.thermostat_system_mode, tz.thermostat_running_state,
|
|
81
81
|
tz.stelpro_thermostat_outdoor_temperature],
|
|
82
|
-
exposes: [e.local_temperature(), e.keypad_lockout(),
|
|
82
|
+
exposes: [e.local_temperature(), e.keypad_lockout(), e.humidity(),
|
|
83
83
|
exposes.climate().withSetpoint('occupied_heating_setpoint', 5, 30, 0.5).withLocalTemperature()
|
|
84
84
|
.withSystemMode(['off', 'auto', 'heat']).withRunningState(['idle', 'heat'])],
|
|
85
85
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
@@ -142,7 +142,7 @@ module.exports = [
|
|
|
142
142
|
toZigbee: [tz.thermostat_local_temperature, tz.thermostat_occupancy, tz.thermostat_occupied_heating_setpoint,
|
|
143
143
|
tz.thermostat_temperature_display_mode, tz.thermostat_keypad_lockout, tz.thermostat_system_mode, tz.thermostat_running_state,
|
|
144
144
|
tz.stelpro_thermostat_outdoor_temperature],
|
|
145
|
-
exposes: [e.local_temperature(), e.keypad_lockout(),
|
|
145
|
+
exposes: [e.local_temperature(), e.keypad_lockout(), e.humidity(),
|
|
146
146
|
exposes.climate().withSetpoint('occupied_heating_setpoint', 5, 30, 0.5).withLocalTemperature()
|
|
147
147
|
.withSystemMode(['off', 'auto', 'heat']).withRunningState(['idle', 'heat'])],
|
|
148
148
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
@@ -36,4 +36,11 @@ module.exports = [
|
|
|
36
36
|
await reporting.onOff(endpoint);
|
|
37
37
|
},
|
|
38
38
|
},
|
|
39
|
+
{
|
|
40
|
+
zigbeeModel: ['S32053'],
|
|
41
|
+
model: 'S32053',
|
|
42
|
+
vendor: 'The Light Group',
|
|
43
|
+
description: 'SLC SmartOne CV led dimmable driver',
|
|
44
|
+
extend: extend.light_onoff_brightness(),
|
|
45
|
+
},
|
|
39
46
|
];
|
package/devices/tuya.js
CHANGED
|
@@ -12,7 +12,7 @@ const utils = require('../lib/utils');
|
|
|
12
12
|
|
|
13
13
|
const TS011Fplugs = ['_TZ3000_5f43h46b', '_TZ3000_cphmq0q7', '_TZ3000_dpo1ysak', '_TZ3000_ew3ldmgx', '_TZ3000_gjnozsaz',
|
|
14
14
|
'_TZ3000_jvzvulen', '_TZ3000_mraovvmm', '_TZ3000_nfnmi125', '_TZ3000_ps3dmato', '_TZ3000_w0qqde0g', '_TZ3000_u5u4cakc',
|
|
15
|
-
'_TZ3000_rdtixbnu', '_TZ3000_typdpbpg', '
|
|
15
|
+
'_TZ3000_rdtixbnu', '_TZ3000_typdpbpg', '_TZ3000_kx0pris5'];
|
|
16
16
|
|
|
17
17
|
const tzLocal = {
|
|
18
18
|
TS0504B_color: {
|
|
@@ -44,6 +44,40 @@ const tzLocal = {
|
|
|
44
44
|
};
|
|
45
45
|
|
|
46
46
|
module.exports = [
|
|
47
|
+
{
|
|
48
|
+
zigbeeModel: ['TS0204'],
|
|
49
|
+
model: 'TS0204',
|
|
50
|
+
vendor: 'TuYa',
|
|
51
|
+
description: 'Gas sensor',
|
|
52
|
+
fromZigbee: [fz.ias_gas_alarm_1, fz.battery, fz.ignore_basic_report],
|
|
53
|
+
toZigbee: [],
|
|
54
|
+
exposes: [e.gas(), e.battery_low(), e.tamper(), e.battery()],
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
zigbeeModel: ['TS0205'],
|
|
58
|
+
model: 'TS0205',
|
|
59
|
+
vendor: 'TuYa',
|
|
60
|
+
description: 'Smoke sensor',
|
|
61
|
+
fromZigbee: [fz.ias_smoke_alarm_1, fz.battery, fz.ignore_basic_report],
|
|
62
|
+
toZigbee: [],
|
|
63
|
+
exposes: [e.smoke(), e.battery_low(), e.tamper(), e.battery()],
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
zigbeeModel: ['TS0111'],
|
|
67
|
+
model: 'TS0111',
|
|
68
|
+
vendor: 'TuYa',
|
|
69
|
+
description: 'Socket',
|
|
70
|
+
extend: extend.switch(),
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
zigbeeModel: ['TS0218'],
|
|
74
|
+
model: 'TS0218',
|
|
75
|
+
vendor: 'TuYa',
|
|
76
|
+
description: 'Button',
|
|
77
|
+
fromZigbee: [fz.legacy.TS0218_click, fz.battery],
|
|
78
|
+
exposes: [e.battery(), e.action(['click'])],
|
|
79
|
+
toZigbee: [],
|
|
80
|
+
},
|
|
47
81
|
{
|
|
48
82
|
zigbeeModel: ['TS0203'],
|
|
49
83
|
model: 'TS0203',
|
|
@@ -124,10 +158,9 @@ module.exports = [
|
|
|
124
158
|
model: 'WHD02',
|
|
125
159
|
vendor: 'TuYa',
|
|
126
160
|
description: 'Wall switch module',
|
|
127
|
-
toZigbee: extend.switch().toZigbee.concat([tz.moes_power_on_behavior]),
|
|
128
|
-
fromZigbee: extend.switch().fromZigbee.concat([fz.moes_power_on_behavior]),
|
|
129
|
-
exposes: extend.switch().exposes.concat([
|
|
130
|
-
.withDescription('Controls the behaviour when the device is powered on')]),
|
|
161
|
+
toZigbee: extend.switch().toZigbee.concat([tz.moes_power_on_behavior, tz.tuya_switch_type]),
|
|
162
|
+
fromZigbee: extend.switch().fromZigbee.concat([fz.moes_power_on_behavior, fz.tuya_switch_type]),
|
|
163
|
+
exposes: extend.switch().exposes.concat([e.power_on_behavior(), e.switch_type_2()]),
|
|
131
164
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
132
165
|
await reporting.bind(device.getEndpoint(1), coordinatorEndpoint, ['genOnOff']);
|
|
133
166
|
},
|
|
@@ -244,6 +277,16 @@ module.exports = [
|
|
|
244
277
|
vendor: 'TuYa',
|
|
245
278
|
extend: extend.light_onoff_brightness(),
|
|
246
279
|
},
|
|
280
|
+
{
|
|
281
|
+
fingerprint: [{modelID: 'TS0202', manufacturerName: '_TYZB01_jytabjkb'}],
|
|
282
|
+
model: 'TS0202_1',
|
|
283
|
+
vendor: 'TuYa',
|
|
284
|
+
description: 'Motion sensor',
|
|
285
|
+
// Requires alarm_1_with_timeout https://github.com/Koenkk/zigbee2mqtt/issues/2818#issuecomment-776119586
|
|
286
|
+
fromZigbee: [fz.ias_occupancy_alarm_1_with_timeout, fz.battery, fz.ignore_basic_report],
|
|
287
|
+
toZigbee: [],
|
|
288
|
+
exposes: [e.occupancy(), e.battery_low(), e.tamper(), e.battery()],
|
|
289
|
+
},
|
|
247
290
|
{
|
|
248
291
|
fingerprint: [{modelID: 'TS0202', manufacturerName: '_TYZB01_ef5xlc9q'},
|
|
249
292
|
{modelID: 'TS0202', manufacturerName: '_TYZB01_vwqnz1sn'},
|
|
@@ -258,6 +301,7 @@ module.exports = [
|
|
|
258
301
|
{modelID: 'TS0202', manufacturerName: '_TYZB01_tv3wxhcz'},
|
|
259
302
|
{modelID: 'TS0202', manufacturerName: '_TYZB01_hqbdru35'},
|
|
260
303
|
{modelID: 'TS0202', manufacturerName: '_TZ3000_tiwq83wk'},
|
|
304
|
+
{modelID: 'TS0202', manufacturerName: '_TZ3000_ykwcwxmz'},
|
|
261
305
|
{modelID: 'WHD02', manufacturerName: '_TZ3000_hktqahrq'}],
|
|
262
306
|
model: 'TS0202',
|
|
263
307
|
vendor: 'TuYa',
|
|
@@ -265,7 +309,7 @@ module.exports = [
|
|
|
265
309
|
whiteLabel: [{vendor: 'Mercator Ikuü', model: 'SMA02P'}, {vendor: 'TuYa', model: 'TY-ZPR06'}],
|
|
266
310
|
fromZigbee: [fz.ias_occupancy_alarm_1, fz.battery, fz.ignore_basic_report, fz.ias_occupancy_alarm_1_report],
|
|
267
311
|
toZigbee: [],
|
|
268
|
-
exposes: [e.occupancy(), e.battery_low(), e.tamper(), e.battery()],
|
|
312
|
+
exposes: [e.occupancy(), e.battery_low(), e.tamper(), e.battery(), e.battery_voltage()],
|
|
269
313
|
},
|
|
270
314
|
{
|
|
271
315
|
fingerprint: [{modelID: 'TS0202', manufacturerName: '_TZ3000_mcxw5ehu'},
|
|
@@ -1196,6 +1240,7 @@ module.exports = [
|
|
|
1196
1240
|
fingerprint: [
|
|
1197
1241
|
{modelID: 'TS011F', manufacturerName: '_TZ3000_hyfvrar3'},
|
|
1198
1242
|
{modelID: 'TS011F', manufacturerName: '_TZ3000_v1pdxuqq'},
|
|
1243
|
+
{modelID: 'TS011F', manufacturerName: '_TZ3000_8a833yls'},
|
|
1199
1244
|
{modelID: 'TS011F', manufacturerName: '_TZ3000_bfn1w0mm'}],
|
|
1200
1245
|
model: 'TS011F_plug_2',
|
|
1201
1246
|
description: 'Smart plug (without power monitoring)',
|
|
@@ -1753,7 +1798,7 @@ module.exports = [
|
|
|
1753
1798
|
await reporting.bind(endpoint, coordinatorEndpoint, ['genBasic']);
|
|
1754
1799
|
},
|
|
1755
1800
|
exposes: [exposes.binary('trigger', ea.STATE_SET, true, false).withDescription('Trigger the door movement'),
|
|
1756
|
-
|
|
1801
|
+
exposes.binary('garage_door_contact', ea.STATE, true, false)],
|
|
1757
1802
|
},
|
|
1758
1803
|
{
|
|
1759
1804
|
fingerprint: [{modelID: 'TS0201', manufacturerName: '_TZ3000_qaaysllp'}],
|
|
@@ -1909,13 +1954,11 @@ module.exports = [
|
|
|
1909
1954
|
exposes.binary('child_lock', ea.STATE_SET, 'ON', 'OFF'),
|
|
1910
1955
|
exposes.enum('power_on_behavior', ea.STATE_SET, ['off', 'on', 'previous']),
|
|
1911
1956
|
exposes.numeric('countdown_timer', ea.STATE_SET).withValueMin(0).withValueMax(86400).withUnit('s'),
|
|
1912
|
-
exposes.numeric('voltage', ea.STATE).withUnit('V'),
|
|
1913
1957
|
exposes.numeric('voltage_rms', ea.STATE).withUnit('V'),
|
|
1914
1958
|
exposes.numeric('current', ea.STATE).withUnit('A'),
|
|
1915
1959
|
exposes.numeric('current_average', ea.STATE).withUnit('A'),
|
|
1916
|
-
|
|
1960
|
+
e.power(), e.voltage(), e.energy(), e.temperature(),
|
|
1917
1961
|
exposes.numeric('energy_consumed', ea.STATE).withUnit('kWh'),
|
|
1918
|
-
exposes.numeric('temperature', ea.STATE).withUnit('°C'),
|
|
1919
1962
|
/* TODO: Add toZigbee converters for the below composites
|
|
1920
1963
|
exposes.composite('voltage_setting', 'voltage_setting')
|
|
1921
1964
|
.withFeature(exposes.numeric('under_voltage_threshold', ea.STATE_SET)
|
package/devices/xiaomi.js
CHANGED
|
@@ -86,7 +86,7 @@ module.exports = [
|
|
|
86
86
|
.withDescription('Switch between rgbw mode or dual color temperature mode')],
|
|
87
87
|
},
|
|
88
88
|
{
|
|
89
|
-
zigbeeModel: ['lumi.light.aqcn02'],
|
|
89
|
+
zigbeeModel: ['lumi.light.aqcn02', 'lumi.light.acn014'],
|
|
90
90
|
model: 'ZNLDP12LM',
|
|
91
91
|
vendor: 'Xiaomi',
|
|
92
92
|
description: 'Aqara smart LED bulb',
|
|
@@ -353,8 +353,7 @@ module.exports = [
|
|
|
353
353
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
354
354
|
const endpoint1 = device.getEndpoint(1);
|
|
355
355
|
// set "event" mode
|
|
356
|
-
await endpoint1.write('aqaraOpple', {'mode': 1}, {manufacturerCode: 0x115f,
|
|
357
|
-
disableDefaultResponse: true, disableResponse: true});
|
|
356
|
+
await endpoint1.write('aqaraOpple', {'mode': 1}, {manufacturerCode: 0x115f, disableResponse: true});
|
|
358
357
|
},
|
|
359
358
|
},
|
|
360
359
|
{
|
|
@@ -378,8 +377,7 @@ module.exports = [
|
|
|
378
377
|
e.action(['single_left', 'double_left', 'single_right', 'double_right', 'single_both', 'double_both'])],
|
|
379
378
|
onEvent: preventReset,
|
|
380
379
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
381
|
-
await device.getEndpoint(1).write('aqaraOpple', {'mode': 1}, {manufacturerCode: 0x115f,
|
|
382
|
-
disableDefaultResponse: true, disableResponse: true});
|
|
380
|
+
await device.getEndpoint(1).write('aqaraOpple', {'mode': 1}, {manufacturerCode: 0x115f, disableResponse: true});
|
|
383
381
|
},
|
|
384
382
|
},
|
|
385
383
|
{
|
|
@@ -397,8 +395,7 @@ module.exports = [
|
|
|
397
395
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
398
396
|
const endpoint1 = device.getEndpoint(1);
|
|
399
397
|
// set "event" mode
|
|
400
|
-
await endpoint1.write('aqaraOpple', {'mode': 1}, {manufacturerCode: 0x115f,
|
|
401
|
-
disableDefaultResponse: true, disableResponse: true});
|
|
398
|
+
await endpoint1.write('aqaraOpple', {'mode': 1}, {manufacturerCode: 0x115f, disableResponse: true});
|
|
402
399
|
},
|
|
403
400
|
},
|
|
404
401
|
{
|
|
@@ -424,8 +421,7 @@ module.exports = [
|
|
|
424
421
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
425
422
|
const endpoint1 = device.getEndpoint(1);
|
|
426
423
|
// set "event" mode
|
|
427
|
-
await endpoint1.write('aqaraOpple', {'mode': 1}, {manufacturerCode: 0x115f,
|
|
428
|
-
disableDefaultResponse: true, disableResponse: true});
|
|
424
|
+
await endpoint1.write('aqaraOpple', {'mode': 1}, {manufacturerCode: 0x115f, disableResponse: true});
|
|
429
425
|
},
|
|
430
426
|
},
|
|
431
427
|
{
|
|
@@ -436,11 +432,11 @@ module.exports = [
|
|
|
436
432
|
fromZigbee: [fz.xiaomi_on_off_ignore_endpoint_4_5_6, fz.xiaomi_on_off_action, fz.legacy.QBKG04LM_QBKG11LM_click,
|
|
437
433
|
fz.xiaomi_operation_mode_basic],
|
|
438
434
|
exposes: [
|
|
439
|
-
e.switch(), e.action(['
|
|
440
|
-
exposes.enum('operation_mode', ea.
|
|
435
|
+
e.switch(), e.action(['release', 'hold', 'double']),
|
|
436
|
+
exposes.enum('operation_mode', ea.STATE_SET, ['control_relay', 'decoupled'])
|
|
441
437
|
.withDescription('Decoupled mode'),
|
|
442
438
|
],
|
|
443
|
-
toZigbee: [tz.on_off, tz.xiaomi_switch_operation_mode_basic],
|
|
439
|
+
toZigbee: [tz.on_off, {...tz.xiaomi_switch_operation_mode_basic, convertGet: null}],
|
|
444
440
|
endpoint: (device) => {
|
|
445
441
|
return {'system': 1, 'default': 2};
|
|
446
442
|
},
|
|
@@ -484,15 +480,15 @@ module.exports = [
|
|
|
484
480
|
e.switch().withEndpoint('left'),
|
|
485
481
|
e.switch().withEndpoint('right'),
|
|
486
482
|
e.temperature(),
|
|
487
|
-
e.action(['
|
|
488
|
-
exposes.enum('operation_mode', ea.
|
|
483
|
+
e.action(['release_left', 'release_right', 'release_both', 'double_left', 'double_right']),
|
|
484
|
+
exposes.enum('operation_mode', ea.STATE_SET, ['control_left_relay', 'control_right_relay', 'decoupled'])
|
|
489
485
|
.withDescription('Operation mode for left button')
|
|
490
486
|
.withEndpoint('left'),
|
|
491
|
-
exposes.enum('operation_mode', ea.
|
|
487
|
+
exposes.enum('operation_mode', ea.STATE_SET, ['control_left_relay', 'control_right_relay', 'decoupled'])
|
|
492
488
|
.withDescription('Operation mode for right button')
|
|
493
489
|
.withEndpoint('right'),
|
|
494
490
|
],
|
|
495
|
-
toZigbee: [tz.on_off, tz.xiaomi_switch_operation_mode_basic, tz.xiaomi_power],
|
|
491
|
+
toZigbee: [tz.on_off, {...tz.xiaomi_switch_operation_mode_basic, convertGet: null}, tz.xiaomi_power],
|
|
496
492
|
meta: {multiEndpoint: true},
|
|
497
493
|
endpoint: (device) => {
|
|
498
494
|
return {'system': 1, 'left': 2, 'right': 3};
|
package/lib/constants.js
CHANGED
|
@@ -247,6 +247,13 @@ const easyCodeTouchActions = {
|
|
|
247
247
|
0xFF0E: 'zigbee_unlock',
|
|
248
248
|
};
|
|
249
249
|
|
|
250
|
+
const wiserDimmerControlMode = {
|
|
251
|
+
0: 'auto',
|
|
252
|
+
1: 'rc',
|
|
253
|
+
2: 'rl',
|
|
254
|
+
3: 'rl_led',
|
|
255
|
+
};
|
|
256
|
+
|
|
250
257
|
module.exports = {
|
|
251
258
|
OneJanuary2000,
|
|
252
259
|
repInterval,
|
|
@@ -275,4 +282,5 @@ module.exports = {
|
|
|
275
282
|
lockSoundVolume,
|
|
276
283
|
lockUserStatus,
|
|
277
284
|
easyCodeTouchActions,
|
|
285
|
+
wiserDimmerControlMode,
|
|
278
286
|
};
|
package/lib/legacy.js
CHANGED
|
@@ -1012,12 +1012,14 @@ const fromZigbee = {
|
|
|
1012
1012
|
type: ['attributeReport'],
|
|
1013
1013
|
options: [exposes.options.legacy()],
|
|
1014
1014
|
convert: (model, msg, publish, options, meta) => {
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1015
|
+
if (isLegacyEnabled(options)) {
|
|
1016
|
+
const mapping = {4: 'left', 5: 'right'};
|
|
1017
|
+
const button = mapping[msg.endpoint.ID];
|
|
1018
|
+
if (button) {
|
|
1019
|
+
const payload = {};
|
|
1020
|
+
payload[`button_${button}`] = msg.data['onOff'] === 1 ? 'release' : 'hold';
|
|
1021
|
+
return payload;
|
|
1022
|
+
}
|
|
1021
1023
|
}
|
|
1022
1024
|
},
|
|
1023
1025
|
},
|
package/lib/utils.js
CHANGED
|
@@ -74,7 +74,8 @@ function hasAlreadyProcessedMessage(msg, ID=null, key=null) {
|
|
|
74
74
|
return false;
|
|
75
75
|
}
|
|
76
76
|
|
|
77
|
-
const defaultPrecision = {temperature: 2, humidity: 2, pressure: 1, pm25: 0, power: 2,
|
|
77
|
+
const defaultPrecision = {temperature: 2, humidity: 2, pressure: 1, pm25: 0, power: 2, current: 2, current_phase_b: 2, current_phase_c: 2,
|
|
78
|
+
voltage: 2, voltage_phase_b: 2, voltage_phase_c: 2};
|
|
78
79
|
function calibrateAndPrecisionRoundOptions(number, options, type) {
|
|
79
80
|
// Calibrate
|
|
80
81
|
const calibrateKey = `${type}_calibration`;
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "zigbee-herdsman-converters",
|
|
3
|
-
"version": "14.0.
|
|
3
|
+
"version": "14.0.427",
|
|
4
4
|
"lockfileVersion": 1,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"dependencies": {
|
|
7
7
|
"@ampproject/remapping": {
|
|
8
|
-
"version": "2.1.
|
|
9
|
-
"resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.1.
|
|
10
|
-
"integrity": "sha512-
|
|
8
|
+
"version": "2.1.2",
|
|
9
|
+
"resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.1.2.tgz",
|
|
10
|
+
"integrity": "sha512-hoyByceqwKirw7w3Z7gnIIZC3Wx3J484Y3L/cMpXFbr7d9ZQj2mODrirNzcJa+SM3UlpWXYvKV4RlRpFXlWgXg==",
|
|
11
11
|
"dev": true,
|
|
12
12
|
"requires": {
|
|
13
13
|
"@jridgewell/trace-mapping": "^0.3.0"
|
|
@@ -29,20 +29,20 @@
|
|
|
29
29
|
"dev": true
|
|
30
30
|
},
|
|
31
31
|
"@babel/core": {
|
|
32
|
-
"version": "7.17.
|
|
33
|
-
"resolved": "https://registry.npmjs.org/@babel/core/-/core-7.17.
|
|
34
|
-
"integrity": "sha512
|
|
32
|
+
"version": "7.17.5",
|
|
33
|
+
"resolved": "https://registry.npmjs.org/@babel/core/-/core-7.17.5.tgz",
|
|
34
|
+
"integrity": "sha512-/BBMw4EvjmyquN5O+t5eh0+YqB3XXJkYD2cjKpYtWOfFy4lQ4UozNSmxAcWT8r2XtZs0ewG+zrfsqeR15i1ajA==",
|
|
35
35
|
"dev": true,
|
|
36
36
|
"requires": {
|
|
37
|
-
"@ampproject/remapping": "^2.
|
|
37
|
+
"@ampproject/remapping": "^2.1.0",
|
|
38
38
|
"@babel/code-frame": "^7.16.7",
|
|
39
|
-
"@babel/generator": "^7.17.
|
|
39
|
+
"@babel/generator": "^7.17.3",
|
|
40
40
|
"@babel/helper-compilation-targets": "^7.16.7",
|
|
41
41
|
"@babel/helper-module-transforms": "^7.16.7",
|
|
42
42
|
"@babel/helpers": "^7.17.2",
|
|
43
|
-
"@babel/parser": "^7.17.
|
|
43
|
+
"@babel/parser": "^7.17.3",
|
|
44
44
|
"@babel/template": "^7.16.7",
|
|
45
|
-
"@babel/traverse": "^7.17.
|
|
45
|
+
"@babel/traverse": "^7.17.3",
|
|
46
46
|
"@babel/types": "^7.17.0",
|
|
47
47
|
"convert-source-map": "^1.7.0",
|
|
48
48
|
"debug": "^4.1.0",
|
|
@@ -60,9 +60,9 @@
|
|
|
60
60
|
}
|
|
61
61
|
},
|
|
62
62
|
"@babel/generator": {
|
|
63
|
-
"version": "7.17.
|
|
64
|
-
"resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.17.
|
|
65
|
-
"integrity": "sha512
|
|
63
|
+
"version": "7.17.3",
|
|
64
|
+
"resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.17.3.tgz",
|
|
65
|
+
"integrity": "sha512-+R6Dctil/MgUsZsZAkYgK+ADNSZzJRRy0TvY65T71z/CR854xHQ1EweBYXdfT+HNeN7w0cSJJEzgxZMv40pxsg==",
|
|
66
66
|
"dev": true,
|
|
67
67
|
"requires": {
|
|
68
68
|
"@babel/types": "^7.17.0",
|
|
@@ -278,9 +278,9 @@
|
|
|
278
278
|
}
|
|
279
279
|
},
|
|
280
280
|
"@babel/parser": {
|
|
281
|
-
"version": "7.17.
|
|
282
|
-
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.17.
|
|
283
|
-
"integrity": "sha512-
|
|
281
|
+
"version": "7.17.3",
|
|
282
|
+
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.17.3.tgz",
|
|
283
|
+
"integrity": "sha512-7yJPvPV+ESz2IUTPbOL+YkIGyCqOyNIzdguKQuJGnH7bg1WTIifuM21YqokFt/THWh1AkCRn9IgoykTRCBVpzA==",
|
|
284
284
|
"dev": true
|
|
285
285
|
},
|
|
286
286
|
"@babel/plugin-syntax-async-generators": {
|
|
@@ -412,18 +412,18 @@
|
|
|
412
412
|
}
|
|
413
413
|
},
|
|
414
414
|
"@babel/traverse": {
|
|
415
|
-
"version": "7.17.
|
|
416
|
-
"resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.17.
|
|
417
|
-
"integrity": "sha512-
|
|
415
|
+
"version": "7.17.3",
|
|
416
|
+
"resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.17.3.tgz",
|
|
417
|
+
"integrity": "sha512-5irClVky7TxRWIRtxlh2WPUUOLhcPN06AGgaQSB8AEwuyEBgJVuJ5imdHm5zxk8w0QS5T+tDfnDxAlhWjpb7cw==",
|
|
418
418
|
"dev": true,
|
|
419
419
|
"requires": {
|
|
420
420
|
"@babel/code-frame": "^7.16.7",
|
|
421
|
-
"@babel/generator": "^7.17.
|
|
421
|
+
"@babel/generator": "^7.17.3",
|
|
422
422
|
"@babel/helper-environment-visitor": "^7.16.7",
|
|
423
423
|
"@babel/helper-function-name": "^7.16.7",
|
|
424
424
|
"@babel/helper-hoist-variables": "^7.16.7",
|
|
425
425
|
"@babel/helper-split-export-declaration": "^7.16.7",
|
|
426
|
-
"@babel/parser": "^7.17.
|
|
426
|
+
"@babel/parser": "^7.17.3",
|
|
427
427
|
"@babel/types": "^7.17.0",
|
|
428
428
|
"debug": "^4.1.0",
|
|
429
429
|
"globals": "^11.1.0"
|
|
@@ -885,9 +885,9 @@
|
|
|
885
885
|
"dev": true
|
|
886
886
|
},
|
|
887
887
|
"@types/node": {
|
|
888
|
-
"version": "17.0.
|
|
889
|
-
"resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.
|
|
890
|
-
"integrity": "sha512-
|
|
888
|
+
"version": "17.0.18",
|
|
889
|
+
"resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.18.tgz",
|
|
890
|
+
"integrity": "sha512-eKj4f/BsN/qcculZiRSujogjvp5O/k4lOW5m35NopjZM/QwLOR075a8pJW5hD+Rtdm2DaCVPENS6KtSQnUD6BA==",
|
|
891
891
|
"dev": true
|
|
892
892
|
},
|
|
893
893
|
"@types/prettier": {
|
|
@@ -918,29 +918,29 @@
|
|
|
918
918
|
"dev": true
|
|
919
919
|
},
|
|
920
920
|
"@typescript-eslint/scope-manager": {
|
|
921
|
-
"version": "5.
|
|
922
|
-
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.
|
|
923
|
-
"integrity": "sha512-
|
|
921
|
+
"version": "5.12.0",
|
|
922
|
+
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.12.0.tgz",
|
|
923
|
+
"integrity": "sha512-GAMobtIJI8FGf1sLlUWNUm2IOkIjvn7laFWyRx7CLrv6nLBI7su+B7lbStqVlK5NdLvHRFiJo2HhiDF7Ki01WQ==",
|
|
924
924
|
"dev": true,
|
|
925
925
|
"requires": {
|
|
926
|
-
"@typescript-eslint/types": "5.
|
|
927
|
-
"@typescript-eslint/visitor-keys": "5.
|
|
926
|
+
"@typescript-eslint/types": "5.12.0",
|
|
927
|
+
"@typescript-eslint/visitor-keys": "5.12.0"
|
|
928
928
|
}
|
|
929
929
|
},
|
|
930
930
|
"@typescript-eslint/types": {
|
|
931
|
-
"version": "5.
|
|
932
|
-
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.
|
|
933
|
-
"integrity": "sha512-
|
|
931
|
+
"version": "5.12.0",
|
|
932
|
+
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.12.0.tgz",
|
|
933
|
+
"integrity": "sha512-JowqbwPf93nvf8fZn5XrPGFBdIK8+yx5UEGs2QFAYFI8IWYfrzz+6zqlurGr2ctShMaJxqwsqmra3WXWjH1nRQ==",
|
|
934
934
|
"dev": true
|
|
935
935
|
},
|
|
936
936
|
"@typescript-eslint/typescript-estree": {
|
|
937
|
-
"version": "5.
|
|
938
|
-
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.
|
|
939
|
-
"integrity": "sha512-
|
|
937
|
+
"version": "5.12.0",
|
|
938
|
+
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.12.0.tgz",
|
|
939
|
+
"integrity": "sha512-Dd9gVeOqt38QHR0BEA8oRaT65WYqPYbIc5tRFQPkfLquVEFPD1HAtbZT98TLBkEcCkvwDYOAvuSvAD9DnQhMfQ==",
|
|
940
940
|
"dev": true,
|
|
941
941
|
"requires": {
|
|
942
|
-
"@typescript-eslint/types": "5.
|
|
943
|
-
"@typescript-eslint/visitor-keys": "5.
|
|
942
|
+
"@typescript-eslint/types": "5.12.0",
|
|
943
|
+
"@typescript-eslint/visitor-keys": "5.12.0",
|
|
944
944
|
"debug": "^4.3.2",
|
|
945
945
|
"globby": "^11.0.4",
|
|
946
946
|
"is-glob": "^4.0.3",
|
|
@@ -949,15 +949,15 @@
|
|
|
949
949
|
}
|
|
950
950
|
},
|
|
951
951
|
"@typescript-eslint/utils": {
|
|
952
|
-
"version": "5.
|
|
953
|
-
"resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.
|
|
954
|
-
"integrity": "sha512-
|
|
952
|
+
"version": "5.12.0",
|
|
953
|
+
"resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.12.0.tgz",
|
|
954
|
+
"integrity": "sha512-k4J2WovnMPGI4PzKgDtQdNrCnmBHpMUFy21qjX2CoPdoBcSBIMvVBr9P2YDP8jOqZOeK3ThOL6VO/sy6jtnvzw==",
|
|
955
955
|
"dev": true,
|
|
956
956
|
"requires": {
|
|
957
957
|
"@types/json-schema": "^7.0.9",
|
|
958
|
-
"@typescript-eslint/scope-manager": "5.
|
|
959
|
-
"@typescript-eslint/types": "5.
|
|
960
|
-
"@typescript-eslint/typescript-estree": "5.
|
|
958
|
+
"@typescript-eslint/scope-manager": "5.12.0",
|
|
959
|
+
"@typescript-eslint/types": "5.12.0",
|
|
960
|
+
"@typescript-eslint/typescript-estree": "5.12.0",
|
|
961
961
|
"eslint-scope": "^5.1.1",
|
|
962
962
|
"eslint-utils": "^3.0.0"
|
|
963
963
|
},
|
|
@@ -981,12 +981,12 @@
|
|
|
981
981
|
}
|
|
982
982
|
},
|
|
983
983
|
"@typescript-eslint/visitor-keys": {
|
|
984
|
-
"version": "5.
|
|
985
|
-
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.
|
|
986
|
-
"integrity": "sha512-
|
|
984
|
+
"version": "5.12.0",
|
|
985
|
+
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.12.0.tgz",
|
|
986
|
+
"integrity": "sha512-cFwTlgnMV6TgezQynx2c/4/tx9Tufbuo9LPzmWqyRC3QC4qTGkAG1C6pBr0/4I10PAI/FlYunI3vJjIcu+ZHMg==",
|
|
987
987
|
"dev": true,
|
|
988
988
|
"requires": {
|
|
989
|
-
"@typescript-eslint/types": "5.
|
|
989
|
+
"@typescript-eslint/types": "5.12.0",
|
|
990
990
|
"eslint-visitor-keys": "^3.0.0"
|
|
991
991
|
}
|
|
992
992
|
},
|
|
@@ -1113,11 +1113,11 @@
|
|
|
1113
1113
|
"dev": true
|
|
1114
1114
|
},
|
|
1115
1115
|
"axios": {
|
|
1116
|
-
"version": "0.
|
|
1117
|
-
"resolved": "https://registry.npmjs.org/axios/-/axios-0.
|
|
1118
|
-
"integrity": "sha512-
|
|
1116
|
+
"version": "0.26.0",
|
|
1117
|
+
"resolved": "https://registry.npmjs.org/axios/-/axios-0.26.0.tgz",
|
|
1118
|
+
"integrity": "sha512-lKoGLMYtHvFrPVt3r+RBMp9nh34N0M8zEfCWqdWZx6phynIEhQqAdydpyBAAG211zlhX9Rgu08cOamy6XjE5Og==",
|
|
1119
1119
|
"requires": {
|
|
1120
|
-
"follow-redirects": "^1.14.
|
|
1120
|
+
"follow-redirects": "^1.14.8"
|
|
1121
1121
|
}
|
|
1122
1122
|
},
|
|
1123
1123
|
"babel-jest": {
|
|
@@ -1238,15 +1238,15 @@
|
|
|
1238
1238
|
"dev": true
|
|
1239
1239
|
},
|
|
1240
1240
|
"browserslist": {
|
|
1241
|
-
"version": "4.19.
|
|
1242
|
-
"resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.19.
|
|
1243
|
-
"integrity": "sha512-
|
|
1241
|
+
"version": "4.19.3",
|
|
1242
|
+
"resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.19.3.tgz",
|
|
1243
|
+
"integrity": "sha512-XK3X4xtKJ+Txj8G5c30B4gsm71s69lqXlkYui4s6EkKxuv49qjYlY6oVd+IFJ73d4YymtM3+djvvt/R/iJwwDg==",
|
|
1244
1244
|
"dev": true,
|
|
1245
1245
|
"requires": {
|
|
1246
|
-
"caniuse-lite": "^1.0.
|
|
1247
|
-
"electron-to-chromium": "^1.4.
|
|
1246
|
+
"caniuse-lite": "^1.0.30001312",
|
|
1247
|
+
"electron-to-chromium": "^1.4.71",
|
|
1248
1248
|
"escalade": "^3.1.1",
|
|
1249
|
-
"node-releases": "^2.0.
|
|
1249
|
+
"node-releases": "^2.0.2",
|
|
1250
1250
|
"picocolors": "^1.0.0"
|
|
1251
1251
|
}
|
|
1252
1252
|
},
|
|
@@ -1292,9 +1292,9 @@
|
|
|
1292
1292
|
"dev": true
|
|
1293
1293
|
},
|
|
1294
1294
|
"caniuse-lite": {
|
|
1295
|
-
"version": "1.0.
|
|
1296
|
-
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.
|
|
1297
|
-
"integrity": "sha512-
|
|
1295
|
+
"version": "1.0.30001312",
|
|
1296
|
+
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001312.tgz",
|
|
1297
|
+
"integrity": "sha512-Wiz1Psk2MEK0pX3rUzWaunLTZzqS2JYZFzNKqAiJGiuxIjRPLgV6+VDPOg6lQOUxmDwhTlh198JsTTi8Hzw6aQ==",
|
|
1298
1298
|
"dev": true
|
|
1299
1299
|
},
|
|
1300
1300
|
"chalk": {
|
|
@@ -1526,9 +1526,9 @@
|
|
|
1526
1526
|
}
|
|
1527
1527
|
},
|
|
1528
1528
|
"electron-to-chromium": {
|
|
1529
|
-
"version": "1.4.
|
|
1530
|
-
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.
|
|
1531
|
-
"integrity": "sha512-
|
|
1529
|
+
"version": "1.4.71",
|
|
1530
|
+
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.71.tgz",
|
|
1531
|
+
"integrity": "sha512-Hk61vXXKRb2cd3znPE9F+2pLWdIOmP7GjiTj45y6L3W/lO+hSnUSUhq+6lEaERWBdZOHbk2s3YV5c9xVl3boVw==",
|
|
1532
1532
|
"dev": true
|
|
1533
1533
|
},
|
|
1534
1534
|
"emittery": {
|
|
@@ -1676,9 +1676,9 @@
|
|
|
1676
1676
|
"dev": true
|
|
1677
1677
|
},
|
|
1678
1678
|
"eslint-plugin-jest": {
|
|
1679
|
-
"version": "26.1.
|
|
1680
|
-
"resolved": "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-26.1.
|
|
1681
|
-
"integrity": "sha512-
|
|
1679
|
+
"version": "26.1.1",
|
|
1680
|
+
"resolved": "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-26.1.1.tgz",
|
|
1681
|
+
"integrity": "sha512-HRKOuPi5ADhza4ZBK5ufyNXy28bXXkib87w+pQqdvBhSTsamndh6sIAKPAUl8y0/n9jSWBdTPslrwtKWqkp8dA==",
|
|
1682
1682
|
"dev": true,
|
|
1683
1683
|
"requires": {
|
|
1684
1684
|
"@typescript-eslint/utils": "^5.10.0"
|
|
@@ -1904,9 +1904,9 @@
|
|
|
1904
1904
|
"dev": true
|
|
1905
1905
|
},
|
|
1906
1906
|
"follow-redirects": {
|
|
1907
|
-
"version": "1.14.
|
|
1908
|
-
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.
|
|
1909
|
-
"integrity": "sha512-
|
|
1907
|
+
"version": "1.14.9",
|
|
1908
|
+
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.9.tgz",
|
|
1909
|
+
"integrity": "sha512-MQDfihBQYMcyy5dhRDJUHcw7lb2Pv/TuE6xP1vyraLukNDHKbDxDNaOE3NbCAdKQApno+GPRyo1YAp89yCjK4w=="
|
|
1910
1910
|
},
|
|
1911
1911
|
"form-data": {
|
|
1912
1912
|
"version": "3.0.1",
|
|
@@ -2964,9 +2964,9 @@
|
|
|
2964
2964
|
"dev": true
|
|
2965
2965
|
},
|
|
2966
2966
|
"minimatch": {
|
|
2967
|
-
"version": "3.
|
|
2968
|
-
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.
|
|
2969
|
-
"integrity": "sha512-
|
|
2967
|
+
"version": "3.1.2",
|
|
2968
|
+
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
|
|
2969
|
+
"integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
|
|
2970
2970
|
"dev": true,
|
|
2971
2971
|
"requires": {
|
|
2972
2972
|
"brace-expansion": "^1.1.7"
|
|
@@ -3824,9 +3824,9 @@
|
|
|
3824
3824
|
"dev": true
|
|
3825
3825
|
},
|
|
3826
3826
|
"zigbee-herdsman": {
|
|
3827
|
-
"version": "0.14.
|
|
3828
|
-
"resolved": "https://registry.npmjs.org/zigbee-herdsman/-/zigbee-herdsman-0.14.
|
|
3829
|
-
"integrity": "sha512-
|
|
3827
|
+
"version": "0.14.16",
|
|
3828
|
+
"resolved": "https://registry.npmjs.org/zigbee-herdsman/-/zigbee-herdsman-0.14.16.tgz",
|
|
3829
|
+
"integrity": "sha512-j49iDadyNCC3/3PQd7gKWz6+YSeTsuJgUkP5KTQW8CL+zLb7AAYVmF2rcC9ItHSgxnVYDSdxKAmR1c7IidIWJQ==",
|
|
3830
3830
|
"requires": {
|
|
3831
3831
|
"debounce": "^1.2.1",
|
|
3832
3832
|
"debug": "^4.3.3",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "zigbee-herdsman-converters",
|
|
3
|
-
"version": "14.0.
|
|
3
|
+
"version": "14.0.427",
|
|
4
4
|
"description": "Collection of device converters to be used with zigbee-herdsman",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"files": [
|
|
@@ -34,11 +34,11 @@
|
|
|
34
34
|
},
|
|
35
35
|
"homepage": "https://github.com/Koenkk/zigbee-herdsman-converters",
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"axios": "^0.
|
|
37
|
+
"axios": "^0.26.0",
|
|
38
38
|
"buffer-crc32": "^0.2.13",
|
|
39
39
|
"https-proxy-agent": "^5.0.0",
|
|
40
40
|
"tar-stream": "^2.2.0",
|
|
41
|
-
"zigbee-herdsman": "^0.14.
|
|
41
|
+
"zigbee-herdsman": "^0.14.16"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"eslint": "*",
|
package/devices/cr_smart_home.js
DELETED
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
const exposes = require('../lib/exposes');
|
|
2
|
-
const fz = {...require('../converters/fromZigbee'), legacy: require('../lib/legacy').fromZigbee};
|
|
3
|
-
const extend = require('../lib/extend');
|
|
4
|
-
const e = exposes.presets;
|
|
5
|
-
|
|
6
|
-
module.exports = [
|
|
7
|
-
{
|
|
8
|
-
fingerprint: [{modelID: 'TS0202', manufacturerName: '_TYZB01_jytabjkb'}],
|
|
9
|
-
model: 'TS0202_CR',
|
|
10
|
-
vendor: 'CR Smart Home',
|
|
11
|
-
description: 'Motion sensor',
|
|
12
|
-
// Requires alarm_1_with_timeout https://github.com/Koenkk/zigbee2mqtt/issues/2818#issuecomment-776119586
|
|
13
|
-
fromZigbee: [fz.ias_occupancy_alarm_1_with_timeout, fz.battery, fz.ignore_basic_report],
|
|
14
|
-
toZigbee: [],
|
|
15
|
-
exposes: [e.occupancy(), e.battery_low(), e.tamper(), e.battery()],
|
|
16
|
-
},
|
|
17
|
-
{
|
|
18
|
-
zigbeeModel: ['TS0204'],
|
|
19
|
-
model: 'TS0204',
|
|
20
|
-
vendor: 'CR Smart Home',
|
|
21
|
-
description: 'Gas sensor',
|
|
22
|
-
fromZigbee: [fz.ias_gas_alarm_1, fz.battery, fz.ignore_basic_report],
|
|
23
|
-
toZigbee: [],
|
|
24
|
-
exposes: [e.gas(), e.battery_low(), e.tamper(), e.battery()],
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
zigbeeModel: ['TS0205'],
|
|
28
|
-
model: 'TS0205',
|
|
29
|
-
vendor: 'CR Smart Home',
|
|
30
|
-
description: 'Smoke sensor',
|
|
31
|
-
fromZigbee: [fz.ias_smoke_alarm_1, fz.battery, fz.ignore_basic_report],
|
|
32
|
-
toZigbee: [],
|
|
33
|
-
exposes: [e.smoke(), e.battery_low(), e.tamper(), e.battery()],
|
|
34
|
-
},
|
|
35
|
-
{
|
|
36
|
-
zigbeeModel: ['TS0111'],
|
|
37
|
-
model: 'TS0111',
|
|
38
|
-
vendor: 'CR Smart Home',
|
|
39
|
-
description: 'Socket',
|
|
40
|
-
extend: extend.switch(),
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
zigbeeModel: ['TS0218'],
|
|
44
|
-
model: 'TS0218',
|
|
45
|
-
vendor: 'CR Smart Home',
|
|
46
|
-
description: 'Button',
|
|
47
|
-
fromZigbee: [fz.legacy.TS0218_click, fz.battery],
|
|
48
|
-
exposes: [e.battery(), e.action(['click'])],
|
|
49
|
-
toZigbee: [],
|
|
50
|
-
},
|
|
51
|
-
];
|