zigbee-herdsman-converters 14.0.423 → 14.0.424
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 +4 -2
- package/converters/toZigbee.js +1 -1
- package/devices/aurora_lighting.js +1 -1
- package/devices/meazon.js +1 -1
- package/devices/miboxer.js +7 -4
- package/devices/sonoff.js +2 -2
- package/devices/the_light_group.js +7 -0
- package/devices/tuya.js +6 -8
- package/lib/utils.js +2 -1
- package/npm-shrinkwrap.json +1 -1
- package/package.json +1 -1
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')) {
|
|
@@ -8153,6 +8154,7 @@ const converters = {
|
|
|
8153
8154
|
}
|
|
8154
8155
|
if (dp === tuya.dataPoints.hochTotalActivePower) {
|
|
8155
8156
|
result.energy_consumed = value / 100;
|
|
8157
|
+
result.energy = result.energy_consumed;
|
|
8156
8158
|
}
|
|
8157
8159
|
if (dp === tuya.dataPoints.hochLocking) {
|
|
8158
8160
|
result.trip = value ? 'trip' : 'clear';
|
package/converters/toZigbee.js
CHANGED
|
@@ -5289,7 +5289,7 @@ const converters = {
|
|
|
5289
5289
|
convertSet: async (entity, key, value, meta) => {
|
|
5290
5290
|
switch (key) {
|
|
5291
5291
|
case 'temperature_unit_convert':
|
|
5292
|
-
await tuya.sendDataPointEnum(entity, tuya.dataPoints.nousTempUnitConvert, ['
|
|
5292
|
+
await tuya.sendDataPointEnum(entity, tuya.dataPoints.nousTempUnitConvert, ['celsius', 'fahrenheit'].indexOf(value));
|
|
5293
5293
|
break;
|
|
5294
5294
|
case 'min_temperature':
|
|
5295
5295
|
await tuya.sendDataPointValue(entity, tuya.dataPoints.nousMinTemp, Math.round(value * 10));
|
|
@@ -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 = {
|
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/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'],
|
|
@@ -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
|
@@ -124,10 +124,9 @@ module.exports = [
|
|
|
124
124
|
model: 'WHD02',
|
|
125
125
|
vendor: 'TuYa',
|
|
126
126
|
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')]),
|
|
127
|
+
toZigbee: extend.switch().toZigbee.concat([tz.moes_power_on_behavior, tz.tuya_switch_type]),
|
|
128
|
+
fromZigbee: extend.switch().fromZigbee.concat([fz.moes_power_on_behavior, fz.tuya_switch_type]),
|
|
129
|
+
exposes: extend.switch().exposes.concat([e.power_on_behavior(), e.switch_type_2()]),
|
|
131
130
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
132
131
|
await reporting.bind(device.getEndpoint(1), coordinatorEndpoint, ['genOnOff']);
|
|
133
132
|
},
|
|
@@ -258,6 +257,7 @@ module.exports = [
|
|
|
258
257
|
{modelID: 'TS0202', manufacturerName: '_TYZB01_tv3wxhcz'},
|
|
259
258
|
{modelID: 'TS0202', manufacturerName: '_TYZB01_hqbdru35'},
|
|
260
259
|
{modelID: 'TS0202', manufacturerName: '_TZ3000_tiwq83wk'},
|
|
260
|
+
{modelID: 'TS0202', manufacturerName: '_TZ3000_ykwcwxmz'},
|
|
261
261
|
{modelID: 'WHD02', manufacturerName: '_TZ3000_hktqahrq'}],
|
|
262
262
|
model: 'TS0202',
|
|
263
263
|
vendor: 'TuYa',
|
|
@@ -265,7 +265,7 @@ module.exports = [
|
|
|
265
265
|
whiteLabel: [{vendor: 'Mercator Ikuü', model: 'SMA02P'}, {vendor: 'TuYa', model: 'TY-ZPR06'}],
|
|
266
266
|
fromZigbee: [fz.ias_occupancy_alarm_1, fz.battery, fz.ignore_basic_report, fz.ias_occupancy_alarm_1_report],
|
|
267
267
|
toZigbee: [],
|
|
268
|
-
exposes: [e.occupancy(), e.battery_low(), e.tamper(), e.battery()],
|
|
268
|
+
exposes: [e.occupancy(), e.battery_low(), e.tamper(), e.battery(), e.battery_voltage()],
|
|
269
269
|
},
|
|
270
270
|
{
|
|
271
271
|
fingerprint: [{modelID: 'TS0202', manufacturerName: '_TZ3000_mcxw5ehu'},
|
|
@@ -1909,13 +1909,11 @@ module.exports = [
|
|
|
1909
1909
|
exposes.binary('child_lock', ea.STATE_SET, 'ON', 'OFF'),
|
|
1910
1910
|
exposes.enum('power_on_behavior', ea.STATE_SET, ['off', 'on', 'previous']),
|
|
1911
1911
|
exposes.numeric('countdown_timer', ea.STATE_SET).withValueMin(0).withValueMax(86400).withUnit('s'),
|
|
1912
|
-
exposes.numeric('voltage', ea.STATE).withUnit('V'),
|
|
1913
1912
|
exposes.numeric('voltage_rms', ea.STATE).withUnit('V'),
|
|
1914
1913
|
exposes.numeric('current', ea.STATE).withUnit('A'),
|
|
1915
1914
|
exposes.numeric('current_average', ea.STATE).withUnit('A'),
|
|
1916
|
-
|
|
1915
|
+
e.power(), e.voltage(), e.energy(), e.temperature(),
|
|
1917
1916
|
exposes.numeric('energy_consumed', ea.STATE).withUnit('kWh'),
|
|
1918
|
-
exposes.numeric('temperature', ea.STATE).withUnit('°C'),
|
|
1919
1917
|
/* TODO: Add toZigbee converters for the below composites
|
|
1920
1918
|
exposes.composite('voltage_setting', 'voltage_setting')
|
|
1921
1919
|
.withFeature(exposes.numeric('under_voltage_threshold', ea.STATE_SET)
|
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