zigbee-herdsman-converters 14.0.672 → 14.0.674
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 +1 -1
- package/devices/ledvance.js +29 -0
- package/devices/philips.js +11 -4
- package/devices/schneider_electric.js +12 -0
- package/devices/shinasystem.js +32 -0
- package/devices/sinope.js +11 -5
- package/devices/third_reality.js +3 -0
- package/devices/tuya.js +59 -16
- package/devices/xiaomi.js +2 -2
- package/lib/tuya.js +9 -0
- package/package.json +1 -1
package/converters/fromZigbee.js
CHANGED
|
@@ -2973,7 +2973,7 @@ const converters = {
|
|
|
2973
2973
|
convert: (model, msg, publish, options, meta) => {
|
|
2974
2974
|
const stateHeader = Buffer.from([122, 209]);
|
|
2975
2975
|
if (msg.data.indexOf(stateHeader) === 0) {
|
|
2976
|
-
if (msg.data[10] === 5) {
|
|
2976
|
+
if (msg.data[10] === 5 || msg.data[10] === 2) {
|
|
2977
2977
|
const status = msg.data[14];
|
|
2978
2978
|
return {
|
|
2979
2979
|
state_left: status === 1 ? 'ON' : 'OFF',
|
package/devices/ledvance.js
CHANGED
|
@@ -66,6 +66,14 @@ module.exports = [
|
|
|
66
66
|
extend: extend.ledvance.light_onoff_brightness_colortemp_color({colorTempRange: [153, 370]}),
|
|
67
67
|
ota: ota.ledvance,
|
|
68
68
|
},
|
|
69
|
+
{
|
|
70
|
+
zigbeeModel: ['PAR16 RGBW T'],
|
|
71
|
+
model: '4058075729186',
|
|
72
|
+
vendor: 'LEDVANCE',
|
|
73
|
+
description: 'SMART+ Spot PAR16 28 GU10 Multicolor',
|
|
74
|
+
extend: extend.ledvance.light_onoff_brightness_colortemp_color({colorTempRange: [153, 370]}),
|
|
75
|
+
ota: ota.ledvance,
|
|
76
|
+
},
|
|
69
77
|
{
|
|
70
78
|
zigbeeModel: ['PAR16S TW'],
|
|
71
79
|
model: 'AC33905',
|
|
@@ -170,6 +178,14 @@ module.exports = [
|
|
|
170
178
|
extend: extend.ledvance.light_onoff_brightness_colortemp({colorTempRange: [153, 370]}),
|
|
171
179
|
ota: ota.ledvance,
|
|
172
180
|
},
|
|
181
|
+
{
|
|
182
|
+
zigbeeModel: ['P40 TW T'],
|
|
183
|
+
model: '4058075729124',
|
|
184
|
+
vendor: 'LEDVANCE',
|
|
185
|
+
description: 'SMART+ CL P40 E14 Tunable white',
|
|
186
|
+
extend: extend.ledvance.light_onoff_brightness_colortemp({colorTempRange: [153, 370]}),
|
|
187
|
+
ota: ota.ledvance,
|
|
188
|
+
},
|
|
173
189
|
{
|
|
174
190
|
zigbeeModel: ['CLA60 RGBW JP'],
|
|
175
191
|
model: 'SMARTZBA60RGBW',
|
|
@@ -255,6 +271,19 @@ module.exports = [
|
|
|
255
271
|
await reporting.onOff(endpoint);
|
|
256
272
|
},
|
|
257
273
|
},
|
|
274
|
+
{
|
|
275
|
+
zigbeeModel: ['PLUG UK T'],
|
|
276
|
+
model: '4058075729285',
|
|
277
|
+
vendor: 'LEDVANCE',
|
|
278
|
+
description: 'SMART+ Plug UK',
|
|
279
|
+
extend: extend.switch(),
|
|
280
|
+
ota: ota.ledvance,
|
|
281
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
282
|
+
const endpoint = device.getEndpoint(1);
|
|
283
|
+
await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff']);
|
|
284
|
+
await reporting.onOff(endpoint);
|
|
285
|
+
},
|
|
286
|
+
},
|
|
258
287
|
{
|
|
259
288
|
zigbeeModel: ['PLUG OUTDOOR EU T'],
|
|
260
289
|
model: '4058075729308',
|
package/devices/philips.js
CHANGED
|
@@ -742,6 +742,13 @@ module.exports = [
|
|
|
742
742
|
description: 'Hue White and Color Ambiance BR30 with bluetooth',
|
|
743
743
|
extend: hueExtend.light_onoff_brightness_colortemp_color(),
|
|
744
744
|
},
|
|
745
|
+
{
|
|
746
|
+
zigbeeModel: ['LCB002'],
|
|
747
|
+
model: '046677577957',
|
|
748
|
+
vendor: 'Philips',
|
|
749
|
+
description: 'Hue White and Color Ambiance BR30 with bluetooth',
|
|
750
|
+
extend: hueExtend.light_onoff_brightness_colortemp_color({colorTempRange: [153, 500]}),
|
|
751
|
+
},
|
|
745
752
|
{
|
|
746
753
|
zigbeeModel: ['LWB004'],
|
|
747
754
|
model: '433714',
|
|
@@ -2359,10 +2366,10 @@ module.exports = [
|
|
|
2359
2366
|
},
|
|
2360
2367
|
{
|
|
2361
2368
|
zigbeeModel: ['LLM001'],
|
|
2362
|
-
model: '7121131PU',
|
|
2369
|
+
model: '7121131PU/7120031PH/7120131PH/7120231PU',
|
|
2363
2370
|
vendor: 'Philips',
|
|
2364
|
-
description: 'Hue Beyond white and color ambiance suspension
|
|
2365
|
-
extend: hueExtend.light_onoff_brightness_colortemp_color(),
|
|
2371
|
+
description: 'Hue Beyond white and color ambiance suspension/ceiling/table lamp',
|
|
2372
|
+
extend: hueExtend.light_onoff_brightness_colortemp_color({colorTempRange: [153, 500]}),
|
|
2366
2373
|
},
|
|
2367
2374
|
{
|
|
2368
2375
|
zigbeeModel: ['5041131P9', '5041148P9'],
|
|
@@ -2918,7 +2925,7 @@ module.exports = [
|
|
|
2918
2925
|
zigbeeModel: ['LCX012'],
|
|
2919
2926
|
model: '929003535301',
|
|
2920
2927
|
vendor: 'Philips',
|
|
2921
|
-
description: 'Hue
|
|
2928
|
+
description: 'Hue Festavia gradient light string 250',
|
|
2922
2929
|
extend: hueExtend.light_onoff_brightness_colortemp_color({colorTempRange: [153, 500]}),
|
|
2923
2930
|
},
|
|
2924
2931
|
];
|
|
@@ -464,6 +464,18 @@ module.exports = [
|
|
|
464
464
|
await reporting.currentPositionLiftPercentage(endpoint);
|
|
465
465
|
},
|
|
466
466
|
},
|
|
467
|
+
{
|
|
468
|
+
zigbeeModel: ['1GANG/SWITCH/1'],
|
|
469
|
+
model: 'MEG5161-0000',
|
|
470
|
+
vendor: 'Schneider Electric',
|
|
471
|
+
description: 'Merten PlusLink relay insert with Merten Wiser system M push button (1fold)',
|
|
472
|
+
extend: extend.switch(),
|
|
473
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
474
|
+
const endpoint = device.getEndpoint(1);
|
|
475
|
+
await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff']);
|
|
476
|
+
await reporting.onOff(endpoint);
|
|
477
|
+
},
|
|
478
|
+
},
|
|
467
479
|
{
|
|
468
480
|
zigbeeModel: ['LK Switch'],
|
|
469
481
|
model: '545D6514',
|
package/devices/shinasystem.js
CHANGED
|
@@ -70,8 +70,12 @@ const tzLocal = {
|
|
|
70
70
|
case 'counting_freeze':
|
|
71
71
|
if (value.toLowerCase() === 'on') {
|
|
72
72
|
payload = {'presentValue': 82};
|
|
73
|
+
await endpoint.write('genAnalogInput', payload);
|
|
74
|
+
return {state: {counting_freeze: 'ON'}};
|
|
73
75
|
} else if (value.toLowerCase() === 'off') {
|
|
74
76
|
payload = {'presentValue': 84};
|
|
77
|
+
await endpoint.write('genAnalogInput', payload);
|
|
78
|
+
return {state: {counting_freeze: 'OFF'}};
|
|
75
79
|
}
|
|
76
80
|
break;
|
|
77
81
|
case 'tof_init':
|
|
@@ -80,44 +84,72 @@ const tzLocal = {
|
|
|
80
84
|
case 'led_state':
|
|
81
85
|
if (value === 'enable') {
|
|
82
86
|
payload = {'presentValue': 86};
|
|
87
|
+
await endpoint.write('genAnalogInput', payload);
|
|
88
|
+
return {state: {led_state: 'enable'}};
|
|
83
89
|
} else if (value === 'disable') {
|
|
84
90
|
payload = {'presentValue': 87};
|
|
91
|
+
await endpoint.write('genAnalogInput', payload);
|
|
92
|
+
return {state: {led_state: 'disable'}};
|
|
85
93
|
}
|
|
86
94
|
break;
|
|
87
95
|
case 'rf_state':
|
|
88
96
|
if (value === 'enable') {
|
|
89
97
|
payload = {'presentValue': 88};
|
|
98
|
+
await endpoint.write('genAnalogInput', payload);
|
|
99
|
+
return {state: {rf_state: 'enable'}};
|
|
90
100
|
} else if (value === 'disable') {
|
|
91
101
|
payload = {'presentValue': 89};
|
|
102
|
+
await endpoint.write('genAnalogInput', payload);
|
|
103
|
+
return {state: {rf_state: 'disable'}};
|
|
92
104
|
}
|
|
93
105
|
break;
|
|
94
106
|
case 'transaction':
|
|
95
107
|
if (value === '0ms') {
|
|
96
108
|
payload = {'presentValue': 90};
|
|
109
|
+
await endpoint.write('genAnalogInput', payload);
|
|
110
|
+
return {state: {transaction: '0ms'}};
|
|
97
111
|
} else if (value === '200ms') {
|
|
98
112
|
payload = {'presentValue': 91};
|
|
113
|
+
await endpoint.write('genAnalogInput', payload);
|
|
114
|
+
return {state: {transaction: '200ms'}};
|
|
99
115
|
} else if (value === '400ms') {
|
|
100
116
|
payload = {'presentValue': 92};
|
|
117
|
+
await endpoint.write('genAnalogInput', payload);
|
|
118
|
+
return {state: {transaction: '400ms'}};
|
|
101
119
|
} else if (value === '600ms') {
|
|
102
120
|
payload = {'presentValue': 93};
|
|
121
|
+
await endpoint.write('genAnalogInput', payload);
|
|
122
|
+
return {state: {transaction: '600ms'}};
|
|
103
123
|
} else if (value === '800ms') {
|
|
104
124
|
payload = {'presentValue': 94};
|
|
125
|
+
await endpoint.write('genAnalogInput', payload);
|
|
126
|
+
return {state: {transaction: '800ms'}};
|
|
105
127
|
} else if (value === '1,000ms') {
|
|
106
128
|
payload = {'presentValue': 95};
|
|
129
|
+
await endpoint.write('genAnalogInput', payload);
|
|
130
|
+
return {state: {transaction: '1,000ms'}};
|
|
107
131
|
}
|
|
108
132
|
break;
|
|
109
133
|
case 'fast_in':
|
|
110
134
|
if (value === 'enable') {
|
|
111
135
|
payload = {'presentValue': 96};
|
|
136
|
+
await endpoint.write('genAnalogInput', payload);
|
|
137
|
+
return {state: {fast_in: 'enable'}};
|
|
112
138
|
} else if (value === 'disable') {
|
|
113
139
|
payload = {'presentValue': 97};
|
|
140
|
+
await endpoint.write('genAnalogInput', payload);
|
|
141
|
+
return {state: {fast_in: 'disable'}};
|
|
114
142
|
}
|
|
115
143
|
break;
|
|
116
144
|
case 'fast_out':
|
|
117
145
|
if (value === 'enable') {
|
|
118
146
|
payload = {'presentValue': 98};
|
|
147
|
+
await endpoint.write('genAnalogInput', payload);
|
|
148
|
+
return {state: {fast_out: 'enable'}};
|
|
119
149
|
} else if (value === 'disable') {
|
|
120
150
|
payload = {'presentValue': 99};
|
|
151
|
+
await endpoint.write('genAnalogInput', payload);
|
|
152
|
+
return {state: {fast_out: 'disable'}};
|
|
121
153
|
}
|
|
122
154
|
break;
|
|
123
155
|
}
|
package/devices/sinope.js
CHANGED
|
@@ -355,15 +355,21 @@ module.exports = [
|
|
|
355
355
|
model: 'SP2600ZB',
|
|
356
356
|
vendor: 'Sinopé',
|
|
357
357
|
description: 'Zigbee smart plug',
|
|
358
|
-
fromZigbee: [fz.on_off, fz.electrical_measurement],
|
|
358
|
+
fromZigbee: [fz.on_off, fz.electrical_measurement, fz.metering],
|
|
359
359
|
toZigbee: [tz.on_off],
|
|
360
|
-
exposes: [e.switch(), e.power()],
|
|
360
|
+
exposes: [e.switch(), e.power(), e.current(), e.voltage(), e.ac_frequency(), e.energy()],
|
|
361
361
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
362
362
|
const endpoint = device.getEndpoint(1);
|
|
363
|
-
|
|
364
|
-
await reporting.
|
|
363
|
+
const binds = ['genBasic', 'genIdentify', 'genOnOff', 'haElectricalMeasurement', 'seMetering'];
|
|
364
|
+
await reporting.bind(endpoint, coordinatorEndpoint, binds);
|
|
365
|
+
await reporting.readEletricalMeasurementMultiplierDivisors(endpoint, {readFrequencyAttrs: true});
|
|
365
366
|
await reporting.onOff(endpoint);
|
|
366
|
-
await reporting.activePower(endpoint, {min: 10, change: 1});
|
|
367
|
+
await reporting.activePower(endpoint, {min: 10, change: 1}); // divider 10 : 0.1W
|
|
368
|
+
await reporting.rmsCurrent(endpoint, {min: 10, change: 10}); // divider 100: 0.1Arms
|
|
369
|
+
await reporting.rmsVoltage(endpoint, {min: 10, change: 10}); // divider 100: 0.1Vrms
|
|
370
|
+
await reporting.acFrequency(endpoint, {min: 10, change: 100}); // divider 100: 1Hz
|
|
371
|
+
await endpoint.read('haElectricalMeasurement', ['acFrequency']); // get a first read
|
|
372
|
+
await reporting.currentSummDelivered(endpoint, {min: 10, max: 307, change: [1, 1]});
|
|
367
373
|
},
|
|
368
374
|
},
|
|
369
375
|
{
|
package/devices/third_reality.js
CHANGED
|
@@ -3,6 +3,7 @@ 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
|
|
|
8
9
|
module.exports = [
|
|
@@ -60,6 +61,7 @@ module.exports = [
|
|
|
60
61
|
fromZigbee: [fz.ias_water_leak_alarm_1, fz.battery],
|
|
61
62
|
meta: {battery: {dontDividePercentage: true}},
|
|
62
63
|
toZigbee: [],
|
|
64
|
+
ota: ota.zigbeeOTA,
|
|
63
65
|
exposes: [e.water_leak(), e.battery_low(), e.battery(), e.battery_voltage()],
|
|
64
66
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
65
67
|
device.powerSource = 'Battery';
|
|
@@ -144,5 +146,6 @@ module.exports = [
|
|
|
144
146
|
fromZigbee: [fz.battery, fz.temperature, fz.humidity],
|
|
145
147
|
toZigbee: [],
|
|
146
148
|
exposes: [e.battery(), e.temperature(), e.humidity(), e.battery_voltage()],
|
|
149
|
+
ota: ota.zigbeeOTA,
|
|
147
150
|
},
|
|
148
151
|
];
|
package/devices/tuya.js
CHANGED
|
@@ -1399,7 +1399,8 @@ module.exports = [
|
|
|
1399
1399
|
fingerprint: [{modelID: 'TS0215A', manufacturerName: '_TZ3000_4fsgukof'},
|
|
1400
1400
|
{modelID: 'TS0215A', manufacturerName: '_TZ3000_wr2ucaj9'},
|
|
1401
1401
|
{modelID: 'TS0215A', manufacturerName: '_TZ3000_zsh6uat3'},
|
|
1402
|
-
{modelID: 'TS0215A', manufacturerName: '_TZ3000_tj4pwzzm'}
|
|
1402
|
+
{modelID: 'TS0215A', manufacturerName: '_TZ3000_tj4pwzzm'},
|
|
1403
|
+
{modelID: 'TS0215A', manufacturerName: '_TZ3000_2izubafb'}],
|
|
1403
1404
|
model: 'TS0215A_sos',
|
|
1404
1405
|
vendor: 'TuYa',
|
|
1405
1406
|
description: 'SOS button',
|
|
@@ -1986,7 +1987,7 @@ module.exports = [
|
|
|
1986
1987
|
'to the desired temperature. If you want TRV to properly regulate the temperature you need to use mode `auto` ' +
|
|
1987
1988
|
'instead setting the desired temperature.')
|
|
1988
1989
|
.withLocalTemperatureCalibration(-9, 9, 1, ea.STATE_SET)
|
|
1989
|
-
.withPreset(['schedule', 'manual', 'boost', 'complex', 'comfort', 'eco'])
|
|
1990
|
+
.withPreset(['schedule', 'manual', 'boost', 'complex', 'comfort', 'eco', 'away'])
|
|
1990
1991
|
.withRunningState(['idle', 'heat'], ea.STATE),
|
|
1991
1992
|
e.auto_lock(), e.away_mode(), e.away_preset_days(), e.boost_time(), e.comfort_temperature(), e.eco_temperature(), e.force(),
|
|
1992
1993
|
e.max_temperature(), e.min_temperature(), e.away_preset_temperature(),
|
|
@@ -3335,8 +3336,7 @@ module.exports = [
|
|
|
3335
3336
|
exposes: [e.illuminance_lux(), e.brightness_state()],
|
|
3336
3337
|
},
|
|
3337
3338
|
{
|
|
3338
|
-
fingerprint: [{modelID: 'TS0601', manufacturerName: '_TZE200_kltffuzl'}, {modelID: 'TS0601', manufacturerName: '_TZE200_fwoorn8y'},
|
|
3339
|
-
{modelID: 'TS0601', manufacturerName: '_TZE200_pay2byax'}],
|
|
3339
|
+
fingerprint: [{modelID: 'TS0601', manufacturerName: '_TZE200_kltffuzl'}, {modelID: 'TS0601', manufacturerName: '_TZE200_fwoorn8y'}],
|
|
3340
3340
|
model: 'TM001-ZA/TM081',
|
|
3341
3341
|
vendor: 'TuYa',
|
|
3342
3342
|
description: 'Door and window sensor',
|
|
@@ -3418,18 +3418,7 @@ module.exports = [
|
|
|
3418
3418
|
],
|
|
3419
3419
|
},
|
|
3420
3420
|
{
|
|
3421
|
-
fingerprint:
|
|
3422
|
-
{modelID: 'TS0601', manufacturerName: '_TZE200_znbl8dj5'}],
|
|
3423
|
-
model: 'CX-0726',
|
|
3424
|
-
vendor: 'TuYa',
|
|
3425
|
-
description: 'Temperature & humidity LCD sensor',
|
|
3426
|
-
fromZigbee: [fz.tuya_temperature_humidity_sensor, fz.ignore_tuya_set_time],
|
|
3427
|
-
toZigbee: [],
|
|
3428
|
-
onEvent: tuya.onEventSetLocalTime,
|
|
3429
|
-
exposes: [e.temperature(), e.humidity(), e.battery()],
|
|
3430
|
-
},
|
|
3431
|
-
{
|
|
3432
|
-
fingerprint: [{modelID: 'TS0601', manufacturerName: '_TZE200_3towulqd'}, {modelID: 'TS0601', manufacturerName: '_TZE200_1ibpyhdc'}],
|
|
3421
|
+
fingerprint: tuya.fingerprint('TS0601', ['_TZE200_3towulqd', '_TZE200_1ibpyhdc', '_TZE200_bh3n6gk8']),
|
|
3433
3422
|
model: 'ZG-204ZL',
|
|
3434
3423
|
vendor: 'TuYa',
|
|
3435
3424
|
description: 'Luminance motion sensor',
|
|
@@ -3550,4 +3539,58 @@ module.exports = [
|
|
|
3550
3539
|
.withDescription('Turns the onboard LED on or off'),
|
|
3551
3540
|
],
|
|
3552
3541
|
},
|
|
3542
|
+
{
|
|
3543
|
+
fingerprint: tuya.fingerprint('TS0601', ['_TZE200_qoy0ekbd', '_TZE200_znbl8dj5', '_TZE200_a8sdabtg']),
|
|
3544
|
+
model: 'ZG-227ZL',
|
|
3545
|
+
vendor: 'TuYa',
|
|
3546
|
+
description: 'Temperature & humidity LCD sensor',
|
|
3547
|
+
fromZigbee: [tuya.fzDataPoints],
|
|
3548
|
+
toZigbee: [tuya.tzDataPoints],
|
|
3549
|
+
configure: tuya.configureMagicPacket,
|
|
3550
|
+
exposes: [e.temperature(), e.humidity(), tuya.exposes.temperatureUnit(), tuya.exposes.temperatureCalibration(),
|
|
3551
|
+
tuya.exposes.humidityCalibration(), e.battery()],
|
|
3552
|
+
meta: {
|
|
3553
|
+
tuyaDatapoints: [
|
|
3554
|
+
[1, 'temperature', tuya.valueConverter.divideBy10],
|
|
3555
|
+
[2, 'humidity', tuya.valueConverter.raw],
|
|
3556
|
+
[4, 'battery', tuya.valueConverter.raw],
|
|
3557
|
+
[9, 'temperature_unit', tuya.valueConverter.temperatureUnit],
|
|
3558
|
+
[23, 'temperature_calibration', tuya.valueConverter.divideBy10],
|
|
3559
|
+
[24, 'humidity_calibration', tuya.valueConverter.raw],
|
|
3560
|
+
],
|
|
3561
|
+
},
|
|
3562
|
+
},
|
|
3563
|
+
{
|
|
3564
|
+
fingerprint: tuya.fingerprint('TS0601', ['_TZE200_n8dljorx', '_TZE200_pay2byax']),
|
|
3565
|
+
model: 'ZG-102ZL',
|
|
3566
|
+
vendor: 'TuYa',
|
|
3567
|
+
description: 'Luminance door sensor',
|
|
3568
|
+
fromZigbee: [tuya.fzDataPoints],
|
|
3569
|
+
toZigbee: [tuya.tzDataPoints],
|
|
3570
|
+
configure: tuya.configureMagicPacket,
|
|
3571
|
+
exposes: [e.contact(), e.illuminance().withUnit('lx'), e.battery()],
|
|
3572
|
+
meta: {
|
|
3573
|
+
tuyaDatapoints: [
|
|
3574
|
+
[1, 'contact', tuya.valueConverter.inverse],
|
|
3575
|
+
[101, 'illuminance', tuya.valueConverter.raw],
|
|
3576
|
+
[2, 'battery', tuya.valueConverter.raw],
|
|
3577
|
+
],
|
|
3578
|
+
},
|
|
3579
|
+
},
|
|
3580
|
+
{
|
|
3581
|
+
fingerprint: tuya.fingerprint('TS0601', ['_TZE200_8isdky6j']),
|
|
3582
|
+
model: 'ZG-225Z',
|
|
3583
|
+
vendor: 'TuYa',
|
|
3584
|
+
description: 'Gas sensor',
|
|
3585
|
+
fromZigbee: [tuya.fzDataPoints],
|
|
3586
|
+
toZigbee: [tuya.tzDataPoints],
|
|
3587
|
+
configure: tuya.configureMagicPacket,
|
|
3588
|
+
exposes: [e.gas(), tuya.exposes.gasValue()],
|
|
3589
|
+
meta: {
|
|
3590
|
+
tuyaDatapoints: [
|
|
3591
|
+
[1, 'gas', tuya.valueConverter.true0ElseFalse],
|
|
3592
|
+
[2, 'gas_value', tuya.valueConverter.raw],
|
|
3593
|
+
],
|
|
3594
|
+
},
|
|
3595
|
+
},
|
|
3553
3596
|
];
|
package/devices/xiaomi.js
CHANGED
|
@@ -131,7 +131,7 @@ const fzLocal = {
|
|
|
131
131
|
break;
|
|
132
132
|
case 0x041502bc: { // feeding report
|
|
133
133
|
const report = val.toString();
|
|
134
|
-
result['feeding_source'] = {1: 'manual', 2: 'remote'}[parseInt(report.slice(0, 2))];
|
|
134
|
+
result['feeding_source'] = {0: 'schedule', 1: 'manual', 2: 'remote'}[parseInt(report.slice(0, 2))];
|
|
135
135
|
result['feeding_size'] = parseInt(report.slice(3, 4));
|
|
136
136
|
break;
|
|
137
137
|
}
|
|
@@ -2582,7 +2582,7 @@ module.exports = [
|
|
|
2582
2582
|
toZigbee: [tzLocal.aqara_feeder],
|
|
2583
2583
|
exposes: [
|
|
2584
2584
|
exposes.enum('feed', ea.STATE_SET, ['START']).withDescription('Start feeding'),
|
|
2585
|
-
exposes.enum('feeding_source', ea.STATE, ['manual', 'remote']).withDescription('Feeding source'),
|
|
2585
|
+
exposes.enum('feeding_source', ea.STATE, ['schedule', 'manual', 'remote']).withDescription('Feeding source'),
|
|
2586
2586
|
exposes.numeric('feeding_size', ea.STATE).withDescription('Feeding size').withUnit('portion'),
|
|
2587
2587
|
exposes.numeric('portions_per_day', ea.STATE).withDescription('Portions per day'),
|
|
2588
2588
|
exposes.numeric('weight_per_day', ea.STATE).withDescription('Weight per day').withUnit('g'),
|
package/lib/tuya.js
CHANGED
|
@@ -1170,6 +1170,12 @@ const tuyaExposes = {
|
|
|
1170
1170
|
errorStatus: () => exposes.numeric('error_status', ea.STATE).withDescription('Error status'),
|
|
1171
1171
|
scheduleAllDays: (access, format) => ['monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday', 'sunday']
|
|
1172
1172
|
.map((day) => exposes.text(`schedule_${day}`, access).withDescription(`Schedule for ${day}, format: "${format}"`)),
|
|
1173
|
+
temperatureUnit: () => exposes.enum('temperature_unit', ea.STATE_SET, ['celsius', 'fahrenheit']).withDescription('Temperature unit'),
|
|
1174
|
+
temperatureCalibration: () => exposes.numeric('temperature_calibration', ea.STATE_SET).withValueMin(-2.0).withValueMax(2.0)
|
|
1175
|
+
.withValueStep(0.1).withUnit('°C').withDescription('Temperature calibration'),
|
|
1176
|
+
humidityCalibration: () => exposes.numeric('humidity_calibration', ea.STATE_SET).withValueMin(-30).withValueMax(30)
|
|
1177
|
+
.withValueStep(1).withUnit('%').withDescription('Humidity calibration'),
|
|
1178
|
+
gasValue: () => exposes.numeric('gas_value', ea.STATE).withDescription('Measured gas concentration').withUnit('ppm'),
|
|
1173
1179
|
};
|
|
1174
1180
|
|
|
1175
1181
|
const skip = {
|
|
@@ -1255,6 +1261,7 @@ const valueConverter = {
|
|
|
1255
1261
|
scale0_254to0_1000: valueConverterBasic.scale(0, 254, 0, 1000),
|
|
1256
1262
|
scale0_1to0_1000: valueConverterBasic.scale(0, 1, 0, 1000),
|
|
1257
1263
|
divideBy100: valueConverterBasic.divideBy(100),
|
|
1264
|
+
temperatureUnit: valueConverterBasic.lookup({'celsius': 0, 'fahrenheit': 1}),
|
|
1258
1265
|
divideBy10: valueConverterBasic.divideBy(10),
|
|
1259
1266
|
raw: valueConverterBasic.raw(),
|
|
1260
1267
|
phaseVariant1: {
|
|
@@ -1452,11 +1459,13 @@ const valueConverter = {
|
|
|
1452
1459
|
return {system_mode: v === false ? 'heat' : 'off', heating_stop: v === false ? 'OFF' : 'ON'};
|
|
1453
1460
|
},
|
|
1454
1461
|
},
|
|
1462
|
+
inverse: {to: (v) => !v, from: (v) => !v},
|
|
1455
1463
|
onOffNotStrict: {from: (v) => v ? 'ON' : 'OFF', to: (v) => v === 'ON'},
|
|
1456
1464
|
};
|
|
1457
1465
|
|
|
1458
1466
|
const tzDataPoints = {
|
|
1459
1467
|
key: [
|
|
1468
|
+
'temperature_unit', 'temperature_calibration', 'humidity_calibration',
|
|
1460
1469
|
'state', 'brightness', 'min_brightness', 'max_brightness', 'power_on_behavior',
|
|
1461
1470
|
'countdown', 'light_type', 'silence', 'self_test', 'child_lock', 'open_window', 'open_window_temperature', 'frost_protection',
|
|
1462
1471
|
'system_mode', 'heating_stop', 'current_heating_setpoint', 'local_temperature_calibration', 'preset', 'boost_timeset_countdown',
|