zigbee-herdsman-converters 14.0.594 → 14.0.597
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/devices/giex.js +2 -2
- package/devices/iluminize.js +13 -1
- package/devices/legrand.js +1 -0
- package/devices/philips.js +102 -2
- package/devices/robb.js +20 -0
- package/devices/shinasystem.js +28 -1
- package/devices/skydance.js +15 -0
- package/devices/third_reality.js +3 -1
- package/devices/tuya.js +3 -1
- package/devices/xiaomi.js +13 -0
- package/lib/utils.js +6 -0
- package/package.json +1 -1
package/devices/giex.js
CHANGED
|
@@ -118,8 +118,8 @@ module.exports = [
|
|
|
118
118
|
e.battery(),
|
|
119
119
|
exposes.binary('state', ea.STATE_SET, 'ON', 'OFF').withDescription('State'),
|
|
120
120
|
exposes.enum('mode', ea.STATE_SET, ['duration', 'capacity']).withDescription('Irrigation mode'),
|
|
121
|
-
exposes.numeric('irrigation_target', exposes.access.STATE_SET).withValueMin(0).withValueMax(1440).withUnit('
|
|
122
|
-
.withDescription('Irrigation Target, duration in minutes or capacity in
|
|
121
|
+
exposes.numeric('irrigation_target', exposes.access.STATE_SET).withValueMin(0).withValueMax(1440).withUnit('minutes or Litres')
|
|
122
|
+
.withDescription('Irrigation Target, duration in minutes or capacity in Litres (depending on mode)'),
|
|
123
123
|
exposes.numeric('cycle_irrigation_num_times', exposes.access.STATE_SET).withValueMin(0).withValueMax(100).withUnit('#')
|
|
124
124
|
.withDescription('Number of cycle irrigation times, set to 0 for single cycle'),
|
|
125
125
|
exposes.numeric('cycle_irrigation_interval', exposes.access.STATE_SET).withValueMin(0).withValueMax(1440).withUnit('min')
|
package/devices/iluminize.js
CHANGED
|
@@ -5,6 +5,7 @@ const extend = require('../lib/extend');
|
|
|
5
5
|
const tz = require('../converters/toZigbee');
|
|
6
6
|
const ota = require('../lib/ota');
|
|
7
7
|
const e = exposes.presets;
|
|
8
|
+
const ea = exposes.access;
|
|
8
9
|
|
|
9
10
|
module.exports = [
|
|
10
11
|
{
|
|
@@ -160,7 +161,18 @@ module.exports = [
|
|
|
160
161
|
fz.command_step, fz.command_recall, fz.command_on, fz.command_off],
|
|
161
162
|
exposes: [e.battery(), e.action([
|
|
162
163
|
'color_move', 'color_temperature_move', 'hue_move', 'hue_stop', 'brightness_step_up', 'brightness_step_down',
|
|
163
|
-
'recall_*', 'on', 'off'])
|
|
164
|
+
'recall_*', 'on', 'off']),
|
|
165
|
+
exposes.composite('action_color', 'action_color')
|
|
166
|
+
.withFeature(exposes.numeric('x', ea.STATE))
|
|
167
|
+
.withFeature(exposes.numeric('y', ea.STATE))
|
|
168
|
+
.withDescription('Only shows the transmitted color in X7Y-Mode. Noch changes possible.'),
|
|
169
|
+
exposes.numeric('action_color_temperature', ea.STATE).withUnit('mired')
|
|
170
|
+
.withDescription('color temperature value. Fixed values for each key press: 145, 175, 222, 304, 480 mired'),
|
|
171
|
+
exposes.numeric('action_group', ea.STATE)
|
|
172
|
+
.withDescription('Shows the zigbee2mqtt group bound to the active data point EP(1-4).'),
|
|
173
|
+
exposes.numeric('action_transition_time', ea.STATE),
|
|
174
|
+
exposes.numeric('action_step_size', ea.STATE),
|
|
175
|
+
exposes.numeric('action_rate', ea.STATE)],
|
|
164
176
|
toZigbee: [],
|
|
165
177
|
meta: {multiEndpoint: true},
|
|
166
178
|
endpoint: (device) => {
|
package/devices/legrand.js
CHANGED
|
@@ -110,6 +110,7 @@ module.exports = [
|
|
|
110
110
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
111
111
|
const endpoint = device.getEndpoint(1);
|
|
112
112
|
await reporting.bind(endpoint, coordinatorEndpoint, ['genBinaryInput', 'closuresWindowCovering', 'genIdentify']);
|
|
113
|
+
await reporting.currentPositionLiftPercentage(endpoint);
|
|
113
114
|
},
|
|
114
115
|
exposes: [e.cover_position()],
|
|
115
116
|
},
|
package/devices/philips.js
CHANGED
|
@@ -84,6 +84,96 @@ const fzLocal = {
|
|
|
84
84
|
},
|
|
85
85
|
};
|
|
86
86
|
|
|
87
|
+
const gradientScenes = {
|
|
88
|
+
'blossom': '50010400135000000039d553d2955ba5287a9f697e25fb802800',
|
|
89
|
+
'crocus': '50010400135000000050389322f97f2b597343764cc664282800',
|
|
90
|
+
'precious': '5001040013500000007fa8838bb9789a786d7577499a773f2800',
|
|
91
|
+
'narcissa': '500104001350000000b0498a5c0a888fea89eb0b7ee15c742800',
|
|
92
|
+
'beginnings': '500104001350000000b3474def153e2ad42e98232c7483292800',
|
|
93
|
+
'first_light': '500104001350000000b28b7900e959d3f648a614389723362800',
|
|
94
|
+
'horizon': '500104001350000000488b7d6cbb750c6642f1133cc4033c2800',
|
|
95
|
+
'valley_dawn': '500104001350000000c1aa7de03a7a8ce861c7c4410d94412800',
|
|
96
|
+
'sunflare': '500104001350000000d0aa7d787a7daf197590154d6c14472800',
|
|
97
|
+
'emerald_flutter': '5001040013500000006a933977e34bb0d35e916468f246792800',
|
|
98
|
+
'memento': '500104001350000000f87318a3e31962331ec3532cceea892800',
|
|
99
|
+
'resplendent': '500104001350000000278b6d257a58efe84204273a35f5252800',
|
|
100
|
+
'scarlet_dream': '500104001350000000b02c654e4c5b45ab51fb0950d6c84d2800',
|
|
101
|
+
'lovebirds': '50010400135000000053ab84ea1a7e35fb7c098c73994c772800',
|
|
102
|
+
'smitten': '500104001350000000fe7b70a74b6aa42b65811b60550a592800',
|
|
103
|
+
'glitz_and_glam': '500104001350000000cc193cb9b845bad9521d1c77bf6c712800',
|
|
104
|
+
'promise': '500104001350000000258b606eca6b28d6382db445df26812800',
|
|
105
|
+
'ruby_romance': '5001040013500000000edb63cbcb6bac0c670b2d58204e572800',
|
|
106
|
+
'city_of_love': '50010400135000000055830e5cf31b6aa339d2ec70908b802800',
|
|
107
|
+
'honolulu': '500104001350000000dbfd59866c6378ec6c45cc765c0a822800',
|
|
108
|
+
'savanna_sunset': '50010400135000000005ae65c38c6c6b4b7573ca820fc9832800',
|
|
109
|
+
'golden_pond': '5001040013500000007e4a88cc4a8605db8728ec7b666c792800',
|
|
110
|
+
'runy_glow': '50010400135000000095bb53ac2a56eb99591e095c54985e2800',
|
|
111
|
+
'tropical_twilight': '500104001350000000408523a0b636e777524c0a71a76c6e2800',
|
|
112
|
+
'miami': '50010400135000000022ec61e6d94902d83766c3305a43182800',
|
|
113
|
+
'cancun': '500104001350000000a7eb54673d55944e6265fd6e26bb842800',
|
|
114
|
+
'rio': '500104001350000000a26526088c51a74b58ea6b7137ba892800',
|
|
115
|
+
'chinatown': '500104001350000000b33e5b408e59d90d5b4c6c6360ac792800',
|
|
116
|
+
'ibiza': '500104001350000000014d6d708c73827b7b6c7a8887f98a2800',
|
|
117
|
+
'osaka': '500104001350000000d649510b5c4deb7c5d8b6d6d2b9b802800',
|
|
118
|
+
'tokyo': '500104001350000000d1c311665331d3451fd59c4e394c7b2800',
|
|
119
|
+
'motown': '50010400135000000055730e5db3156623306c533d7a235c2800',
|
|
120
|
+
'fairfax': '50010400135000000072d34a3664477d7a61581d5fc08e5b2800',
|
|
121
|
+
'galaxy': '500104001350000000a6cb638b2a4f8cfa549bb9549ff73a2800',
|
|
122
|
+
'starlight': '5001040013500000008d897134a9653ec854d2963ed1d4282800',
|
|
123
|
+
'blood moon': '500104001350000000202a6987c8599ee647ec632779c3142800',
|
|
124
|
+
'artic_aurora': '50010400135000000082548922057511046571c32d5b93192800',
|
|
125
|
+
'moonlight': '50010400135000000055730e5e9320c1832e96243ebec7652800',
|
|
126
|
+
'nebula': '50010400135000000026c852e106460d653ee745342964142800',
|
|
127
|
+
'sundown': '500104001350000000f37c68157c6d8efa755ac5512e24332800',
|
|
128
|
+
'blue_lagoon': '50010400135000000088c3623975699ea672a0c8831ada6d2800',
|
|
129
|
+
'palm_beach': '5001040013500000005ec4679ba56077f85a80ea64639c6a2800',
|
|
130
|
+
'lake_placid': '5001040013500000002eab69239a692d996552c54c39743a2800',
|
|
131
|
+
'mountain_breeze': '500104001350000000df843d2355419195465a98674ca97b2800',
|
|
132
|
+
'lake_mist': '500104001350000000e3286f39b96859f86266e54ded943f2800',
|
|
133
|
+
'ocean_dawn': '5001040013500000005cf9779da97105b96b07485e32564a2800',
|
|
134
|
+
'frosty_dawn': '5001040013500000006d6883bca87e3029758ec9722d6a722800',
|
|
135
|
+
'sunday_morning': '5001040013500000002c586dc6f87345997c63f983f777892800',
|
|
136
|
+
'emerald_isle': '500104001350000000e535628dc57ed2667d8b687d1e2a812800',
|
|
137
|
+
'spring_blossom': '500104001350000000a8b75fd0c75826b851a7094d305b652800',
|
|
138
|
+
'midsummer_sun': '500104001350000000002984799984dd29848eba836c0b7f2800',
|
|
139
|
+
'autumn_gold': '500104001350000000435a7817aa7ba3f979a8a981f3c9852800',
|
|
140
|
+
'spring_lake': '5001040013500000004a976d3347736e677561b77a4b07812800',
|
|
141
|
+
'winter_mountain': '5001040013500000002c555c68c55d7c555ef165606136622800',
|
|
142
|
+
'midwinter': '500104001350000000bda5532c554dbd254cd5a4428d94392800',
|
|
143
|
+
'amber_bloom': '500104001350000000739d67f2bc7372ec78a0ab78be8a6f2800',
|
|
144
|
+
'lily': '5001040013500000009cfc76c5ab793d4a6a1a9b586b9c522800',
|
|
145
|
+
'painted_sky': '500104001350000000d1c424c3d63783384c3f7a6a83bd6d2800',
|
|
146
|
+
'winter_beauty': '500104001350000000e2335ea7b4942467952db986a7ab7b2800',
|
|
147
|
+
'orange_fields': '500104001350000000409c69694c79eafa88498a8fb867aa2800',
|
|
148
|
+
'forest_adventure': '50010400135000000023999bbd76b363d4b674d3415fb3222800',
|
|
149
|
+
'blue_planet': '50010400135000000037a7a3a403b489737b2b746e6873362800',
|
|
150
|
+
'soho': '500104001350000000c52c4e220b6eed8a53d404192b04782800',
|
|
151
|
+
'vapor_wave': '500104001350000000e1c32401251acb183ac31b8051ea842800',
|
|
152
|
+
'magneto': '50010400135000000077b3286d9340b9e3662d99943c9b852800',
|
|
153
|
+
'tyrell': '500104001350000000ef4419a898370ea84698353574434e2800',
|
|
154
|
+
'disturbia': '50010400135000000084f371a4845e6998388c3b4f57ce582800',
|
|
155
|
+
'hal': '50010400135000000075f351a6244cf6dc5d480c658cda862800',
|
|
156
|
+
'golden_star': '5001040013500000007a4a8702eb8372ac7892cd61d51e5c2800',
|
|
157
|
+
'under_the_tree': '5001040013500000001de498b9a3cc0c9b8563bb6cc1ae5d2800',
|
|
158
|
+
'silent_night': '5001040013500000009e296a245a6f660a75086b70953b6e2800',
|
|
159
|
+
'rosy_sparkle': '500104001350000000810967c63a6cb2aa5ea7094eddd73c2800',
|
|
160
|
+
'festive_fun': '5001040013500000005a9318de53123e9414fdcc67839d612800',
|
|
161
|
+
'colour_burst': '500104001350000000f2731ff0c6266a6c64246e57d4f98f2800',
|
|
162
|
+
'crystalline': '5001040013500000006ea96a92a85e58074e18543d9cf3332800',
|
|
163
|
+
};
|
|
164
|
+
|
|
165
|
+
const tzLocal = {
|
|
166
|
+
gradient_scene: {
|
|
167
|
+
key: ['gradient_scene'],
|
|
168
|
+
convertSet: async (entity, key, value, meta) => {
|
|
169
|
+
const scene = gradientScenes[value];
|
|
170
|
+
if (!scene) throw new Error(`Gradient scene '${value}' is unknown`);
|
|
171
|
+
const payload = {data: Buffer.from(scene, 'hex')};
|
|
172
|
+
await entity.command('manuSpecificPhilips2', 'multiColor', payload);
|
|
173
|
+
},
|
|
174
|
+
},
|
|
175
|
+
};
|
|
176
|
+
|
|
87
177
|
module.exports = [
|
|
88
178
|
{
|
|
89
179
|
zigbeeModel: ['929003055801'],
|
|
@@ -134,6 +224,13 @@ module.exports = [
|
|
|
134
224
|
description: 'Hue gradient lightstrip',
|
|
135
225
|
extend: hueExtend.light_onoff_brightness_colortemp_color({colorTempRange: [153, 500]}),
|
|
136
226
|
},
|
|
227
|
+
{
|
|
228
|
+
zigbeeModel: ['929003045401'],
|
|
229
|
+
model: '929003045401',
|
|
230
|
+
vendor: 'Philips',
|
|
231
|
+
description: 'Hue Centura recessed spotlight white and color ambiance GU10 (black)',
|
|
232
|
+
extend: hueExtend.light_onoff_brightness_colortemp_color({colorTempRange: [153, 500]}),
|
|
233
|
+
},
|
|
137
234
|
{
|
|
138
235
|
zigbeeModel: ['929003045501_01', '929003045501_02', '929003045501_03'],
|
|
139
236
|
model: '929003045501',
|
|
@@ -968,7 +1065,7 @@ module.exports = [
|
|
|
968
1065
|
extend: hueExtend.light_onoff_brightness_colortemp(),
|
|
969
1066
|
},
|
|
970
1067
|
{
|
|
971
|
-
zigbeeModel: ['3417831P6'],
|
|
1068
|
+
zigbeeModel: ['3417831P6', '929003056101'],
|
|
972
1069
|
model: '3417831P6',
|
|
973
1070
|
vendor: 'Philips',
|
|
974
1071
|
description: 'Hue white ambiance Adore spotlight with Bluetooth (1 spot)',
|
|
@@ -1483,6 +1580,9 @@ module.exports = [
|
|
|
1483
1580
|
model: '4080248U9',
|
|
1484
1581
|
vendor: 'Philips',
|
|
1485
1582
|
description: 'Hue White and color ambiance Signe floor light',
|
|
1583
|
+
toZigbee: [tzLocal.gradient_scene, ...hueExtend.light_onoff_brightness_colortemp_color({colorTempRange: [153, 500]}).toZigbee],
|
|
1584
|
+
exposes: [exposes.enum('gradient_scene', ea.SET, Object.keys(gradientScenes)),
|
|
1585
|
+
...hueExtend.light_onoff_brightness_colortemp_color({colorTempRange: [153, 500]}).exposes],
|
|
1486
1586
|
extend: hueExtend.light_onoff_brightness_colortemp_color({colorTempRange: [153, 500]}),
|
|
1487
1587
|
},
|
|
1488
1588
|
{
|
|
@@ -2071,7 +2171,7 @@ module.exports = [
|
|
|
2071
2171
|
extend: hueExtend.light_onoff_brightness_colortemp_color(),
|
|
2072
2172
|
},
|
|
2073
2173
|
{
|
|
2074
|
-
zigbeeModel: ['LCS001'],
|
|
2174
|
+
zigbeeModel: ['LCS001', '1741830P7'],
|
|
2075
2175
|
model: '1741830P7',
|
|
2076
2176
|
vendor: 'Philips',
|
|
2077
2177
|
description: 'Hue Lily outdoor spot light',
|
package/devices/robb.js
CHANGED
|
@@ -274,4 +274,24 @@ module.exports = [
|
|
|
274
274
|
await reporting.currentSummDelivered(endpoint1, {min: 60, change: 1});
|
|
275
275
|
},
|
|
276
276
|
},
|
|
277
|
+
{
|
|
278
|
+
zigbeeModel: ['ROB_200-035-0'],
|
|
279
|
+
model: 'ROB_200-035-0',
|
|
280
|
+
vendor: 'ROBB',
|
|
281
|
+
description: '1 channel switch with power monitoring',
|
|
282
|
+
fromZigbee: [fz.electrical_measurement, fz.on_off, fz.ignore_genLevelCtrl_report, fz.metering],
|
|
283
|
+
toZigbee: [tz.on_off],
|
|
284
|
+
exposes: [e.switch(), e.power(), e.current(), e.voltage(), e.energy()],
|
|
285
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
286
|
+
const endpoint = device.getEndpoint(1);
|
|
287
|
+
await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff', 'haElectricalMeasurement', 'seMetering']);
|
|
288
|
+
await reporting.onOff(endpoint);
|
|
289
|
+
await reporting.readEletricalMeasurementMultiplierDivisors(endpoint);
|
|
290
|
+
await reporting.readMeteringMultiplierDivisor(endpoint);
|
|
291
|
+
await reporting.rmsCurrent(endpoint);
|
|
292
|
+
await reporting.activePower(endpoint);
|
|
293
|
+
await reporting.rmsVoltage(endpoint);
|
|
294
|
+
await reporting.currentSummDelivered(endpoint);
|
|
295
|
+
},
|
|
296
|
+
},
|
|
277
297
|
];
|
package/devices/shinasystem.js
CHANGED
|
@@ -3,12 +3,18 @@ const fz = {...require('../converters/fromZigbee'), legacy: require('../lib/lega
|
|
|
3
3
|
const tz = require('../converters/toZigbee');
|
|
4
4
|
const reporting = require('../lib/reporting');
|
|
5
5
|
const extend = require('../lib/extend');
|
|
6
|
+
const ota = require('../lib/ota');
|
|
6
7
|
const e = exposes.presets;
|
|
7
8
|
const ea = exposes.access;
|
|
8
9
|
|
|
9
10
|
module.exports = [
|
|
10
11
|
{
|
|
11
|
-
|
|
12
|
+
fingerprint: [
|
|
13
|
+
{modelID: 'CSM-300Z', applicationVersion: 1},
|
|
14
|
+
{modelID: 'CSM-300Z', applicationVersion: 2},
|
|
15
|
+
{modelID: 'CSM-300Z', applicationVersion: 3},
|
|
16
|
+
{modelID: 'CSM-300Z', applicationVersion: 4},
|
|
17
|
+
],
|
|
12
18
|
model: 'CSM-300ZB',
|
|
13
19
|
vendor: 'ShinaSystem',
|
|
14
20
|
description: 'SiHAS multipurpose sensor',
|
|
@@ -27,6 +33,27 @@ module.exports = [
|
|
|
27
33
|
exposes.enum('status', ea.STATE, ['idle', 'in', 'out']).withDescription('Currently status'),
|
|
28
34
|
exposes.numeric('people', ea.ALL).withValueMin(0).withValueMax(50).withDescription('People count')],
|
|
29
35
|
},
|
|
36
|
+
{
|
|
37
|
+
zigbeeModel: ['CSM-300Z'],
|
|
38
|
+
model: 'CSM-300ZB_V2',
|
|
39
|
+
vendor: 'ShinaSystem',
|
|
40
|
+
ota: ota.zigbeeOTA,
|
|
41
|
+
description: 'SiHAS multipurpose ToF sensor',
|
|
42
|
+
meta: {battery: {voltageToPercentage: 'Add_1V_42V_CSM300z2v2'}},
|
|
43
|
+
fromZigbee: [fz.battery, fz.sihas_people_cnt],
|
|
44
|
+
toZigbee: [tz.sihas_set_people],
|
|
45
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
46
|
+
const endpoint = device.getEndpoint(1);
|
|
47
|
+
const binds = ['genPowerCfg', 'genAnalogInput'];
|
|
48
|
+
await reporting.bind(endpoint, coordinatorEndpoint, binds);
|
|
49
|
+
await reporting.batteryVoltage(endpoint);
|
|
50
|
+
const payload = reporting.payload('presentValue', 1, 600, 0);
|
|
51
|
+
await endpoint.configureReporting('genAnalogInput', payload);
|
|
52
|
+
},
|
|
53
|
+
exposes: [e.battery(), e.battery_voltage(),
|
|
54
|
+
exposes.enum('status', ea.STATE, ['idle', 'in', 'out']).withDescription('Currently status'),
|
|
55
|
+
exposes.numeric('people', ea.ALL).withValueMin(0).withValueMax(50).withDescription('People count')],
|
|
56
|
+
},
|
|
30
57
|
{
|
|
31
58
|
zigbeeModel: ['USM-300Z'],
|
|
32
59
|
model: 'USM-300ZB',
|
package/devices/skydance.js
CHANGED
|
@@ -2,6 +2,7 @@ const exposes = require('../lib/exposes');
|
|
|
2
2
|
const fz = {...require('../converters/fromZigbee'), legacy: require('../lib/legacy').fromZigbee};
|
|
3
3
|
const tz = require('../converters/toZigbee');
|
|
4
4
|
const extend = require('../lib/extend');
|
|
5
|
+
const reporting = require('../lib/reporting');
|
|
5
6
|
const ea = exposes.access;
|
|
6
7
|
|
|
7
8
|
module.exports = [
|
|
@@ -95,4 +96,18 @@ module.exports = [
|
|
|
95
96
|
],
|
|
96
97
|
meta: {separateWhite: true},
|
|
97
98
|
},
|
|
99
|
+
{
|
|
100
|
+
fingerprint: [{modelID: 'TS0501B', manufacturerName: '_TZB210_rkgngb5o'}],
|
|
101
|
+
model: 'WZ1',
|
|
102
|
+
vendor: 'Skydance',
|
|
103
|
+
description: 'Zigbee & RF 2 channel LED controller',
|
|
104
|
+
extend: extend.light_onoff_brightness({noConfigure: true, disableEffect: true}),
|
|
105
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
106
|
+
await extend.light_onoff_brightness().configure(device, coordinatorEndpoint, logger);
|
|
107
|
+
const endpoint = device.getEndpoint(1);
|
|
108
|
+
await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff', 'genLevelCtrl']);
|
|
109
|
+
await reporting.onOff(endpoint);
|
|
110
|
+
await reporting.brightness(endpoint);
|
|
111
|
+
},
|
|
112
|
+
},
|
|
98
113
|
];
|
package/devices/third_reality.js
CHANGED
|
@@ -116,8 +116,10 @@ module.exports = [
|
|
|
116
116
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
117
117
|
const endpoint = device.getEndpoint(1);
|
|
118
118
|
await reporting.bind(endpoint, coordinatorEndpoint, ['genPowerCfg', 'closuresWindowCovering']);
|
|
119
|
-
await reporting.batteryPercentageRemaining(endpoint);
|
|
120
119
|
await reporting.currentPositionLiftPercentage(endpoint);
|
|
120
|
+
try {
|
|
121
|
+
await reporting.batteryPercentageRemaining(endpoint);
|
|
122
|
+
} catch (error) {/* Fails for some*/}
|
|
121
123
|
},
|
|
122
124
|
exposes: [e.cover_position(), e.battery()],
|
|
123
125
|
},
|
package/devices/tuya.js
CHANGED
|
@@ -744,6 +744,7 @@ module.exports = [
|
|
|
744
744
|
fingerprint: [{modelID: 'TS0505B', manufacturerName: '_TZ3000_qqjaziws'},
|
|
745
745
|
{modelID: 'TS0505B', manufacturerName: '_TZ3000_jtmhndw2'},
|
|
746
746
|
{modelID: 'TS0505B', manufacturerName: '_TZ3000_ezlg0pht'},
|
|
747
|
+
{modelID: 'TS0505B', manufacturerName: '_TZ3210_3lbtuxgp'},
|
|
747
748
|
{modelID: 'TS0505B', manufacturerName: '_TZ3210_5snkkrxw'},
|
|
748
749
|
{modelID: 'TS0505B', manufacturerName: '_TZ3000_12sxjap4'},
|
|
749
750
|
{modelID: 'TS0505B', manufacturerName: '_TZ3000_x2fqbdun'},
|
|
@@ -2522,7 +2523,8 @@ module.exports = [
|
|
|
2522
2523
|
{
|
|
2523
2524
|
fingerprint: [{modelID: 'TS0210', manufacturerName: '_TYZB01_3zv6oleo'},
|
|
2524
2525
|
{modelID: 'TS0210', manufacturerName: '_TYZB01_j9xxahcl'},
|
|
2525
|
-
{modelID: 'TS0210', manufacturerName: '_TYZB01_kulduhbj'}
|
|
2526
|
+
{modelID: 'TS0210', manufacturerName: '_TYZB01_kulduhbj'},
|
|
2527
|
+
{modelID: 'TS0210', manufacturerName: '_TZ3000_bmfw9ykl'}],
|
|
2526
2528
|
model: 'TS0210',
|
|
2527
2529
|
vendor: 'TuYa',
|
|
2528
2530
|
description: 'Vibration sensor',
|
package/devices/xiaomi.js
CHANGED
|
@@ -101,6 +101,7 @@ module.exports = [
|
|
|
101
101
|
e.light_brightness_colortemp([153, 370]).removeFeature('color_temp_startup').withEndpoint('l2'),
|
|
102
102
|
exposes.enum('dimmer_mode', ea.ALL, ['rgbw', 'dual_ct'])
|
|
103
103
|
.withDescription('Switch between rgbw mode or dual color temperature mode')],
|
|
104
|
+
ota: ota.zigbeeOTA,
|
|
104
105
|
},
|
|
105
106
|
{
|
|
106
107
|
zigbeeModel: ['lumi.light.aqcn02'],
|
|
@@ -312,6 +313,7 @@ module.exports = [
|
|
|
312
313
|
// set "event" mode
|
|
313
314
|
await endpoint1.write('aqaraOpple', {'mode': 1}, {manufacturerCode: 0x115f, disableResponse: true});
|
|
314
315
|
},
|
|
316
|
+
ota: ota.zigbeeOTA,
|
|
315
317
|
},
|
|
316
318
|
{
|
|
317
319
|
zigbeeModel: ['lumi.switch.b2laus01'],
|
|
@@ -332,6 +334,7 @@ module.exports = [
|
|
|
332
334
|
await reporting.bind(endpoint2, coordinatorEndpoint, ['genOnOff']);
|
|
333
335
|
await reporting.onOff(endpoint2);
|
|
334
336
|
},
|
|
337
|
+
ota: ota.zigbeeOTA,
|
|
335
338
|
},
|
|
336
339
|
{
|
|
337
340
|
zigbeeModel: ['lumi.switch.b1naus01'],
|
|
@@ -344,6 +347,7 @@ module.exports = [
|
|
|
344
347
|
await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff']);
|
|
345
348
|
await reporting.onOff(endpoint);
|
|
346
349
|
},
|
|
350
|
+
ota: ota.zigbeeOTA,
|
|
347
351
|
},
|
|
348
352
|
{
|
|
349
353
|
zigbeeModel: ['lumi.switch.b2naus01'],
|
|
@@ -364,6 +368,7 @@ module.exports = [
|
|
|
364
368
|
await reporting.bind(endpoint2, coordinatorEndpoint, ['genOnOff']);
|
|
365
369
|
await reporting.onOff(endpoint2);
|
|
366
370
|
},
|
|
371
|
+
ota: ota.zigbeeOTA,
|
|
367
372
|
},
|
|
368
373
|
{
|
|
369
374
|
zigbeeModel: ['lumi.switch.n2acn1'],
|
|
@@ -737,6 +742,7 @@ module.exports = [
|
|
|
737
742
|
await device.getEndpoint(1).write('aqaraOpple', {'mode': 1}, {manufacturerCode: 0x115f, disableResponse: true});
|
|
738
743
|
},
|
|
739
744
|
onEvent: preventReset,
|
|
745
|
+
ota: ota.zigbeeOTA,
|
|
740
746
|
},
|
|
741
747
|
{
|
|
742
748
|
zigbeeModel: ['lumi.switch.b1nacn02'],
|
|
@@ -761,6 +767,7 @@ module.exports = [
|
|
|
761
767
|
device.powerSource = 'Mains (single phase)';
|
|
762
768
|
device.save();
|
|
763
769
|
},
|
|
770
|
+
ota: ota.zigbeeOTA,
|
|
764
771
|
},
|
|
765
772
|
{
|
|
766
773
|
zigbeeModel: ['lumi.switch.b2nacn02'],
|
|
@@ -1392,6 +1399,7 @@ module.exports = [
|
|
|
1392
1399
|
fromZigbee: [fz.DJT12LM_vibration],
|
|
1393
1400
|
exposes: [e.action(['vibration'])],
|
|
1394
1401
|
toZigbee: [],
|
|
1402
|
+
ota: ota.zigbeeOTA,
|
|
1395
1403
|
},
|
|
1396
1404
|
{
|
|
1397
1405
|
zigbeeModel: ['lumi.curtain'],
|
|
@@ -1681,6 +1689,7 @@ module.exports = [
|
|
|
1681
1689
|
vendor: 'Xiaomi',
|
|
1682
1690
|
description: 'Aqara smart RGBW light controller',
|
|
1683
1691
|
extend: extend.light_onoff_brightness_colortemp_color({supportsHS: true}),
|
|
1692
|
+
ota: ota.zigbeeOTA,
|
|
1684
1693
|
},
|
|
1685
1694
|
{
|
|
1686
1695
|
zigbeeModel: ['lumi.light.cbacn1'],
|
|
@@ -1688,6 +1697,7 @@ module.exports = [
|
|
|
1688
1697
|
vendor: 'Xiaomi',
|
|
1689
1698
|
description: 'Aqara zigbee LED-controller ',
|
|
1690
1699
|
extend: extend.light_onoff_brightness(),
|
|
1700
|
+
ota: ota.zigbeeOTA,
|
|
1691
1701
|
},
|
|
1692
1702
|
{
|
|
1693
1703
|
zigbeeModel: ['lumi.switch.n0agl1'],
|
|
@@ -1811,6 +1821,7 @@ module.exports = [
|
|
|
1811
1821
|
// await reporting.onOff(device.getEndpoint(2)); ToDo: Currently fails
|
|
1812
1822
|
// await reporting.onOff(device.getEndpoint(3)); ToDo: Currently fails
|
|
1813
1823
|
},
|
|
1824
|
+
ota: ota.zigbeeOTA,
|
|
1814
1825
|
},
|
|
1815
1826
|
{
|
|
1816
1827
|
zigbeeModel: ['lumi.remote.b28ac1'],
|
|
@@ -1867,6 +1878,7 @@ module.exports = [
|
|
|
1867
1878
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
1868
1879
|
await device.getEndpoint(1).write('aqaraOpple', {'mode': 1}, {manufacturerCode: 0x115f, disableResponse: true});
|
|
1869
1880
|
},
|
|
1881
|
+
ota: ota.zigbeeOTA,
|
|
1870
1882
|
},
|
|
1871
1883
|
{
|
|
1872
1884
|
zigbeeModel: ['lumi.switch.b2lc04'],
|
|
@@ -1898,6 +1910,7 @@ module.exports = [
|
|
|
1898
1910
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
1899
1911
|
await device.getEndpoint(1).write('aqaraOpple', {'mode': 1}, {manufacturerCode: 0x115f, disableResponse: true});
|
|
1900
1912
|
},
|
|
1913
|
+
ota: ota.zigbeeOTA,
|
|
1901
1914
|
},
|
|
1902
1915
|
{
|
|
1903
1916
|
zigbeeModel: ['lumi.airmonitor.acn01'],
|
package/lib/utils.js
CHANGED
|
@@ -170,6 +170,12 @@ function batteryVoltageToPercentage(voltage, option) {
|
|
|
170
170
|
percentage = toPercentage(voltage, 2850, 3200);
|
|
171
171
|
} else if (option === '4LR6AA1_5v') {
|
|
172
172
|
percentage = toPercentage(voltage, 3000, 4200);
|
|
173
|
+
} else if (option === '3V_add 1V') {
|
|
174
|
+
voltage = voltage + 1000;
|
|
175
|
+
percentage = toPercentage(voltage, 3200, 4200);
|
|
176
|
+
} else if (option === 'Add_1V_42V_CSM300z2v2') {
|
|
177
|
+
voltage = voltage + 1000;
|
|
178
|
+
percentage = toPercentage(voltage, 2900, 4100);
|
|
173
179
|
} else {
|
|
174
180
|
throw new Error(`Not batteryVoltageToPercentage type supported: ${option}`);
|
|
175
181
|
}
|