zigbee-herdsman-converters 15.0.10 → 15.0.12
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/toZigbee.js +10 -2
- package/devices/fantem.js +0 -1
- package/devices/innr.js +15 -0
- package/devices/namron.js +9 -0
- package/devices/philips.js +19 -9
- package/devices/sinope.js +4 -1
- package/devices/tuya.js +19 -2
- package/lib/philips.js +48 -7
- package/package.json +1 -1
package/converters/toZigbee.js
CHANGED
|
@@ -369,8 +369,16 @@ const converters = {
|
|
|
369
369
|
warning_simple: {
|
|
370
370
|
key: ['alarm'],
|
|
371
371
|
convertSet: async (entity, key, value, meta) => {
|
|
372
|
-
const alarmState = (value === 'OFF' ? 0 : 1);
|
|
373
|
-
|
|
372
|
+
const alarmState = (value === 'alarm' || value === 'OFF' ? 0 : 1);
|
|
373
|
+
|
|
374
|
+
let info;
|
|
375
|
+
// For Develco SMSZB-120, introduced change in fw 4.0.5, tested backward with 4.0.4
|
|
376
|
+
if (['SMSZB-120'].includes(meta.mapped.model)) {
|
|
377
|
+
info = ((alarmState) << 7) + ((alarmState) << 6);
|
|
378
|
+
} else {
|
|
379
|
+
info = (3 << 6) + ((alarmState) << 2);
|
|
380
|
+
}
|
|
381
|
+
|
|
374
382
|
await entity.command(
|
|
375
383
|
'ssIasWd',
|
|
376
384
|
'startWarning',
|
package/devices/fantem.js
CHANGED
|
@@ -49,7 +49,6 @@ module.exports = [
|
|
|
49
49
|
{
|
|
50
50
|
fingerprint: [{modelID: 'TS0202', manufacturerName: '_TZ3210_rxqls8v0'},
|
|
51
51
|
{modelID: 'TS0202', manufacturerName: '_TZ3210_zmy9hjay'},
|
|
52
|
-
{modelID: 'TS0202', manufacturerName: '_TZ3000_6ygjfyll'},
|
|
53
52
|
{modelID: 'TS0202', manufacturerName: '_TZ3210_wuhzzfqg'}],
|
|
54
53
|
model: 'ZB003-X',
|
|
55
54
|
vendor: 'Fantem',
|
package/devices/innr.js
CHANGED
|
@@ -8,6 +8,21 @@ const ea = exposes.access;
|
|
|
8
8
|
const ota = require('../lib/ota');
|
|
9
9
|
|
|
10
10
|
module.exports = [
|
|
11
|
+
{
|
|
12
|
+
zigbeeModel: ['RC 210'],
|
|
13
|
+
model: 'RC 210',
|
|
14
|
+
vendor: 'Innr',
|
|
15
|
+
description: 'Remote control',
|
|
16
|
+
fromZigbee: [fz.command_on, fz.command_off, fz.command_move, fz.command_stop, fz.command_move_to_level,
|
|
17
|
+
fz.command_move_to_color_temp],
|
|
18
|
+
toZigbee: [],
|
|
19
|
+
exposes: [e.action(['on', 'off', 'brightness_move_up', 'brightness_move_down', 'brightness_stop', 'brightness_move_to_level',
|
|
20
|
+
'color_temperature_move'])],
|
|
21
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
22
|
+
const ep = device.getEndpoint(1);
|
|
23
|
+
await reporting.bind(ep, coordinatorEndpoint, ['genBasic', 'genOnOff', 'genLevelCtrl', 'lightingColorCtrl']);
|
|
24
|
+
},
|
|
25
|
+
},
|
|
11
26
|
{
|
|
12
27
|
zigbeeModel: ['RC 250'],
|
|
13
28
|
model: 'RC 250',
|
package/devices/namron.js
CHANGED
|
@@ -305,6 +305,7 @@ module.exports = [
|
|
|
305
305
|
description: 'Zigbee 4 channel remote control',
|
|
306
306
|
fromZigbee: [fz.command_on, fz.command_off, fz.battery, fz.command_move, fz.command_stop, fz.command_recall],
|
|
307
307
|
toZigbee: [],
|
|
308
|
+
ota: ota.zigbeeOTA,
|
|
308
309
|
exposes: [e.battery(), e.action([
|
|
309
310
|
'on_l1', 'off_l1', 'brightness_move_up_l1', 'brightness_move_down_l1', 'brightness_stop_l1',
|
|
310
311
|
'on_l2', 'off_l2', 'brightness_move_up_l2', 'brightness_move_down_l2', 'brightness_stop_l2',
|
|
@@ -725,4 +726,12 @@ module.exports = [
|
|
|
725
726
|
await reporting.bind(endpoint, coordinatorEndpoint, binds);
|
|
726
727
|
},
|
|
727
728
|
},
|
|
729
|
+
{
|
|
730
|
+
zigbeeModel: ['3802968'],
|
|
731
|
+
model: '3802968',
|
|
732
|
+
vendor: 'Namron',
|
|
733
|
+
description: 'LED Filament Flex 5W CCT E27 Clear',
|
|
734
|
+
extend: extend.light_onoff_brightness_colortemp({colorTempRange: [153, 555]}),
|
|
735
|
+
meta: {turnsOffAtBrightness1: true},
|
|
736
|
+
},
|
|
728
737
|
];
|
package/devices/philips.js
CHANGED
|
@@ -75,7 +75,7 @@ const hueExtend = {
|
|
|
75
75
|
return result;
|
|
76
76
|
},
|
|
77
77
|
light_onoff_brightness_colortemp_color_gradient: (options={}) => {
|
|
78
|
-
options = {supportsHS: true, disableEffect: true, noConfigure: true, ...options};
|
|
78
|
+
options = {supportsHS: true, disableEffect: true, noConfigure: true, extraEffects: [], ...options};
|
|
79
79
|
const result = extendDontUse.light_onoff_brightness_colortemp_color({supportsHS: true, ...options});
|
|
80
80
|
result['ota'] = ota.zigbeeOTA;
|
|
81
81
|
result['meta'] = {turnsOffAtBrightness1: true};
|
|
@@ -100,8 +100,9 @@ const hueExtend = {
|
|
|
100
100
|
.withDescription('List of RGB HEX colors'),
|
|
101
101
|
exposes.enum('effect', ea.SET, [
|
|
102
102
|
'blink', 'breathe', 'okay', 'channel_change',
|
|
103
|
-
'candle', 'fireplace', 'colorloop',
|
|
103
|
+
'candle', 'fireplace', 'colorloop', 'sunrise',
|
|
104
104
|
'finish_effect', 'stop_effect', 'stop_hue_effect',
|
|
105
|
+
...options.extraEffects,
|
|
105
106
|
]),
|
|
106
107
|
]);
|
|
107
108
|
return result;
|
|
@@ -190,6 +191,8 @@ const hueEffects = {
|
|
|
190
191
|
'candle': '21000101',
|
|
191
192
|
'fireplace': '21000102',
|
|
192
193
|
'colorloop': '21000103',
|
|
194
|
+
'sunrise': '21000109',
|
|
195
|
+
'sparkle': '2100010a',
|
|
193
196
|
'stop_hue_effect': '200000',
|
|
194
197
|
};
|
|
195
198
|
|
|
@@ -1220,21 +1223,21 @@ module.exports = [
|
|
|
1220
1223
|
model: '9290022166',
|
|
1221
1224
|
vendor: 'Philips',
|
|
1222
1225
|
description: 'Hue white and color ambiance E26/E27',
|
|
1223
|
-
extend: hueExtend.light_onoff_brightness_colortemp_color(),
|
|
1226
|
+
extend: hueExtend.light_onoff_brightness_colortemp_color({disableHueEffects: false, colorTempRange: [153, 500]}),
|
|
1224
1227
|
},
|
|
1225
1228
|
{
|
|
1226
1229
|
zigbeeModel: ['LCA004'],
|
|
1227
1230
|
model: '9290024896',
|
|
1228
1231
|
vendor: 'Philips',
|
|
1229
1232
|
description: 'Hue white and color ambiance E27',
|
|
1230
|
-
extend: hueExtend.light_onoff_brightness_colortemp_color({colorTempRange: [153, 500]}),
|
|
1233
|
+
extend: hueExtend.light_onoff_brightness_colortemp_color({disableHueEffects: false, colorTempRange: [153, 500]}),
|
|
1231
1234
|
},
|
|
1232
1235
|
{
|
|
1233
1236
|
zigbeeModel: ['LCA006'],
|
|
1234
1237
|
model: '9290024689',
|
|
1235
1238
|
vendor: 'Philips',
|
|
1236
1239
|
description: 'Hue white and color ambiance B22 1100lm',
|
|
1237
|
-
extend: hueExtend.light_onoff_brightness_colortemp_color({colorTempRange: [153, 500]}),
|
|
1240
|
+
extend: hueExtend.light_onoff_brightness_colortemp_color({disableHueEffects: false, colorTempRange: [153, 500]}),
|
|
1238
1241
|
},
|
|
1239
1242
|
{
|
|
1240
1243
|
zigbeeModel: ['LCA008'],
|
|
@@ -1250,7 +1253,7 @@ module.exports = [
|
|
|
1250
1253
|
model: '9290024717',
|
|
1251
1254
|
vendor: 'Philips',
|
|
1252
1255
|
description: 'Hue white and color ambiance E26/A19 1600lm',
|
|
1253
|
-
extend: hueExtend.light_onoff_brightness_colortemp_color({colorTempRange: [153, 500]}),
|
|
1256
|
+
extend: hueExtend.light_onoff_brightness_colortemp_color({disableHueEffects: false, colorTempRange: [153, 500]}),
|
|
1254
1257
|
},
|
|
1255
1258
|
{
|
|
1256
1259
|
zigbeeModel: ['LCT001', 'LCT007', 'LCT010', 'LCT012', 'LCT014', 'LCT015', 'LCT016', 'LCT021'],
|
|
@@ -1924,6 +1927,13 @@ module.exports = [
|
|
|
1924
1927
|
description: 'Hue Gradient Signe floor lamp (black)',
|
|
1925
1928
|
extend: hueExtend.light_onoff_brightness_colortemp_color_gradient({colorTempRange: [153, 500]}),
|
|
1926
1929
|
},
|
|
1930
|
+
{
|
|
1931
|
+
zigbeeModel: ['915005987501'],
|
|
1932
|
+
model: '915005987501',
|
|
1933
|
+
vendor: 'Philips',
|
|
1934
|
+
description: 'Hue Gradient Signe floor lamp (white)',
|
|
1935
|
+
extend: hueExtend.light_onoff_brightness_colortemp_color_gradient({colorTempRange: [153, 500]}),
|
|
1936
|
+
},
|
|
1927
1937
|
{
|
|
1928
1938
|
zigbeeModel: ['LCT020'],
|
|
1929
1939
|
model: '4080148P7',
|
|
@@ -2809,7 +2819,7 @@ module.exports = [
|
|
|
2809
2819
|
model: '9290024687',
|
|
2810
2820
|
vendor: 'Philips',
|
|
2811
2821
|
description: 'Hue White and Color Ambiance A19 1100 lumen',
|
|
2812
|
-
extend: hueExtend.light_onoff_brightness_colortemp_color({colorTempRange: [153, 500]}),
|
|
2822
|
+
extend: hueExtend.light_onoff_brightness_colortemp_color({disableHueEffects: false, colorTempRange: [153, 500]}),
|
|
2813
2823
|
},
|
|
2814
2824
|
{
|
|
2815
2825
|
zigbeeModel: ['RDM002'],
|
|
@@ -2848,7 +2858,7 @@ module.exports = [
|
|
|
2848
2858
|
model: '9290022266A',
|
|
2849
2859
|
vendor: 'Philips',
|
|
2850
2860
|
description: 'Hue White and color ambiance A19 800 lumen',
|
|
2851
|
-
extend: hueExtend.light_onoff_brightness_colortemp_color({colorTempRange: [153, 500]}),
|
|
2861
|
+
extend: hueExtend.light_onoff_brightness_colortemp_color({disableHueEffects: false, colorTempRange: [153, 500]}),
|
|
2852
2862
|
},
|
|
2853
2863
|
{
|
|
2854
2864
|
zigbeeModel: ['LWE003'],
|
|
@@ -3205,7 +3215,7 @@ module.exports = [
|
|
|
3205
3215
|
model: '929003535301',
|
|
3206
3216
|
vendor: 'Philips',
|
|
3207
3217
|
description: 'Hue Festavia gradient light string 250',
|
|
3208
|
-
extend: hueExtend.light_onoff_brightness_colortemp_color_gradient({colorTempRange: [153, 500]}),
|
|
3218
|
+
extend: hueExtend.light_onoff_brightness_colortemp_color_gradient({colorTempRange: [153, 500], extraEffects: ['sparkle']}),
|
|
3209
3219
|
},
|
|
3210
3220
|
{
|
|
3211
3221
|
zigbeeModel: ['915005987101'],
|
package/devices/sinope.js
CHANGED
|
@@ -584,7 +584,7 @@ module.exports = [
|
|
|
584
584
|
'genBasic', 'genIdentify', 'genGroups', 'hvacThermostat', 'hvacUserInterfaceCfg',
|
|
585
585
|
'msTemperatureMeasurement', 'haElectricalMeasurement', 'seMetering',
|
|
586
586
|
'manuSpecificSinope'];
|
|
587
|
-
await reporting.bind(endpoint, coordinatorEndpoint, binds);
|
|
587
|
+
await reporting.bind(endpoint, coordinatorEndpoint, binds); // This G2 version has limited memory space
|
|
588
588
|
const thermostatDate = new Date();
|
|
589
589
|
const thermostatTimeSec = thermostatDate.getTime() / 1000;
|
|
590
590
|
const thermostatTimezoneOffsetSec = thermostatDate.getTimezoneOffset() * 60;
|
|
@@ -607,6 +607,9 @@ module.exports = [
|
|
|
607
607
|
await reporting.activePower(endpoint, {min: 10, max: 305, change: 1}); // divider 1: 1W
|
|
608
608
|
await reporting.rmsCurrent(endpoint, {min: 10, max: 306, change: 100}); // divider 1000: 0.1Arms
|
|
609
609
|
await reporting.rmsVoltage(endpoint, {min: 10, max: 307, change: 5}); // divider 10: 0.5Vrms
|
|
610
|
+
|
|
611
|
+
// Disable default reporting (not used by Sinope)
|
|
612
|
+
await reporting.thermostatRunningState(endpoint, {min: 1, max: 0xFFFF});
|
|
610
613
|
try {
|
|
611
614
|
await reporting.thermostatUnoccupiedHeatingSetpoint(endpoint);
|
|
612
615
|
} catch (error) {/* Do nothing */}
|
package/devices/tuya.js
CHANGED
|
@@ -1144,7 +1144,7 @@ module.exports = [
|
|
|
1144
1144
|
configure: tuya.configureMagicPacket,
|
|
1145
1145
|
},
|
|
1146
1146
|
{
|
|
1147
|
-
fingerprint: tuya.fingerprint('TS0202', ['_TZ3000_mcxw5ehu', '_TZ3040_6ygjfyll']),
|
|
1147
|
+
fingerprint: tuya.fingerprint('TS0202', ['_TZ3000_mcxw5ehu', '_TZ3000_6ygjfyll', '_TZ3040_6ygjfyll']),
|
|
1148
1148
|
model: 'IH012-RT01',
|
|
1149
1149
|
vendor: 'TuYa',
|
|
1150
1150
|
description: 'Motion sensor',
|
|
@@ -1668,7 +1668,6 @@ module.exports = [
|
|
|
1668
1668
|
{modelID: 'TS0201', manufacturerName: '_TZ3000_6uzkisv2'},
|
|
1669
1669
|
{modelID: 'TS0201', manufacturerName: '_TZ3000_xr3htd96'},
|
|
1670
1670
|
{modelID: 'TS0601', manufacturerName: '_TZE200_9yapgbuv'},
|
|
1671
|
-
{modelID: 'TS0601', manufacturerName: '_TZE200_yjjdcqsq'},
|
|
1672
1671
|
],
|
|
1673
1672
|
model: 'WSD500A',
|
|
1674
1673
|
vendor: 'TuYa',
|
|
@@ -1697,6 +1696,24 @@ module.exports = [
|
|
|
1697
1696
|
toZigbee: [],
|
|
1698
1697
|
exposes: [e.battery(), e.temperature(), e.humidity(), e.battery_voltage()],
|
|
1699
1698
|
},
|
|
1699
|
+
{
|
|
1700
|
+
fingerprint: tuya.fingerprint('TS0601', ['_TZE200_yjjdcqsq']),
|
|
1701
|
+
model: 'ZTH01',
|
|
1702
|
+
vendor: 'TuYa',
|
|
1703
|
+
description: 'Temperature and humidity sensor',
|
|
1704
|
+
fromZigbee: [tuya.fz.datapoints, tuya.fz.gateway_connection_status],
|
|
1705
|
+
toZigbee: [tuya.tz.datapoints],
|
|
1706
|
+
configure: tuya.configureMagicPacket,
|
|
1707
|
+
exposes: [e.temperature(), e.humidity(), tuya.exposes.batteryState(), e.battery_low()],
|
|
1708
|
+
meta: {
|
|
1709
|
+
tuyaDatapoints: [
|
|
1710
|
+
[1, 'temperature', tuya.valueConverter.divideBy10],
|
|
1711
|
+
[2, 'humidity', tuya.valueConverter.raw],
|
|
1712
|
+
[3, 'battery_state', tuya.valueConverter.batteryState],
|
|
1713
|
+
// [9, 'temperature_unit', tuya.valueConverter.raw], This DP is not properly supported by the device
|
|
1714
|
+
],
|
|
1715
|
+
},
|
|
1716
|
+
},
|
|
1700
1717
|
{
|
|
1701
1718
|
fingerprint: [{modelID: 'TS011F', manufacturerName: '_TZ3000_3zofvcaa'}],
|
|
1702
1719
|
model: 'TS011F_2_gang_2_usb_wall',
|
package/lib/philips.js
CHANGED
|
@@ -30,6 +30,17 @@ const decodeScaledGradientToRGB = (p) => {
|
|
|
30
30
|
const COLOR_MODE_GRADIENT = '4b01';
|
|
31
31
|
const COLOR_MODE_COLOR_XY = '0b00';
|
|
32
32
|
const COLOR_MODE_COLOR_TEMP = '0f00';
|
|
33
|
+
const COLOR_MODE_EFFECT = 'ab00';
|
|
34
|
+
const COLOR_MODE_BRIGHTNESS = '0300';
|
|
35
|
+
|
|
36
|
+
const knownEffects = {
|
|
37
|
+
'0180': 'candle',
|
|
38
|
+
'0280': 'fireplace',
|
|
39
|
+
'0380': 'colorloop',
|
|
40
|
+
'0980': 'sunrise',
|
|
41
|
+
'0a80': 'sparkle',
|
|
42
|
+
};
|
|
43
|
+
|
|
33
44
|
|
|
34
45
|
// decoder for manuSpecificPhilips2.state
|
|
35
46
|
function decodeGradientColors(input, opts) {
|
|
@@ -60,6 +71,20 @@ function decodeGradientColors(input, opts) {
|
|
|
60
71
|
// 01 - on/off (2)
|
|
61
72
|
// 04 - brightness (2)
|
|
62
73
|
// 60b09c4e - color (8) (xLow, xHigh, yLow, yHigh)
|
|
74
|
+
//
|
|
75
|
+
// Effect mode (ab00)
|
|
76
|
+
// Example: ab000153df7e446a0180
|
|
77
|
+
// ab00 - mode (4)
|
|
78
|
+
// 01 - on/off (2)
|
|
79
|
+
// 53 - brightness (2)
|
|
80
|
+
// df7e446a - XY Color (8)
|
|
81
|
+
// 0180 - effect (4)
|
|
82
|
+
//
|
|
83
|
+
// On/off/brightness mode (0003) – For devices that only support on/off and brightness
|
|
84
|
+
// Example: 030001b2
|
|
85
|
+
// 0300 - mode (4)
|
|
86
|
+
// 01 - on/off (2)
|
|
87
|
+
// b2 - brightness (2)
|
|
63
88
|
|
|
64
89
|
// Device color mode
|
|
65
90
|
const mode = input.slice(0, 4);
|
|
@@ -112,7 +137,7 @@ function decodeGradientColors(input, opts) {
|
|
|
112
137
|
brightness,
|
|
113
138
|
on,
|
|
114
139
|
};
|
|
115
|
-
} else if (mode === COLOR_MODE_COLOR_XY) {
|
|
140
|
+
} else if (mode === COLOR_MODE_COLOR_XY || mode === COLOR_MODE_EFFECT) {
|
|
116
141
|
// XY Color mode
|
|
117
142
|
const xLow = parseInt(input.slice(0, 2), 16);
|
|
118
143
|
input = input.slice(2);
|
|
@@ -123,15 +148,26 @@ function decodeGradientColors(input, opts) {
|
|
|
123
148
|
const yLow = parseInt(input.slice(0, 2), 16) << 8;
|
|
124
149
|
input = input.slice(2);
|
|
125
150
|
|
|
126
|
-
const x = xHigh | xLow;
|
|
127
|
-
const y = yHigh | yLow;
|
|
128
151
|
|
|
152
|
+
const x = Math.round((xHigh | xLow) / 65535 * 10000) / 10000;
|
|
153
|
+
const y = Math.round((yHigh | yLow) / 65535 * 10000) / 10000;
|
|
154
|
+
|
|
155
|
+
if (mode === COLOR_MODE_COLOR_XY) {
|
|
156
|
+
return {
|
|
157
|
+
color_mode: 'xy',
|
|
158
|
+
x, y,
|
|
159
|
+
brightness, on,
|
|
160
|
+
};
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
// Effect mode
|
|
164
|
+
const effect = input.slice(0, 4);
|
|
165
|
+
const name = knownEffects[effect] || `unknown_${effect}`;
|
|
129
166
|
return {
|
|
130
167
|
color_mode: 'xy',
|
|
131
|
-
x
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
on,
|
|
168
|
+
x, y,
|
|
169
|
+
brightness, on,
|
|
170
|
+
name,
|
|
135
171
|
};
|
|
136
172
|
} else if (mode === COLOR_MODE_COLOR_TEMP) {
|
|
137
173
|
// Color temperature mode
|
|
@@ -148,6 +184,11 @@ function decodeGradientColors(input, opts) {
|
|
|
148
184
|
brightness,
|
|
149
185
|
on,
|
|
150
186
|
};
|
|
187
|
+
} else if (mode === COLOR_MODE_BRIGHTNESS) {
|
|
188
|
+
return {
|
|
189
|
+
brightness,
|
|
190
|
+
on,
|
|
191
|
+
};
|
|
151
192
|
}
|
|
152
193
|
|
|
153
194
|
// Unknown mode
|