zigbee-herdsman-converters 14.0.355 → 14.0.359
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 +8 -1
- package/converters/toZigbee.js +14 -0
- package/devices/acova.js +1 -0
- package/devices/danfoss.js +4 -3
- package/devices/hive.js +4 -3
- package/devices/ikea.js +3 -9
- package/devices/philips.js +12 -2
- package/devices/popp.js +4 -3
- package/devices/salus_controls.js +14 -0
- package/devices/schneider_electric.js +15 -0
- package/devices/tuya.js +9 -1
- package/devices/xiaomi.js +1 -1
- package/devices/zemismart.js +31 -0
- package/lib/constants.js +6 -0
- package/lib/exposes.js +8 -7
- package/npm-shrinkwrap.json +542 -530
- package/package.json +2 -2
package/converters/fromZigbee.js
CHANGED
|
@@ -89,6 +89,10 @@ const converters = {
|
|
|
89
89
|
result[postfixWithEndpointName('control_sequence_of_operation', msg, model)] =
|
|
90
90
|
constants.thermostatControlSequenceOfOperations[msg.data['ctrlSeqeOfOper']];
|
|
91
91
|
}
|
|
92
|
+
if (msg.data.hasOwnProperty('programingOperMode')) {
|
|
93
|
+
result[postfixWithEndpointName('programming_operation_mode', msg, model)] =
|
|
94
|
+
constants.thermostatProgrammingOperationModes[msg.data['programingOperMode']];
|
|
95
|
+
}
|
|
92
96
|
if (msg.data.hasOwnProperty('systemMode')) {
|
|
93
97
|
result[postfixWithEndpointName('system_mode', msg, model)] = constants.thermostatSystemModes[msg.data['systemMode']];
|
|
94
98
|
}
|
|
@@ -1798,7 +1802,7 @@ const converters = {
|
|
|
1798
1802
|
},
|
|
1799
1803
|
nous_lcd_temperature_humidity_sensor: {
|
|
1800
1804
|
cluster: 'manuSpecificTuya',
|
|
1801
|
-
type: ['
|
|
1805
|
+
type: ['commandDataResponse'],
|
|
1802
1806
|
options: [exposes.options.precision('temperature'), exposes.options.calibration('temperature'),
|
|
1803
1807
|
exposes.options.precision('humidity'), exposes.options.calibration('humidity')],
|
|
1804
1808
|
convert: (model, msg, publish, options, meta) => {
|
|
@@ -4344,6 +4348,7 @@ const converters = {
|
|
|
4344
4348
|
cluster: 'genScenes',
|
|
4345
4349
|
type: 'commandTradfriArrowSingle',
|
|
4346
4350
|
convert: (model, msg, publish, options, meta) => {
|
|
4351
|
+
if (hasAlreadyProcessedMessage(msg)) return;
|
|
4347
4352
|
if (msg.data.value === 2) {
|
|
4348
4353
|
// This is send on toggle hold, ignore it as a toggle_hold is already handled above.
|
|
4349
4354
|
return;
|
|
@@ -4357,6 +4362,7 @@ const converters = {
|
|
|
4357
4362
|
cluster: 'genScenes',
|
|
4358
4363
|
type: 'commandTradfriArrowHold',
|
|
4359
4364
|
convert: (model, msg, publish, options, meta) => {
|
|
4365
|
+
if (hasAlreadyProcessedMessage(msg)) return;
|
|
4360
4366
|
const direction = msg.data.value === 3329 ? 'left' : 'right';
|
|
4361
4367
|
globalStore.putValue(msg.endpoint, 'direction', direction);
|
|
4362
4368
|
return {action: `arrow_${direction}_hold`};
|
|
@@ -4367,6 +4373,7 @@ const converters = {
|
|
|
4367
4373
|
type: 'commandTradfriArrowRelease',
|
|
4368
4374
|
options: [exposes.options.legacy()],
|
|
4369
4375
|
convert: (model, msg, publish, options, meta) => {
|
|
4376
|
+
if (hasAlreadyProcessedMessage(msg)) return;
|
|
4370
4377
|
const direction = globalStore.getValue(msg.endpoint, 'direction');
|
|
4371
4378
|
if (direction) {
|
|
4372
4379
|
globalStore.clearValue(msg.endpoint, 'direction');
|
package/converters/toZigbee.js
CHANGED
|
@@ -1154,6 +1154,20 @@ const converters = {
|
|
|
1154
1154
|
await entity.read('hvacThermostat', ['ctrlSeqeOfOper']);
|
|
1155
1155
|
},
|
|
1156
1156
|
},
|
|
1157
|
+
thermostat_programming_operation_mode: {
|
|
1158
|
+
key: ['programming_operation_mode'],
|
|
1159
|
+
convertSet: async (entity, key, value, meta) => {
|
|
1160
|
+
const val = utils.getKey(constants.thermostatProgrammingOperationModes, value, undefined, Number);
|
|
1161
|
+
if (val === undefined) {
|
|
1162
|
+
throw new Error('Programming operation mode invalid, must be one of: ' +
|
|
1163
|
+
Object.values(constants.thermostatProgrammingOperationModes).join(', '));
|
|
1164
|
+
}
|
|
1165
|
+
await entity.write('hvacThermostat', {programingOperMode: val});
|
|
1166
|
+
},
|
|
1167
|
+
convertGet: async (entity, key, meta) => {
|
|
1168
|
+
await entity.read('hvacThermostat', ['programingOperMode']);
|
|
1169
|
+
},
|
|
1170
|
+
},
|
|
1157
1171
|
thermostat_temperature_display_mode: {
|
|
1158
1172
|
key: ['temperature_display_mode'],
|
|
1159
1173
|
convertSet: async (entity, key, value, meta) => {
|
package/devices/acova.js
CHANGED
|
@@ -28,6 +28,7 @@ module.exports = [{
|
|
|
28
28
|
const endpoint = device.getEndpoint(1);
|
|
29
29
|
await reporting.bind(endpoint, coordinatorEndpoint, ['genPowerCfg', 'hvacThermostat']);
|
|
30
30
|
await reporting.thermostatTemperature(endpoint);
|
|
31
|
+
await reporting.thermostatRunningState(endpoint);
|
|
31
32
|
await reporting.thermostatOccupiedHeatingSetpoint(endpoint);
|
|
32
33
|
await reporting.thermostatUnoccupiedHeatingSetpoint(endpoint);
|
|
33
34
|
},
|
package/devices/danfoss.js
CHANGED
|
@@ -15,14 +15,15 @@ module.exports = [
|
|
|
15
15
|
model: '014G2461',
|
|
16
16
|
vendor: 'Danfoss',
|
|
17
17
|
description: 'Ally thermostat',
|
|
18
|
-
fromZigbee: [fz.battery, fz.thermostat, fz.hvac_user_interface, fz.danfoss_thermostat],
|
|
18
|
+
fromZigbee: [fz.battery, fz.thermostat, fz.thermostat_weekly_schedule, fz.hvac_user_interface, fz.danfoss_thermostat],
|
|
19
19
|
toZigbee: [tz.danfoss_thermostat_occupied_heating_setpoint, tz.thermostat_local_temperature, tz.danfoss_mounted_mode_active,
|
|
20
20
|
tz.danfoss_mounted_mode_control, tz.danfoss_thermostat_vertical_orientation, tz.danfoss_algorithm_scale_factor,
|
|
21
21
|
tz.danfoss_heat_available, tz.danfoss_heat_required, tz.danfoss_day_of_week, tz.danfoss_trigger_time,
|
|
22
22
|
tz.danfoss_window_open_internal, tz.danfoss_window_open_external, tz.danfoss_load_estimate,
|
|
23
23
|
tz.danfoss_viewing_direction, tz.danfoss_external_measured_room_sensor, tz.danfoss_radiator_covered,
|
|
24
|
-
tz.thermostat_keypad_lockout, tz.thermostat_system_mode, tz.danfoss_load_balancing_enable, tz.danfoss_load_room_mean
|
|
25
|
-
|
|
24
|
+
tz.thermostat_keypad_lockout, tz.thermostat_system_mode, tz.danfoss_load_balancing_enable, tz.danfoss_load_room_mean,
|
|
25
|
+
tz.thermostat_weekly_schedule, tz.thermostat_clear_weekly_schedule, tz.thermostat_programming_operation_mode],
|
|
26
|
+
exposes: [e.battery(), e.keypad_lockout(), e.programming_operation_mode(),
|
|
26
27
|
exposes.binary('mounted_mode_active', ea.STATE_GET, true, false)
|
|
27
28
|
.withDescription('Is the unit in mounting mode. This is set to `false` for mounted (already on ' +
|
|
28
29
|
'the radiator) or `true` for not mounted (after factory reset)'),
|
package/devices/hive.js
CHANGED
|
@@ -156,14 +156,15 @@ module.exports = [
|
|
|
156
156
|
model: 'UK7004240',
|
|
157
157
|
vendor: 'Hive',
|
|
158
158
|
description: 'Radiator valve based on Danfos Ally',
|
|
159
|
-
fromZigbee: [fz.battery, fz.thermostat, fz.hvac_user_interface, fz.danfoss_thermostat],
|
|
159
|
+
fromZigbee: [fz.battery, fz.thermostat, fz.thermostat_weekly_schedule, fz.hvac_user_interface, fz.danfoss_thermostat],
|
|
160
160
|
toZigbee: [tz.danfoss_thermostat_occupied_heating_setpoint, tz.thermostat_local_temperature, tz.danfoss_mounted_mode_active,
|
|
161
161
|
tz.danfoss_mounted_mode_control, tz.danfoss_thermostat_vertical_orientation, tz.danfoss_algorithm_scale_factor,
|
|
162
162
|
tz.danfoss_heat_available, tz.danfoss_heat_required, tz.danfoss_day_of_week, tz.danfoss_trigger_time,
|
|
163
163
|
tz.danfoss_window_open_internal, tz.danfoss_window_open_external, tz.danfoss_load_estimate,
|
|
164
164
|
tz.danfoss_viewing_direction, tz.danfoss_external_measured_room_sensor, tz.thermostat_keypad_lockout,
|
|
165
|
-
tz.thermostat_system_mode, tz.danfoss_load_balancing_enable, tz.danfoss_load_room_mean
|
|
166
|
-
|
|
165
|
+
tz.thermostat_system_mode, tz.danfoss_load_balancing_enable, tz.danfoss_load_room_mean,
|
|
166
|
+
tz.thermostat_weekly_schedule, tz.thermostat_clear_weekly_schedule, tz.thermostat_programming_operation_mode],
|
|
167
|
+
exposes: [e.battery(), e.keypad_lockout(), e.programming_operation_mode(),
|
|
167
168
|
exposes.binary('mounted_mode_active', ea.STATE_GET, true, false)
|
|
168
169
|
.withDescription('Is the unit in mounting mode. This is set to `false` for mounted (already on ' +
|
|
169
170
|
'the radiator) or `true` for not mounted (after factory reset)'),
|
package/devices/ikea.js
CHANGED
|
@@ -443,27 +443,21 @@ module.exports = [
|
|
|
443
443
|
model: 'ICPSHC24-10EU-IL-1',
|
|
444
444
|
vendor: 'IKEA',
|
|
445
445
|
description: 'TRADFRI driver for wireless control (10 watt)',
|
|
446
|
-
extend:
|
|
447
|
-
ota: ota.tradfri,
|
|
448
|
-
onEvent: bulbOnEvent,
|
|
446
|
+
extend: tradfriExtend.light_onoff_brightness(),
|
|
449
447
|
},
|
|
450
448
|
{
|
|
451
449
|
zigbeeModel: ['TRADFRI transformer 30W', 'TRADFRI Driver 30W'],
|
|
452
450
|
model: 'ICPSHC24-30EU-IL-1',
|
|
453
451
|
vendor: 'IKEA',
|
|
454
452
|
description: 'TRADFRI driver for wireless control (30 watt)',
|
|
455
|
-
extend:
|
|
456
|
-
ota: ota.tradfri,
|
|
457
|
-
onEvent: bulbOnEvent,
|
|
453
|
+
extend: tradfriExtend.light_onoff_brightness(),
|
|
458
454
|
},
|
|
459
455
|
{
|
|
460
456
|
zigbeeModel: ['SILVERGLANS IP44 LED driver'],
|
|
461
457
|
model: 'ICPSHC24-30-IL44-1',
|
|
462
458
|
vendor: 'IKEA',
|
|
463
459
|
description: 'SILVERGLANS IP44 LED driver for wireless control (30 watt)',
|
|
464
|
-
extend:
|
|
465
|
-
ota: ota.tradfri,
|
|
466
|
-
onEvent: bulbOnEvent,
|
|
460
|
+
extend: tradfriExtend.light_onoff_brightness(),
|
|
467
461
|
},
|
|
468
462
|
{
|
|
469
463
|
zigbeeModel: ['FLOALT panel WS 30x30'],
|
package/devices/philips.js
CHANGED
|
@@ -1525,6 +1525,15 @@ module.exports = [
|
|
|
1525
1525
|
extend: hueExtend.light_onoff_brightness_colortemp_color({colorTempRange: [153, 500]}),
|
|
1526
1526
|
ota: ota.zigbeeOTA,
|
|
1527
1527
|
},
|
|
1528
|
+
{
|
|
1529
|
+
zigbeeModel: ['915005986901'],
|
|
1530
|
+
model: '915005986901',
|
|
1531
|
+
vendor: 'Philips',
|
|
1532
|
+
description: 'Hue White and color ambiance Gradient Signe table lamp (white)',
|
|
1533
|
+
meta: {turnsOffAtBrightness1: true},
|
|
1534
|
+
extend: hueExtend.light_onoff_brightness_colortemp_color({colorTempRange: [153, 500]}),
|
|
1535
|
+
ota: ota.zigbeeOTA,
|
|
1536
|
+
},
|
|
1528
1537
|
{
|
|
1529
1538
|
zigbeeModel: ['5060730P7_01', '5060730P7_02', '5060730P7_03', '5060730P7_04', '5060730P7_05'],
|
|
1530
1539
|
model: '5060730P7',
|
|
@@ -1724,7 +1733,7 @@ module.exports = [
|
|
|
1724
1733
|
ota: ota.zigbeeOTA,
|
|
1725
1734
|
},
|
|
1726
1735
|
{
|
|
1727
|
-
zigbeeModel: ['RDM001'],
|
|
1736
|
+
zigbeeModel: ['RDM001', '9290030171'],
|
|
1728
1737
|
model: '929003017102',
|
|
1729
1738
|
vendor: 'Philips',
|
|
1730
1739
|
description: 'Hue wall switch module',
|
|
@@ -1748,7 +1757,8 @@ module.exports = [
|
|
|
1748
1757
|
fromZigbee: [fz.ignore_command_on, fz.ignore_command_off, fz.ignore_command_step, fz.ignore_command_stop,
|
|
1749
1758
|
fz.legacy.hue_dimmer_switch, fz.battery],
|
|
1750
1759
|
exposes: [e.battery(), e.action(['on-press', 'on-hold', 'on-hold-release', 'up-press', 'up-hold', 'up-hold-release',
|
|
1751
|
-
'down-press', 'down-hold', 'down-hold-release', 'off-press', 'off-hold', 'off-hold-release'])
|
|
1760
|
+
'down-press', 'down-hold', 'down-hold-release', 'off-press', 'off-hold', 'off-hold-release']),
|
|
1761
|
+
exposes.numeric('action_duration', ea.STATE).withUnit('second')],
|
|
1752
1762
|
toZigbee: [],
|
|
1753
1763
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
1754
1764
|
const endpoint1 = device.getEndpoint(1);
|
package/devices/popp.js
CHANGED
|
@@ -15,14 +15,15 @@ module.exports = [
|
|
|
15
15
|
model: '701721',
|
|
16
16
|
vendor: 'Popp',
|
|
17
17
|
description: 'Smart thermostat',
|
|
18
|
-
fromZigbee: [fz.battery, fz.thermostat, fz.hvac_user_interface, fz.danfoss_thermostat],
|
|
18
|
+
fromZigbee: [fz.battery, fz.thermostat, fz.thermostat_weekly_schedule, fz.hvac_user_interface, fz.danfoss_thermostat],
|
|
19
19
|
toZigbee: [tz.danfoss_thermostat_occupied_heating_setpoint, tz.thermostat_local_temperature, tz.danfoss_mounted_mode_active,
|
|
20
20
|
tz.danfoss_mounted_mode_control, tz.danfoss_thermostat_vertical_orientation, tz.danfoss_algorithm_scale_factor,
|
|
21
21
|
tz.danfoss_heat_available, tz.danfoss_heat_required, tz.danfoss_day_of_week, tz.danfoss_trigger_time,
|
|
22
22
|
tz.danfoss_window_open_internal, tz.danfoss_window_open_external, tz.danfoss_load_estimate,
|
|
23
23
|
tz.danfoss_viewing_direction, tz.danfoss_external_measured_room_sensor, tz.thermostat_keypad_lockout,
|
|
24
|
-
tz.thermostat_system_mode, tz.danfoss_load_balancing_enable, tz.danfoss_load_room_mean
|
|
25
|
-
|
|
24
|
+
tz.thermostat_system_mode, tz.danfoss_load_balancing_enable, tz.danfoss_load_room_mean,
|
|
25
|
+
tz.thermostat_weekly_schedule, tz.thermostat_clear_weekly_schedule, tz.thermostat_programming_operation_mode],
|
|
26
|
+
exposes: [e.battery(), e.keypad_lockout(), e.programming_operation_mode(),
|
|
26
27
|
exposes.binary('mounted_mode_active', ea.STATE_GET, true, false)
|
|
27
28
|
.withDescription('Is the unit in mounting mode. This is set to `false` for mounted (already on ' +
|
|
28
29
|
'the radiator) or `true` for not mounted (after factory reset)'),
|
|
@@ -86,6 +86,20 @@ module.exports = [
|
|
|
86
86
|
exposes: [e.contact(), e.battery_low(), e.tamper()],
|
|
87
87
|
ota: ota.salus,
|
|
88
88
|
},
|
|
89
|
+
{
|
|
90
|
+
zigbeeModel: ['SS909ZB'],
|
|
91
|
+
model: 'PS600',
|
|
92
|
+
vendor: 'Salus Controls',
|
|
93
|
+
description: 'Pipe temperature sensor',
|
|
94
|
+
fromZigbee: [fz.temperature],
|
|
95
|
+
toZigbee: [],
|
|
96
|
+
exposes: [e.temperature()],
|
|
97
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
98
|
+
const endpoint = device.getEndpoint(9);
|
|
99
|
+
await reporting.bind(endpoint, coordinatorEndpoint, ['msTemperatureMeasurement']);
|
|
100
|
+
},
|
|
101
|
+
ota: ota.salus,
|
|
102
|
+
},
|
|
89
103
|
{
|
|
90
104
|
zigbeeModel: ['RE600'],
|
|
91
105
|
model: 'RE600',
|
|
@@ -8,6 +8,21 @@ const e = exposes.presets;
|
|
|
8
8
|
const ea = exposes.access;
|
|
9
9
|
|
|
10
10
|
module.exports = [
|
|
11
|
+
{
|
|
12
|
+
zigbeeModel: ['PUCK/SHUTTER/1'],
|
|
13
|
+
model: 'CCT5015-0001',
|
|
14
|
+
vendor: 'Schneider Electric',
|
|
15
|
+
description: 'Roller shutter module',
|
|
16
|
+
fromZigbee: [fz.cover_position_tilt],
|
|
17
|
+
toZigbee: [tz.cover_position_tilt, tz.cover_state],
|
|
18
|
+
exposes: [e.cover_position()],
|
|
19
|
+
meta: {coverInverted: true},
|
|
20
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
21
|
+
const endpoint = device.getEndpoint(5);
|
|
22
|
+
await reporting.bind(endpoint, coordinatorEndpoint, ['closuresWindowCovering']);
|
|
23
|
+
await reporting.currentPositionLiftPercentage(endpoint);
|
|
24
|
+
},
|
|
25
|
+
},
|
|
11
26
|
{
|
|
12
27
|
zigbeeModel: ['NHPB/SHUTTER/1'],
|
|
13
28
|
model: 'S520567',
|
package/devices/tuya.js
CHANGED
|
@@ -11,7 +11,7 @@ const ea = exposes.access;
|
|
|
11
11
|
|
|
12
12
|
const TS011Fplugs = ['_TZ3000_5f43h46b', '_TZ3000_cphmq0q7', '_TZ3000_dpo1ysak', '_TZ3000_ew3ldmgx', '_TZ3000_gjnozsaz',
|
|
13
13
|
'_TZ3000_jvzvulen', '_TZ3000_mraovvmm', '_TZ3000_nfnmi125', '_TZ3000_ps3dmato', '_TZ3000_w0qqde0g', '_TZ3000_u5u4cakc',
|
|
14
|
-
'_TZ3000_rdtixbnu'];
|
|
14
|
+
'_TZ3000_rdtixbnu', '_TZ3000_typdpbpg', '_TZ3000_v1pdxuqq'];
|
|
15
15
|
|
|
16
16
|
module.exports = [
|
|
17
17
|
{
|
|
@@ -175,6 +175,7 @@ module.exports = [
|
|
|
175
175
|
{modelID: 'TS0202', manufacturerName: '_TYZB01_dl7cejts'},
|
|
176
176
|
{modelID: 'TS0202', manufacturerName: '_TYZB01_qjqgmqxr'},
|
|
177
177
|
{modelID: 'TS0202', manufacturerName: '_TZ3000_mmtwjmaq'},
|
|
178
|
+
{modelID: 'TS0202', manufacturerName: '_TZ3000_kmh5qpmb'},
|
|
178
179
|
{modelID: 'TS0202', manufacturerName: '_TZ3000_mcxw5ehu'},
|
|
179
180
|
{modelID: 'TS0202', manufacturerName: '_TZ3000_msl6wxk9'},
|
|
180
181
|
{modelID: 'TS0202', manufacturerName: '_TYZB01_hqbdru35'},
|
|
@@ -570,6 +571,13 @@ module.exports = [
|
|
|
570
571
|
exposes: [e.battery(), e.action(['1_single', '1_double', '1_hold', '2_single', '2_double', '2_hold',
|
|
571
572
|
'3_single', '3_double', '3_hold', '4_single', '4_double', '4_hold'])],
|
|
572
573
|
toZigbee: [],
|
|
574
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
575
|
+
const endpoint = device.getEndpoint(1);
|
|
576
|
+
await reporting.bind(endpoint, coordinatorEndpoint, ['genPowerCfg']);
|
|
577
|
+
try {
|
|
578
|
+
await reporting.batteryPercentageRemaining(endpoint);
|
|
579
|
+
} catch (error) {/* Fails for some*/}
|
|
580
|
+
},
|
|
573
581
|
},
|
|
574
582
|
{
|
|
575
583
|
fingerprint: [{modelID: 'TS004F', manufacturerName: '_TZ3000_xabckq1v'}],
|
package/devices/xiaomi.js
CHANGED
|
@@ -1724,7 +1724,7 @@ module.exports = [
|
|
|
1724
1724
|
model: 'MCCGQ12LM',
|
|
1725
1725
|
vendor: 'Xiaomi',
|
|
1726
1726
|
description: 'Aqara T1 door & window contact sensor',
|
|
1727
|
-
fromZigbee: [fz.
|
|
1727
|
+
fromZigbee: [fz.xiaomi_contact, fz.battery],
|
|
1728
1728
|
toZigbee: [],
|
|
1729
1729
|
meta: {battery: {voltageToPercentage: '3V_2100'}},
|
|
1730
1730
|
exposes: [e.contact(), e.battery(), e.battery_voltage()],
|
package/devices/zemismart.js
CHANGED
|
@@ -4,6 +4,21 @@ 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 tuya = require('../lib/tuya');
|
|
8
|
+
|
|
9
|
+
const fzLocal = {
|
|
10
|
+
ZMRM02: {
|
|
11
|
+
cluster: 'manuSpecificTuya',
|
|
12
|
+
type: ['commandGetData', 'commandSetDataResponse'],
|
|
13
|
+
convert: (model, msg, publish, options, meta) => {
|
|
14
|
+
const button = msg.data.dp;
|
|
15
|
+
const actionValue = tuya.getDataValue(msg.data.datatype, msg.data.data);
|
|
16
|
+
const lookup = {0: 'single', 1: 'double', 2: 'hold'};
|
|
17
|
+
const action = lookup[actionValue];
|
|
18
|
+
return {action: `button_${button}_${action}`};
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
};
|
|
7
22
|
|
|
8
23
|
module.exports = [
|
|
9
24
|
{
|
|
@@ -66,4 +81,20 @@ module.exports = [
|
|
|
66
81
|
await reporting.onOff(endpoint);
|
|
67
82
|
},
|
|
68
83
|
},
|
|
84
|
+
{
|
|
85
|
+
fingerprint: [{modelID: 'TS0601', manufacturerName: '_TZE200_zqtiam4u'}],
|
|
86
|
+
model: 'ZM-RM02',
|
|
87
|
+
vendor: 'Zemismart',
|
|
88
|
+
description: 'Smart 6 key scene switch',
|
|
89
|
+
fromZigbee: [fzLocal.ZMRM02],
|
|
90
|
+
toZigbee: [],
|
|
91
|
+
onEvent: tuya.onEventSetTime,
|
|
92
|
+
exposes: [e.battery(), e.action([
|
|
93
|
+
'button_1_hold', 'button_1_single', 'button_1_double',
|
|
94
|
+
'button_2_hold', 'button_2_single', 'button_2_double',
|
|
95
|
+
'button_3_hold', 'button_3_single', 'button_3_double',
|
|
96
|
+
'button_4_hold', 'button_4_single', 'button_4_double',
|
|
97
|
+
'button_5_hold', 'button_5_single', 'button_5_double',
|
|
98
|
+
'button_6_hold', 'button_6_single', 'button_6_double'])],
|
|
99
|
+
},
|
|
69
100
|
];
|
package/lib/constants.js
CHANGED
|
@@ -21,6 +21,11 @@ const thermostatControlSequenceOfOperations = {
|
|
|
21
21
|
5: 'cooling_and_heating_4-pipes_with_reheat',
|
|
22
22
|
};
|
|
23
23
|
|
|
24
|
+
const thermostatProgrammingOperationModes = {
|
|
25
|
+
0: 'setpoint',
|
|
26
|
+
1: 'schedule',
|
|
27
|
+
};
|
|
28
|
+
|
|
24
29
|
const thermostatSystemModes = {
|
|
25
30
|
0: 'off',
|
|
26
31
|
1: 'auto',
|
|
@@ -247,6 +252,7 @@ module.exports = {
|
|
|
247
252
|
repInterval,
|
|
248
253
|
defaultBindGroup,
|
|
249
254
|
thermostatControlSequenceOfOperations,
|
|
255
|
+
thermostatProgrammingOperationModes,
|
|
250
256
|
thermostatSystemModes,
|
|
251
257
|
thermostatRunningStates,
|
|
252
258
|
thermostatRunningMode,
|
package/lib/exposes.js
CHANGED
|
@@ -516,7 +516,7 @@ module.exports = {
|
|
|
516
516
|
carbon_monoxide: () => new Binary('carbon_monoxide', access.STATE, true, false).withDescription('Indicates if CO (carbon monoxide) is detected'),
|
|
517
517
|
child_lock: () => new Lock().withState('child_lock', 'LOCK', 'UNLOCK', 'Enables/disables physical input on the device', access.STATE_SET),
|
|
518
518
|
co2: () => new Numeric('co2', access.STATE).withUnit('ppm').withDescription('The measured CO2 (carbon dioxide) value'),
|
|
519
|
-
comfort_temperature: () => new Numeric('comfort_temperature', access.STATE_SET).withUnit('°C').withDescription('Comfort temperature').withValueMin(
|
|
519
|
+
comfort_temperature: () => new Numeric('comfort_temperature', access.STATE_SET).withUnit('°C').withDescription('Comfort temperature').withValueMin(0).withValueMax(30),
|
|
520
520
|
consumer_connected: () => new Binary('consumer_connected', access.STATE, true, false).withDescription('Indicates whether a plug is physically attached. Device does not have to pull power or even be connected electrically (state of this binary switch can be ON even if main power switch is OFF)'),
|
|
521
521
|
contact: () => new Binary('contact', access.STATE, false, true).withDescription('Indicates if the contact is closed (= true) or open (= false)'),
|
|
522
522
|
cover_position: () => new Cover().withPosition(),
|
|
@@ -531,7 +531,7 @@ module.exports = {
|
|
|
531
531
|
device_temperature: () => new Numeric('device_temperature', access.STATE).withUnit('°C').withDescription('Temperature of the device'),
|
|
532
532
|
eco2: () => new Numeric('eco2', access.STATE).withUnit('ppm').withDescription('Measured eCO2 value'),
|
|
533
533
|
eco_mode: () => new Binary('eco_mode', access.STATE_SET, 'ON', 'OFF').withDescription('ECO mode (energy saving mode)'),
|
|
534
|
-
eco_temperature: () => new Numeric('eco_temperature', access.STATE_SET).withUnit('°C').withDescription('Eco temperature').withValueMin(
|
|
534
|
+
eco_temperature: () => new Numeric('eco_temperature', access.STATE_SET).withUnit('°C').withDescription('Eco temperature').withValueMin(0).withValueMax(35),
|
|
535
535
|
effect: () => new Enum('effect', access.SET, ['blink', 'breathe', 'okay', 'channel_change', 'finish_effect', 'stop_effect']).withDescription('Triggers an effect on the light (e.g. make light blink for a few seconds)'),
|
|
536
536
|
energy: () => new Numeric('energy', access.STATE).withUnit('kWh').withDescription('Sum of consumed energy'),
|
|
537
537
|
fan: () => new Fan(),
|
|
@@ -539,7 +539,7 @@ module.exports = {
|
|
|
539
539
|
formaldehyd: () => new Numeric('formaldehyd', access.STATE).withDescription('The measured formaldehyd value'),
|
|
540
540
|
gas: () => new Binary('gas', access.STATE, true, false).withDescription('Indicates whether the device detected gas'),
|
|
541
541
|
hcho: () => new Numeric('hcho', access.STATE).withUnit('mg/m³').withDescription('Measured Hcho value'),
|
|
542
|
-
holiday_temperature: () => new Numeric('holiday_temperature', access.STATE_SET).withUnit('°C').withDescription('Holiday temperature').withValueMin(
|
|
542
|
+
holiday_temperature: () => new Numeric('holiday_temperature', access.STATE_SET).withUnit('°C').withDescription('Holiday temperature').withValueMin(0).withValueMax(30),
|
|
543
543
|
humidity: () => new Numeric('humidity', access.STATE).withUnit('%').withDescription('Measured relative humidity'),
|
|
544
544
|
illuminance: () => new Numeric('illuminance', access.STATE).withDescription('Raw measured illuminance'),
|
|
545
545
|
illuminance_lux: () => new Numeric('illuminance_lux', access.STATE).withUnit('lx').withDescription('Measured illuminance in lux'),
|
|
@@ -557,15 +557,15 @@ module.exports = {
|
|
|
557
557
|
linkquality: () => new Numeric('linkquality', access.STATE).withUnit('lqi').withDescription('Link quality (signal strength)').withValueMin(0).withValueMax(255),
|
|
558
558
|
local_temperature: () => new Numeric('local_temperature', access.STATE_GET).withUnit('°C').withDescription('Current temperature measured on the device'),
|
|
559
559
|
lock: () => new Lock().withState('state', 'LOCK', 'UNLOCK', 'State of the lock').withLockState('lock_state', 'Actual state of the lock'),
|
|
560
|
-
max_temperature: () => new Numeric('max_temperature', access.STATE_SET).withUnit('°C').withDescription('Maximum temperature').withValueMin(
|
|
561
|
-
max_temperature_limit: () => new Numeric('max_temperature_limit', access.STATE_SET).withUnit('°C').withDescription('Maximum temperature limit').withValueMin(
|
|
562
|
-
min_temperature: () => new Numeric('min_temperature', access.STATE_SET).withUnit('°C').withDescription('Minimum temperature').withValueMin(
|
|
560
|
+
max_temperature: () => new Numeric('max_temperature', access.STATE_SET).withUnit('°C').withDescription('Maximum temperature').withValueMin(15).withValueMax(35),
|
|
561
|
+
max_temperature_limit: () => new Numeric('max_temperature_limit', access.STATE_SET).withUnit('°C').withDescription('Maximum temperature limit').withValueMin(0).withValueMax(35),
|
|
562
|
+
min_temperature: () => new Numeric('min_temperature', access.STATE_SET).withUnit('°C').withDescription('Minimum temperature').withValueMin(5).withValueMax(15),
|
|
563
563
|
noise: () => new Numeric('noise', access.STATE).withUnit('dBA').withDescription('The measured noise value'),
|
|
564
564
|
noise_detected: () => new Binary('noise_detected', access.STATE, true, false).withDescription('Indicates whether the device detected noise'),
|
|
565
565
|
occupancy: () => new Binary('occupancy', access.STATE, true, false).withDescription('Indicates whether the device detected occupancy'),
|
|
566
566
|
occupancy_level: () => new Numeric('occupancy_level', access.STATE).withDescription('The measured occupancy value'),
|
|
567
567
|
open_window: () => new Binary('open_window', access.STATE_SET, 'ON', 'OFF').withDescription('Enables/disables the status on the device'),
|
|
568
|
-
open_window_temperature: () => new Numeric('open_window_temperature', access.STATE_SET).withUnit('°C').withDescription('Open window temperature').withValueMin(
|
|
568
|
+
open_window_temperature: () => new Numeric('open_window_temperature', access.STATE_SET).withUnit('°C').withDescription('Open window temperature').withValueMin(0).withValueMax(35),
|
|
569
569
|
pm10: () => new Numeric('pm10', access.STATE).withUnit('µg/m³').withDescription('Measured PM10 (particulate matter) concentration'),
|
|
570
570
|
pm25: () => new Numeric('pm25', access.STATE).withUnit('µg/m³').withDescription('Measured PM2.5 (particulate matter) concentration'),
|
|
571
571
|
position: () => new Numeric('position', access.STATE).withUnit('%').withDescription('Position'),
|
|
@@ -574,6 +574,7 @@ module.exports = {
|
|
|
574
574
|
power_outage_memory: () => new Binary('power_outage_memory', access.ALL, true, false).withDescription('Enable/disable the power outage memory, this recovers the on/off mode after power failure'),
|
|
575
575
|
presence: () => new Binary('presence', access.STATE, true, false).withDescription('Indicates whether the device detected presence'),
|
|
576
576
|
pressure: () => new Numeric('pressure', access.STATE).withUnit('hPa').withDescription('The measured atmospheric pressure'),
|
|
577
|
+
programming_operation_mode: () => new Enum('programming_operation_mode', access.ALL, ['setpoint', 'schedule']).withDescription('Controls how programming affects the thermostat. Possible values: setpoint (only use specified setpoint), schedule (follow programmed setpoint schedule). Changing this value does not clear programmed schedules.'),
|
|
577
578
|
smoke: () => new Binary('smoke', access.STATE, true, false).withDescription('Indicates whether the device detected smoke'),
|
|
578
579
|
soil_moisture: () => new Numeric('soil_moisture', access.STATE).withUnit('%').withDescription('Measured soil moisture value'),
|
|
579
580
|
sos: () => new Binary('sos', access.STATE, true, false).withDescription('SOS alarm'),
|