zigbee-herdsman-converters 14.0.379 → 14.0.380
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 +2 -2
- package/converters/toZigbee.js +18 -12
- package/devices/rgb_genie.js +2 -1
- package/devices/skydance.js +20 -5
- package/devices/tuya.js +4 -2
- package/lib/ota/zigbeeOTA.js +1 -1
- package/npm-shrinkwrap.json +1 -1
- package/package.json +1 -1
package/converters/fromZigbee.js
CHANGED
|
@@ -1380,8 +1380,8 @@ const converters = {
|
|
|
1380
1380
|
const payload = {
|
|
1381
1381
|
action: postfixWithEndpointName(`color_move`, msg, model),
|
|
1382
1382
|
action_color: {
|
|
1383
|
-
x: precisionRound(msg.data.colorx /
|
|
1384
|
-
y: precisionRound(msg.data.colory /
|
|
1383
|
+
x: precisionRound(msg.data.colorx / 65536, 3),
|
|
1384
|
+
y: precisionRound(msg.data.colory / 65536, 3),
|
|
1385
1385
|
},
|
|
1386
1386
|
action_transition_time: msg.data.transtime,
|
|
1387
1387
|
};
|
package/converters/toZigbee.js
CHANGED
|
@@ -6471,10 +6471,12 @@ const converters = {
|
|
|
6471
6471
|
} else {
|
|
6472
6472
|
throw new Error('Dimmer brightness is out of range 0..255');
|
|
6473
6473
|
}
|
|
6474
|
-
await tuya.
|
|
6475
|
-
|
|
6474
|
+
await tuya.sendDataPoints(entity, [
|
|
6475
|
+
tuya.dpValueFromEnum(tuya.dataPoints.silvercrestChangeMode, tuya.silvercrestModes.white),
|
|
6476
|
+
tuya.dpValueFromIntValue(tuya.dataPoints.dimmerLevel, newValue),
|
|
6477
|
+
], 'dataRequest', 1);
|
|
6476
6478
|
|
|
6477
|
-
return {state: {white_brightness: value}};
|
|
6479
|
+
return {state: (key == 'white_brightness') ? {white_brightness: value} : {brightness: value}};
|
|
6478
6480
|
} else if (key == 'color_temp') {
|
|
6479
6481
|
const [colorTempMin, colorTempMax] = [250, 454];
|
|
6480
6482
|
const preset = {
|
|
@@ -6496,8 +6498,10 @@ const converters = {
|
|
|
6496
6498
|
}
|
|
6497
6499
|
const data = utils.mapNumberRange(value, colorTempMax, colorTempMin, 0, 1000);
|
|
6498
6500
|
|
|
6499
|
-
await tuya.
|
|
6500
|
-
|
|
6501
|
+
await tuya.sendDataPoints(entity, [
|
|
6502
|
+
tuya.dpValueFromEnum(tuya.dataPoints.silvercrestChangeMode, tuya.silvercrestModes.white),
|
|
6503
|
+
tuya.dpValueFromIntValue(tuya.dataPoints.silvercrestSetColorTemp, data),
|
|
6504
|
+
], 'dataRequest', 1);
|
|
6501
6505
|
|
|
6502
6506
|
return {state: {color_temp: value}};
|
|
6503
6507
|
} else if (key == 'color' || (separateWhite && (key == 'brightness'))) {
|
|
@@ -6550,12 +6554,11 @@ const converters = {
|
|
|
6550
6554
|
}
|
|
6551
6555
|
|
|
6552
6556
|
// Scale 0-255 to 0-1000 what the device expects.
|
|
6553
|
-
if (b) {
|
|
6557
|
+
if (b != null) {
|
|
6554
6558
|
hsb.b = make4sizedString(utils.mapNumberRange(b, 0, 255, 0, 1000).toString(16));
|
|
6555
|
-
} else if (state.brightness) {
|
|
6559
|
+
} else if (state.brightness != null) {
|
|
6556
6560
|
hsb.b = make4sizedString(utils.mapNumberRange(state.brightness, 0, 255, 0, 1000).toString(16));
|
|
6557
6561
|
}
|
|
6558
|
-
|
|
6559
6562
|
return hsb;
|
|
6560
6563
|
};
|
|
6561
6564
|
|
|
@@ -6572,15 +6575,18 @@ const converters = {
|
|
|
6572
6575
|
data = data.concat(tuya.convertStringToHexArray(hsb.s));
|
|
6573
6576
|
data = data.concat(tuya.convertStringToHexArray(hsb.b));
|
|
6574
6577
|
|
|
6575
|
-
|
|
6576
|
-
|
|
6578
|
+
const commands = [
|
|
6579
|
+
tuya.dpValueFromEnum(tuya.dataPoints.silvercrestChangeMode, tuya.silvercrestModes.color),
|
|
6580
|
+
tuya.dpValueFromStringBuffer(tuya.dataPoints.silvercrestSetColor, data),
|
|
6581
|
+
];
|
|
6577
6582
|
|
|
6578
6583
|
if (separateWhite && meta.state.white_brightness != undefined) {
|
|
6579
6584
|
// restore white state
|
|
6580
6585
|
const newValue = utils.mapNumberRange(meta.state.white_brightness, 0, 255, 0, 1000);
|
|
6581
|
-
|
|
6582
|
-
|
|
6586
|
+
commands.push(tuya.dpValueFromEnum(tuya.dataPoints.silvercrestChangeMode, tuya.silvercrestModes.white));
|
|
6587
|
+
commands.push(tuya.dpValueFromIntValue(tuya.dataPoints.dimmerLevel, newValue));
|
|
6583
6588
|
}
|
|
6589
|
+
await tuya.sendDataPoints(entity, commands, 'dataRequest', 1);
|
|
6584
6590
|
|
|
6585
6591
|
return {state: newState};
|
|
6586
6592
|
}
|
package/devices/rgb_genie.js
CHANGED
|
@@ -71,7 +71,8 @@ module.exports = [
|
|
|
71
71
|
fromZigbee: [fz.battery, fz.command_on, fz.command_off, fz.command_step, fz.command_move, fz.command_stop, fz.command_recall,
|
|
72
72
|
fz.command_move_hue, fz.command_move_to_color, fz.command_move_to_color_temp],
|
|
73
73
|
exposes: [e.battery(), e.action(['on', 'off', 'brightness_step_up', 'brightness_step_down', 'brightness_move_up',
|
|
74
|
-
'brightness_move_down', 'brightness_stop', 'recall_1', 'recall_2', 'recall_3'
|
|
74
|
+
'brightness_move_down', 'brightness_stop', 'recall_1', 'recall_2', 'recall_3', 'hue_move', 'color_temperature_move',
|
|
75
|
+
'color_move', 'hue_stop'])],
|
|
75
76
|
toZigbee: [],
|
|
76
77
|
meta: {multiEndpoint: true, battery: {dontDividePercentage: true}},
|
|
77
78
|
configure: async (device, coordinatorEndpoint) => {
|
package/devices/skydance.js
CHANGED
|
@@ -5,7 +5,10 @@ const ea = exposes.access;
|
|
|
5
5
|
|
|
6
6
|
module.exports = [
|
|
7
7
|
{
|
|
8
|
-
fingerprint: [
|
|
8
|
+
fingerprint: [
|
|
9
|
+
{modelID: 'TS0601', manufacturerName: '_TZE200_6qoazbre'},
|
|
10
|
+
{modelID: 'TS0601', manufacturerName: '_TZE200_fcooykb4'},
|
|
11
|
+
],
|
|
9
12
|
model: 'WZ5_dim',
|
|
10
13
|
vendor: 'Skydance',
|
|
11
14
|
description: 'Zigbee & RF 5 in 1 LED controller (DIM mode)',
|
|
@@ -17,7 +20,10 @@ module.exports = [
|
|
|
17
20
|
],
|
|
18
21
|
},
|
|
19
22
|
{
|
|
20
|
-
fingerprint: [
|
|
23
|
+
fingerprint: [
|
|
24
|
+
{modelID: 'TS0601', manufacturerName: '_TZE200_gz3n0tzf'},
|
|
25
|
+
{modelID: 'TS0601', manufacturerName: '_TZE200_nthosjmx'},
|
|
26
|
+
],
|
|
21
27
|
model: 'WZ5_cct',
|
|
22
28
|
vendor: 'Skydance',
|
|
23
29
|
description: 'Zigbee & RF 5 in 1 LED controller (CCT mode)',
|
|
@@ -29,7 +35,10 @@ module.exports = [
|
|
|
29
35
|
],
|
|
30
36
|
},
|
|
31
37
|
{
|
|
32
|
-
fingerprint: [
|
|
38
|
+
fingerprint: [
|
|
39
|
+
{modelID: 'TS0601', manufacturerName: '_TZE200_9hghastn'},
|
|
40
|
+
{modelID: 'TS0601', manufacturerName: '_TZE200_9mt3kgn0'},
|
|
41
|
+
],
|
|
33
42
|
model: 'WZ5_rgb',
|
|
34
43
|
vendor: 'Skydance',
|
|
35
44
|
description: 'Zigbee & RF 5 in 1 LED controller (RGB mode)',
|
|
@@ -41,7 +50,10 @@ module.exports = [
|
|
|
41
50
|
],
|
|
42
51
|
},
|
|
43
52
|
{
|
|
44
|
-
fingerprint: [
|
|
53
|
+
fingerprint: [
|
|
54
|
+
{modelID: 'TS0601', manufacturerName: '_TZE200_3thxjahu'},
|
|
55
|
+
{modelID: 'TS0601', manufacturerName: '_TZE200_g9jdneiu'},
|
|
56
|
+
],
|
|
45
57
|
model: 'WZ5_rgbw',
|
|
46
58
|
vendor: 'Skydance',
|
|
47
59
|
description: 'Zigbee & RF 5 in 1 LED controller (RGBW mode)',
|
|
@@ -56,7 +68,10 @@ module.exports = [
|
|
|
56
68
|
meta: {separateWhite: true},
|
|
57
69
|
},
|
|
58
70
|
{
|
|
59
|
-
fingerprint: [
|
|
71
|
+
fingerprint: [
|
|
72
|
+
{modelID: 'TS0601', manufacturerName: '_TZE200_mde0utnv'},
|
|
73
|
+
{modelID: 'TS0601', manufacturerName: '_TZE200_aa9awrng'},
|
|
74
|
+
],
|
|
60
75
|
model: 'WZ5_rgbcct',
|
|
61
76
|
vendor: 'Skydance',
|
|
62
77
|
description: 'Zigbee & RF 5 in 1 LED controller (RGB+CCT mode)',
|
package/devices/tuya.js
CHANGED
|
@@ -189,7 +189,9 @@ module.exports = [
|
|
|
189
189
|
},
|
|
190
190
|
{
|
|
191
191
|
fingerprint: [{modelID: 'TS0504B', manufacturerName: '_TZ3000_ukuvyhaa'},
|
|
192
|
-
{modelID: 'TS0504B', manufacturerName: '_TZ3210_bfvybixd'},
|
|
192
|
+
{modelID: 'TS0504B', manufacturerName: '_TZ3210_bfvybixd'},
|
|
193
|
+
{modelID: 'TS0504B', manufacturerName: '_TZ3210_sroezl0s'},
|
|
194
|
+
{modelID: 'TS0504B', manufacturerName: '_TZ3210_1elppmba'}],
|
|
193
195
|
model: 'TS0504B',
|
|
194
196
|
vendor: 'TuYa',
|
|
195
197
|
description: 'Zigbee RGBW light',
|
|
@@ -904,7 +906,7 @@ module.exports = [
|
|
|
904
906
|
'Mode of this device, in the `heat` mode the TS0601 will remain continuously heating, i.e. it does not regulate ' +
|
|
905
907
|
'to the desired temperature. If you want TRV to properly regulate the temperature you need to use mode `auto` ' +
|
|
906
908
|
'instead setting the desired temperature.')
|
|
907
|
-
.withLocalTemperatureCalibration(-
|
|
909
|
+
.withLocalTemperatureCalibration(-9, 9, 1, ea.STATE_SET)
|
|
908
910
|
.withAwayMode().withPreset(['schedule', 'manual', 'boost', 'complex', 'comfort', 'eco']),
|
|
909
911
|
e.auto_lock(), e.away_mode(), e.away_preset_days(), e.boost_time(), e.comfort_temperature(), e.eco_temperature(), e.force(),
|
|
910
912
|
e.max_temperature(), e.min_temperature(), e.away_preset_temperature(),
|
package/lib/ota/zigbeeOTA.js
CHANGED
|
@@ -79,7 +79,7 @@ async function getImageMeta(current, logger, device) {
|
|
|
79
79
|
// For this case additional identification through the modelId is done.
|
|
80
80
|
// In the case of Tuya and Moes, additional identification is carried out through the manufacturerName.
|
|
81
81
|
const image = images.find((i) => i.imageType === imageType && i.manufacturerCode === manufacturerCode &&
|
|
82
|
-
(!i.minFileVersion || current.fileVersion >= i.minFileVersion)
|
|
82
|
+
(!i.minFileVersion || current.fileVersion >= i.minFileVersion) && (!i.maxFileVersion || current.fileVersion <= i.maxFileVersion) &&
|
|
83
83
|
(!i.modelId || i.modelId === modelId) && (!i.manufacturerName || i.manufacturerName.includes(manufacturerName)));
|
|
84
84
|
|
|
85
85
|
assert(image !== undefined, `No image available for imageType '${imageType}'`);
|
package/npm-shrinkwrap.json
CHANGED