zigbee-herdsman-converters 14.0.611 → 14.0.614

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.
@@ -8022,7 +8022,7 @@ const converters = {
8022
8022
  const value = tuya.getDataValue(dpValue);
8023
8023
  switch (dpValue.dp) {
8024
8024
  case tuya.dataPoints.state:
8025
- result.contact = Boolean(value);
8025
+ result.contact = !value;
8026
8026
  break;
8027
8027
  case tuya.dataPoints.thitBatteryPercentage:
8028
8028
  result.battery = value;
@@ -1226,6 +1226,7 @@ const converters = {
1226
1226
  Object.values(constants.thermostatProgrammingOperationModes).join(', '));
1227
1227
  }
1228
1228
  await entity.write('hvacThermostat', {programingOperMode: val});
1229
+ return {state: {programming_operation_mode: value}};
1229
1230
  },
1230
1231
  convertGet: async (entity, key, meta) => {
1231
1232
  await entity.read('hvacThermostat', ['programingOperMode']);
@@ -1341,6 +1342,7 @@ const converters = {
1341
1342
  }
1342
1343
  const occupiedHeatingSetpoint = result;
1343
1344
  await entity.write('hvacThermostat', {occupiedHeatingSetpoint});
1345
+ return {state: {occupied_heating_setpoint: value}};
1344
1346
  },
1345
1347
  convertGet: async (entity, key, meta) => {
1346
1348
  await entity.read('hvacThermostat', ['occupiedHeatingSetpoint']);
@@ -1375,6 +1377,7 @@ const converters = {
1375
1377
  }
1376
1378
  const occupiedCoolingSetpoint = result;
1377
1379
  await entity.write('hvacThermostat', {occupiedCoolingSetpoint});
1380
+ return {state: {occupied_cooling_setpoint: value}};
1378
1381
  },
1379
1382
  convertGet: async (entity, key, meta) => {
1380
1383
  await entity.read('hvacThermostat', ['occupiedCoolingSetpoint']);
@@ -1510,6 +1513,12 @@ const converters = {
1510
1513
  await entity.read('msTemperatureMeasurement', ['measuredValue']);
1511
1514
  },
1512
1515
  },
1516
+ illuminance: {
1517
+ key: ['illuminance', 'illuminance_lux'],
1518
+ convertGet: async (entity, key, meta) => {
1519
+ await entity.read('msIlluminanceMeasurement', ['measuredValue']);
1520
+ },
1521
+ },
1513
1522
  // #endregion
1514
1523
 
1515
1524
  // #region Non-generic converters
@@ -0,0 +1,13 @@
1
+ const fz = require('../converters/fromZigbee');
2
+
3
+ module.exports = [
4
+ {
5
+ zigbeeModel: ['WG001-Z01'],
6
+ model: 'WG001',
7
+ vendor: 'Aeotec',
8
+ description: 'Range extender Zi',
9
+ fromZigbee: [fz.linkquality_from_basic],
10
+ toZigbee: [],
11
+ exposes: [],
12
+ },
13
+ ];
@@ -0,0 +1,110 @@
1
+ const fz = require('../converters/fromZigbee');
2
+ const tz = require('../converters/toZigbee');
3
+ const exposes = require('../lib/exposes');
4
+ const reporting = require('../lib/reporting');
5
+ const utils = require('../lib/utils');
6
+ const assert = require('assert');
7
+ const e = exposes.presets;
8
+ const ea = exposes.access;
9
+
10
+
11
+ const thermostatPositions = {
12
+ 'quarter_open': 1,
13
+ 'half_open': 2,
14
+ 'three_quarters_open': 3,
15
+ 'fully_open': 4,
16
+ };
17
+
18
+ const tzLocal = {
19
+ quiet_fan: {
20
+ key: ['quiet_fan'],
21
+ convertSet: async (entity, key, value, meta) => {
22
+ assert(typeof value === 'boolean');
23
+ await entity.write('hvacFanCtrl', {0x1000: {value: value ? 1 : 0, type: 0x10}}, {manufacturerCode: 0x125b});
24
+ return {state: {quiet_fan: value}};
25
+ },
26
+ },
27
+ ac_louver_position: {
28
+ key: ['ac_louver_position'],
29
+ convertSet: async (entity, key, value, meta) => {
30
+ value = value.toLowerCase();
31
+ utils.validateValue(value, Object.keys(thermostatPositions));
32
+ const index = thermostatPositions[value];
33
+ await entity.write('hvacThermostat', {0x4273: {value: index, type: 0x30}}, {manufacturerCode: 0x125b});
34
+ return {state: {ac_louver_position: value}};
35
+ },
36
+ },
37
+ preset: {
38
+ key: ['preset'],
39
+ convertSet: async (entity, key, value, meta) => {
40
+ value = value.toLowerCase();
41
+ utils.validateValue(value, ['activity', 'boost', 'eco', 'none']);
42
+ const activity = value === 'activity' ? 1 : 0;
43
+ const boost = value === 'boost' ? 1 : 0;
44
+ const eco = value === 'eco' ? 4 : 0;
45
+
46
+ await entity.write('hvacThermostat', {0x4275: {value: activity, type: 0x30}}, {manufacturerCode: 0x125b});
47
+ await entity.write('hvacThermostat', {'programingOperMode': eco});
48
+ await entity.write('hvacThermostat', {0x4270: {value: boost, type: 0x10}}, {manufacturerCode: 0x125b});
49
+
50
+ return {state: {preset: value}};
51
+ },
52
+ },
53
+ swingMode: {
54
+ key: ['swing_mode'],
55
+ convertSet: async (entity, key, value, meta) => {
56
+ value = value.toLowerCase();
57
+ utils.validateValue(value, ['on', 'off']);
58
+ await entity.write('hvacThermostat', {0x4274: {value: value === 'on' ? 1 : 0, type: 0x10}}, {manufacturerCode: 0x125b});
59
+ return {state: {swing_mode: value}};
60
+ },
61
+ },
62
+ };
63
+
64
+ module.exports = [{
65
+ zigbeeModel: ['Adapter Zigbee FUJITSU'],
66
+ model: 'GW003-AS-IN-TE-FC',
67
+ vendor: 'Atlantic Group',
68
+ description: 'Interface Naviclim for Takao air conditioners',
69
+ fromZigbee: [
70
+ fz.thermostat,
71
+ fz.fan,
72
+ ],
73
+ toZigbee: [
74
+ tzLocal.ac_louver_position,
75
+ tzLocal.preset,
76
+ tzLocal.quiet_fan,
77
+ tzLocal.swingMode,
78
+ tz.fan_mode,
79
+ tz.thermostat_local_temperature,
80
+ tz.thermostat_occupied_cooling_setpoint,
81
+ tz.thermostat_occupied_heating_setpoint,
82
+ tz.thermostat_programming_operation_mode,
83
+ tz.thermostat_system_mode,
84
+ ],
85
+ exposes: [
86
+ e.programming_operation_mode(),
87
+ exposes.climate()
88
+ .withLocalTemperature()
89
+ .withSetpoint('occupied_cooling_setpoint', 18, 30, 0.5)
90
+ .withSetpoint('occupied_heating_setpoint', 16, 30, 0.5)
91
+ .withSystemMode(['off', 'heat', 'cool', 'auto', 'dry', 'fan_only'])
92
+ .withPreset(['activity', 'boost', 'eco'])
93
+ .withFanMode(['low', 'medium', 'high', 'auto'])
94
+ .withSwingMode(['on', 'off'], ea.STATE_SET),
95
+ exposes.binary('quiet_fan', ea.STATE_SET, true, false).withDescription('Fan quiet mode'),
96
+ exposes.enum('ac_louver_position', ea.STATE_SET, Object.keys(thermostatPositions))
97
+ .withDescription('Ac louver position of this device'),
98
+ ],
99
+ configure: async (device, coordinatorEndpoint, logger) => {
100
+ const endpoint1 = device.getEndpoint(1);
101
+ const binds1 = ['hvacFanCtrl', 'genIdentify', 'hvacFanCtrl', 'hvacThermostat', 'manuSpecificPhilips2'];
102
+ await reporting.bind(endpoint1, coordinatorEndpoint, binds1);
103
+ await reporting.thermostatTemperature(endpoint1);
104
+ await reporting.thermostatOccupiedCoolingSetpoint(endpoint1);
105
+ await reporting.thermostatSystemMode(endpoint1);
106
+
107
+ const endpoint232 = device.getEndpoint(232);
108
+ await reporting.bind(endpoint232, coordinatorEndpoint, ['haDiagnostic']);
109
+ },
110
+ }];
@@ -109,7 +109,7 @@ module.exports = [
109
109
  extend: extend.light_onoff_brightness({disableEffect: true}),
110
110
  },
111
111
  {
112
- zigbeeModel: ['RGBGU10Bulb50AU'],
112
+ zigbeeModel: ['RGBGU10Bulb50AU', 'RGBGU10Bulb50AU2'],
113
113
  model: 'AU-A1GUZBRGBW',
114
114
  vendor: 'Aurora Lighting',
115
115
  description: 'AOne 5.6w smart RGBW tuneable GU10 lamp',
@@ -772,9 +772,39 @@ module.exports = [
772
772
  exposes.binary('factory_reset_co2', ea.STATE_SET, 'ON', 'OFF').withDescription('Factory Reset CO2 sensor'),
773
773
  exposes.binary('enable_gas', ea.STATE_SET, 'ON', 'OFF').withDescription('Enable CO2 Gas Control'),
774
774
  exposes.numeric('high_gas', ea.STATE_SET).withUnit('ppm').withDescription('Setting High CO2 Gas Border')
775
- .withValueMin(0).withValueMax(99),
775
+ .withValueMin(400).withValueMax(2000),
776
776
  exposes.numeric('low_gas', ea.STATE_SET).withUnit('ppm').withDescription('Setting Low CO2 Gas Border')
777
+ .withValueMin(400).withValueMax(2000),
778
+ exposes.binary('enable_temperature', ea.STATE_SET, 'ON', 'OFF').withDescription('Enable Temperature Control'),
779
+ exposes.numeric('high_temperature', ea.STATE_SET).withUnit('C').withDescription('Setting High Temperature Border')
780
+ .withValueMin(-5).withValueMax(50),
781
+ exposes.numeric('low_temperature', ea.STATE_SET).withUnit('C').withDescription('Setting Low Temperature Border')
782
+ .withValueMin(-5).withValueMax(50),
783
+ exposes.binary('enable_humidity', ea.STATE_SET, 'ON', 'OFF').withDescription('Enable Humidity Control'),
784
+ exposes.numeric('high_humidity', ea.STATE_SET).withUnit('C').withDescription('Setting High Humidity Border')
777
785
  .withValueMin(0).withValueMax(99),
786
+ exposes.numeric('low_humidity', ea.STATE_SET).withUnit('C').withDescription('Setting Low Humidity Border')
787
+ .withValueMin(0).withValueMax(99)],
788
+ },
789
+ {
790
+ zigbeeModel: ['SNZB-02_EFEKTA'],
791
+ model: 'SNZB-02_EFEKTA',
792
+ vendor: 'Custom devices (DiY)',
793
+ description: 'Alternative firmware for the SONOFF SNZB-02 sensor from EfektaLab, DIY',
794
+ fromZigbee: [fz.temperature, fz.humidity, fz.battery, fzLocal.termostat_config, fzLocal.hydrostat_config, fzLocal.node_config],
795
+ toZigbee: [tz.factory_reset, tzLocal.termostat_config, tzLocal.hydrostat_config, tzLocal.node_config],
796
+ configure: async (device, coordinatorEndpoint, logger) => {
797
+ const endpoint = device.getEndpoint(1);
798
+ await reporting.bind(endpoint, coordinatorEndpoint, [
799
+ 'genPowerCfg', 'msTemperatureMeasurement', 'msRelativeHumidity']);
800
+ const overides = {min: 0, max: 21600, change: 0};
801
+ await reporting.batteryVoltage(endpoint, overides);
802
+ await reporting.batteryPercentageRemaining(endpoint, overides);
803
+ },
804
+ exposes: [e.battery(), e.temperature(), e.humidity(),
805
+ exposes.numeric('report_delay', ea.STATE_SET).withUnit('Minutes')
806
+ .withDescription('Adjust Report Delay. Setting the time in minutes, by default 5 minutes')
807
+ .withValueMin(1).withValueMax(60),
778
808
  exposes.binary('enable_temperature', ea.STATE_SET, 'ON', 'OFF').withDescription('Enable Temperature Control'),
779
809
  exposes.numeric('high_temperature', ea.STATE_SET).withUnit('C').withDescription('Setting High Temperature Border')
780
810
  .withValueMin(-5).withValueMax(50),
@@ -144,7 +144,7 @@ module.exports = [
144
144
  model: 'EMIZB-132',
145
145
  vendor: 'Develco',
146
146
  description: 'Wattle AMS HAN power-meter sensor',
147
- fromZigbee: [fz.metering, fz.electrical_measurement, fz.develco_fw],
147
+ fromZigbee: [fzLocal.SPLZB134_metering, fzLocal.SPLZB134_electrical_measurement, fz.develco_fw],
148
148
  toZigbee: [tz.EMIZB_132_mode],
149
149
  ota: ota.zigbeeOTA,
150
150
  configure: async (device, coordinatorEndpoint, logger) => {
package/devices/ikea.js CHANGED
@@ -356,10 +356,10 @@ module.exports = [
356
356
  extend: tradfriExtend.light_onoff_brightness_colortemp(),
357
357
  },
358
358
  {
359
- zigbeeModel: ['TRADFRIbulbT120E26WSopal450lm'],
359
+ zigbeeModel: ['TRADFRIbulbT120E26WSopal450lm', 'TRADFRIbulbT120E26WSopal470lm'],
360
360
  model: 'LED1937T5_E26',
361
361
  vendor: 'IKEA',
362
- description: 'LED bulb E26 450 lumen, wireless dimmable white spectrum/tube-shaped white frosted glass',
362
+ description: 'LED bulb E26 450/470 lumen, wireless dimmable white spectrum/tube-shaped white frosted glass',
363
363
  extend: tradfriExtend.light_onoff_brightness_colortemp(),
364
364
  },
365
365
  {
@@ -397,6 +397,13 @@ module.exports = [
397
397
  description: 'TRADFRI bulb E12/E14/E17 WS 450/470/440 lumen, dimmable, white spectrum, opal white',
398
398
  extend: tradfriExtend.light_onoff_brightness_colortemp(),
399
399
  },
400
+ {
401
+ zigbeeModel: ['TRADFRI bulb E14 WS globe 470lm'],
402
+ model: 'LED2101G4',
403
+ vendor: 'IKEA',
404
+ description: 'TRADFRI bulb E14 WS globe 470lm, dimmable, white spectrum, opal white',
405
+ extend: tradfriExtend.light_onoff_brightness_colortemp(),
406
+ },
400
407
  {
401
408
  zigbeeModel: ['TRADFRI bulb GU10 WW 400lm'],
402
409
  model: 'LED1837R5',
@@ -450,7 +457,7 @@ module.exports = [
450
457
  meta: {supportsHueAndSaturation: false},
451
458
  },
452
459
  {
453
- zigbeeModel: ['TRADFRI bulb E26 CWS 800lm', 'TRADFRI bulb E27 CWS 806lm'],
460
+ zigbeeModel: ['TRADFRI bulb E26 CWS 800lm', 'TRADFRI bulb E27 CWS 806lm', 'TRADFRI bulb E26 CWS 806lm'],
454
461
  model: 'LED1924G9',
455
462
  vendor: 'IKEA',
456
463
  description: 'TRADFRI bulb E26/E27 CWS 800/806 lumen, dimmable, color, opal white',
@@ -932,4 +939,11 @@ module.exports = [
932
939
  description: 'NYMÅNE Pendant lamp',
933
940
  extend: tradfriExtend.light_onoff_brightness_colortemp(),
934
941
  },
942
+ {
943
+ zigbeeModel: ['STOFTMOLN ceiling/wall lamp WW37'],
944
+ model: 'T2037',
945
+ vendor: 'IKEA',
946
+ description: 'STOFTMOLN ceiling/wall lamp 37 warm light dimmable',
947
+ extend: tradfriExtend.light_onoff_brightness(),
948
+ },
935
949
  ];
package/devices/kmpcil.js CHANGED
@@ -6,6 +6,7 @@ const reporting = require('../lib/reporting');
6
6
  const globalStore = require('../lib/store');
7
7
  const utils = require('../lib/utils');
8
8
  const e = exposes.presets;
9
+ const ea = exposes.access;
9
10
 
10
11
  const kmpcilOptions={
11
12
  presence_timeout_dc: () => {
@@ -74,11 +75,11 @@ module.exports = [
74
75
  model: 'KMPCIL_RES005',
75
76
  vendor: 'KMPCIL',
76
77
  description: 'Environment sensor',
77
- exposes: [e.battery(), e.temperature(), e.humidity(), e.pressure(), e.illuminance(), e.illuminance_lux(), e.occupancy(),
78
- e.switch()],
78
+ exposes: [e.battery(), e.temperature(), e.humidity(), e.pressure(), e.illuminance().withAccess(ea.STATE_GET),
79
+ e.illuminance_lux().withAccess(ea.STATE_GET), e.occupancy(), e.switch()],
79
80
  fromZigbee: [fz.battery, fz.temperature, fz.humidity, fz.pressure, fz.illuminance, fz.kmpcil_res005_occupancy,
80
81
  fz.kmpcil_res005_on_off],
81
- toZigbee: [tz.kmpcil_res005_on_off],
82
+ toZigbee: [tz.kmpcil_res005_on_off, tz.illuminance],
82
83
  configure: async (device, coordinatorEndpoint, logger) => {
83
84
  const endpoint = device.getEndpoint(8);
84
85
  const binds = ['genPowerCfg', 'msTemperatureMeasurement', 'msRelativeHumidity', 'msPressureMeasurement',
@@ -168,11 +168,37 @@ module.exports = [
168
168
  ota: ota.ledvance,
169
169
  },
170
170
  {
171
- zigbeeModel: ['CLA 60 DIM'],
171
+ zigbeeModel: ['A60 DIM T'],
172
172
  model: '4058075728981',
173
173
  vendor: 'LEDVANCE',
174
174
  description: 'SMART+ Classic A E27 dimmable white',
175
175
  extend: extend.ledvance.light_onoff_brightness(),
176
176
  ota: ota.ledvance,
177
177
  },
178
+ {
179
+ zigbeeModel: ['B40 DIM T'],
180
+ model: '4058075729063',
181
+ vendor: 'LEDVANCE',
182
+ description: 'SMART+ Classic B40 E14 dimmable white',
183
+ extend: extend.ledvance.light_onoff_brightness(),
184
+ ota: ota.ledvance,
185
+ },
186
+ {
187
+ zigbeeModel: ['PAR16 DIM T'],
188
+ model: '4058075729148',
189
+ vendor: 'LEDVANCE',
190
+ description: 'SMART+ Spot PAR16 50 GU10 dimmable white',
191
+ extend: extend.ledvance.light_onoff_brightness(),
192
+ ota: ota.ledvance,
193
+ },
194
+ {
195
+ zigbeeModel: ['P40 DIM T'],
196
+ model: '4058075729100',
197
+ vendor: 'LEDVANCE',
198
+ description: 'SMART+ Classic P40 E14 dimmable white',
199
+ extend: extend.ledvance.light_onoff_brightness(),
200
+ ota: ota.ledvance,
201
+ },
202
+
203
+
178
204
  ];
@@ -174,9 +174,10 @@ module.exports = [
174
174
  vendor: 'Legrand',
175
175
  description: 'Wired switch without neutral',
176
176
  extend: extend.light_onoff_brightness({noConfigure: true}),
177
- fromZigbee: [fz.brightness, fz.identify, fz.on_off, fz.lighting_ballast_configuration, fz.legrand_cluster_fc01],
177
+ fromZigbee: [fz.brightness, fz.identify, fz.on_off, fz.lighting_ballast_configuration, fz.legrand_cluster_fc01,
178
+ fz.power_on_behavior],
178
179
  toZigbee: [tz.light_onoff_brightness, tz.legrand_settingEnableLedInDark, tz.legrand_settingEnableLedIfOn,
179
- tz.legrand_deviceMode, tz.legrand_identify, tz.ballast_config],
180
+ tz.legrand_deviceMode, tz.legrand_identify, tz.ballast_config, tz.power_on_behavior],
180
181
  exposes: [e.light_brightness(),
181
182
  exposes.numeric('ballast_minimum_level', ea.ALL).withValueMin(1).withValueMax(254)
182
183
  .withDescription('Specifies the minimum brightness value'),
@@ -185,7 +186,8 @@ module.exports = [
185
186
  exposes.binary('device_mode', ea.ALL, 'dimmer_on', 'dimmer_off').withDescription('Allow the device to change brightness'),
186
187
  exposes.binary('led_in_dark', ea.ALL, 'ON', 'OFF').withDescription(`Enables the LED when the light is turned off, allowing to
187
188
  see the switch in the dark`),
188
- exposes.binary('led_if_on', ea.ALL, 'ON', 'OFF').withDescription('Enables the LED when the light is turned on')],
189
+ exposes.binary('led_if_on', ea.ALL, 'ON', 'OFF').withDescription('Enables the LED when the light is turned on'),
190
+ e.power_on_behavior()],
189
191
  configure: async (device, coordinatorEndpoint, logger) => {
190
192
  await extend.light_onoff_brightness().configure(device, coordinatorEndpoint, logger);
191
193
  const endpoint = device.getEndpoint(1);
@@ -201,10 +203,14 @@ module.exports = [
201
203
  vendor: 'Legrand',
202
204
  ota: ota.zigbeeOTA,
203
205
  description: 'Power socket with power consumption monitoring',
204
- fromZigbee: [fz.identify, fz.on_off, fz.electrical_measurement],
205
- toZigbee: [tz.on_off, tz.legrand_settingEnableLedInDark, tz.legrand_identify, tz.legrand_settingEnableLedIfOn],
206
+ fromZigbee: [fz.identify, fz.on_off, fz.electrical_measurement, fz.power_on_behavior],
207
+ toZigbee: [tz.on_off, tz.legrand_settingEnableLedInDark, tz.legrand_identify, tz.legrand_settingEnableLedIfOn,
208
+ tz.power_on_behavior],
206
209
  exposes: [e.switch(), e.action(['identify']), e.power(),
207
- exposes.binary('led_if_on', ea.ALL, 'ON', 'OFF').withDescription('Enables the LED when the device is turned on')],
210
+ exposes.binary('led_in_dark', ea.ALL, 'ON', 'OFF').withDescription(`Enables the LED when the power socket is turned off,
211
+ allowing to see it in the dark`),
212
+ exposes.binary('led_if_on', ea.ALL, 'ON', 'OFF').withDescription('Enables the LED when the device is turned on'),
213
+ e.power_on_behavior()],
208
214
  configure: async (device, coordinatorEndpoint, logger) => {
209
215
  const endpoint = device.getEndpoint(1);
210
216
  await reporting.bind(endpoint, coordinatorEndpoint, ['genIdentify', 'genOnOff', 'haElectricalMeasurement']);
@@ -326,12 +332,14 @@ module.exports = [
326
332
  model: '064882',
327
333
  vendor: 'Legrand',
328
334
  description: 'Cable outlet with pilot wire and consumption measurement',
329
- fromZigbee: [fz.legrand_cluster_fc01, fz.legrand_cable_outlet_mode, fz.on_off, fz.electrical_measurement],
330
- toZigbee: [tz.legrand_deviceMode, tz.legrand_cableOutletMode, tz.on_off, tz.electrical_measurement_power],
335
+ fromZigbee: [fz.legrand_cluster_fc01, fz.legrand_cable_outlet_mode, fz.on_off, fz.electrical_measurement, fz.power_on_behavior],
336
+ toZigbee: [tz.legrand_deviceMode, tz.legrand_cableOutletMode, tz.on_off, tz.electrical_measurement_power, tz.power_on_behavior],
331
337
  exposes: [exposes.binary('device_mode', ea.ALL, 'pilot_on', 'pilot_off'),
332
338
  exposes.enum('cable_outlet_mode', ea.ALL, ['comfort', 'comfort-1', 'comfort-2', 'eco', 'frost_protection', 'off']),
333
339
  exposes.switch().withState('state', true, 'Works only when the pilot wire is deactivated'),
334
- e.power().withAccess(ea.STATE_GET)],
340
+ e.power().withAccess(ea.STATE_GET),
341
+ e.power_on_behavior().withDescription(`Controls the behavior when the device is powered on. Works only when the pilot wire is
342
+ deactivated`)],
335
343
  configure: async (device, coordinatorEndpoint, logger) => {
336
344
  const endpoint = device.getEndpoint(1);
337
345
  await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff', 'haElectricalMeasurement', 'manuSpecificLegrandDevices2']);
package/devices/lellki.js CHANGED
@@ -137,6 +137,7 @@ module.exports = [
137
137
  toZigbee: [tz.on_off, tz.tuya_switch_power_outage_memory],
138
138
  configure: async (device, coordinatorEndpoint, logger) => {
139
139
  const endpoint = device.getEndpoint(1);
140
+ await endpoint.read('genBasic', ['manufacturerName', 'zclVersion', 'appVersion', 'modelId', 'powerSource', 0xfffe]);
140
141
  await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff']);
141
142
  await reporting.bind(device.getEndpoint(2), coordinatorEndpoint, ['genOnOff']);
142
143
  await reporting.bind(device.getEndpoint(3), coordinatorEndpoint, ['genOnOff']);
@@ -134,7 +134,7 @@ module.exports = [
134
134
  },
135
135
  },
136
136
  {
137
- fingerprint: [{modelID: 'TS110F', manufacturerName: '_TZ3000_ktuoyvt5'}],
137
+ fingerprint: [{modelID: 'TS110F', manufacturerName: '_TZ3000_ktuoyvt5'}, {modelID: 'TS110E', manufacturerName: '_TZ3210_weaqkhab'}],
138
138
  model: 'QS-Zigbee-D02-TRIAC-L',
139
139
  vendor: 'Lonsonho',
140
140
  description: '1 gang smart dimmer switch module without neutral',
package/devices/moes.js CHANGED
@@ -455,4 +455,24 @@ module.exports = [
455
455
  await reporting.batteryVoltage(endpoint);
456
456
  },
457
457
  },
458
+ {
459
+ fingerprint: [{modelID: 'TS0011', manufacturerName: '_TZ3000_hhiodade'}],
460
+ model: 'ZS-EUB_1gang',
461
+ vendor: 'Moes',
462
+ description: 'Wall light switch (1 gang)',
463
+ toZigbee: extend.switch().toZigbee.concat([tz.moes_power_on_behavior, tz.tuya_switch_type, tz.tuya_backlight_mode]),
464
+ fromZigbee: extend.switch().fromZigbee.concat([fz.moes_power_on_behavior, fz.tuya_switch_type, fz.tuya_backlight_mode]),
465
+ exposes: [
466
+ e.switch(),
467
+ exposes.presets.power_on_behavior(),
468
+ exposes.presets.switch_type_2(),
469
+ exposes.enum('backlight_mode', ea.ALL, ['LOW', 'MEDIUM', 'HIGH'])
470
+ .withDescription('Indicator light status: LOW: Off | MEDIUM: On| HIGH: Inverted'),
471
+ ],
472
+ configure: async (device, coordinatorEndpoint, logger) => {
473
+ await reporting.bind(device.getEndpoint(1), coordinatorEndpoint, ['genOnOff']);
474
+ device.powerSource = 'Mains (single phase)';
475
+ device.save();
476
+ },
477
+ },
458
478
  ];
@@ -0,0 +1,17 @@
1
+ const exposes = require('../lib/exposes');
2
+ const fz = require('../converters/fromZigbee');
3
+ const tz = require('../converters/toZigbee');
4
+ const e = exposes.presets;
5
+ const ea = exposes.access;
6
+
7
+ module.exports = [
8
+ {
9
+ fingerprint: [{modelID: 'TS0601', manufacturerName: '_TZE200_swhwv3k3'}],
10
+ model: 'C10-3E-1.2',
11
+ vendor: 'Novo',
12
+ description: 'Curtain switch',
13
+ fromZigbee: [fz.tuya_cover, fz.ignore_basic_report],
14
+ toZigbee: [tz.tuya_cover_control, tz.tuya_cover_options],
15
+ exposes: [e.cover_position().setAccess('position', ea.STATE_SET)],
16
+ },
17
+ ];
@@ -329,6 +329,13 @@ module.exports = [
329
329
  description: 'Hue White ambiance Pillar spotlight',
330
330
  extend: hueExtend.light_onoff_brightness_colortemp({colorTempRange: [153, 454]}),
331
331
  },
332
+ {
333
+ zigbeeModel: ['929003046001'],
334
+ model: '5309031P8',
335
+ vendor: 'Philips',
336
+ description: 'Hue White ambiance Runner spot white (1 spot)',
337
+ extend: hueExtend.light_onoff_brightness_colortemp({colorTempRange: [153, 454]}),
338
+ },
332
339
  {
333
340
  zigbeeModel: ['929002376301'],
334
341
  model: '929002376301',
@@ -7,7 +7,7 @@ const ea = exposes.access;
7
7
 
8
8
  module.exports = [
9
9
  {
10
- zigbeeModel: ['ivfvd7h', 'eaxp72v\u0000', 'kfvq6avy\u0000', 'fvq6avy\u0000', 'fvq6avy'],
10
+ zigbeeModel: ['ivfvd7h', 'eaxp72v\u0000', 'kfvq6avy\u0000', 'fvq6avy\u0000', 'fvq6avy', 'zk78ptr\u0000'],
11
11
  fingerprint: [
12
12
  {modelID: 'TS0601', manufacturerName: '_TZE200_zivfvd7h'},
13
13
  {modelId: 'TS0601', manufacturerName: '_TZE200_kfvq6avy'},
@@ -30,7 +30,8 @@ module.exports = [
30
30
  {vendor: 'Revolt', description: 'Thermostatic Radiator Valve Controller', model: 'NX-4911'},
31
31
  {vendor: 'Unitec', description: 'Thermostatic Radiator Valve Controller', model: '30946'},
32
32
  {vendor: 'Tesla', description: 'Thermostatic Radiator Valve Controller', model: 'TSL-TRV-GS361A'},
33
- {vendor: 'Nedis', description: 'Thermostatic Radiator Valve Controller', model: 'ZBHTR10WT'}],
33
+ {vendor: 'Nedis', description: 'Thermostatic Radiator Valve Controller', model: 'ZBHTR10WT'},
34
+ {vendor: 'TCP Smart', description: 'Smart Thermostatic Radiator Valve', model: 'TBUWTRV'}],
34
35
  exposes: [e.child_lock(), e.window_detection(), e.battery(), e.valve_detection(), e.position(), exposes.climate()
35
36
  .withSetpoint('current_heating_setpoint', 5, 30, 0.5, ea.STATE_SET).withLocalTemperature(ea.STATE)
36
37
  .withSystemMode(['off', 'auto', 'heat'], ea.STATE_SET)
@@ -12,7 +12,7 @@ module.exports = [
12
12
  description: 'Roller shade',
13
13
  fromZigbee: [fz.cover_position_tilt, fz.battery],
14
14
  toZigbee: [tz.cover_state, tz.cover_position_tilt],
15
- meta: {battery: {dontDividePercentage: true}},
15
+ meta: {battery: {dontDividePercentage: true}, coverInverted: true},
16
16
  configure: async (device, coordinatorEndpoint, logger) => {
17
17
  const endpoint = device.getEndpoint(1);
18
18
  await reporting.bind(endpoint, coordinatorEndpoint, ['genPowerCfg', 'closuresWindowCovering']);
package/devices/tuya.js CHANGED
@@ -20,7 +20,7 @@ const TS011Fplugs = ['_TZ3000_5f43h46b', '_TZ3000_cphmq0q7', '_TZ3000_dpo1ysak',
20
20
  '_TZ3000_rdtixbnu', '_TZ3000_typdpbpg', '_TZ3000_kx0pris5', '_TZ3000_amdymr7l', '_TZ3000_z1pnpsdo', '_TZ3000_ksw8qtmt',
21
21
  '_TZ3000_1h2x4akh', '_TZ3000_9vo5icau', '_TZ3000_cehuw1lw', '_TZ3000_ko6v90pg', '_TZ3000_f1bapcit', '_TZ3000_cjrngdr3',
22
22
  '_TZ3000_zloso4jk', '_TZ3000_r6buo8ba', '_TZ3000_iksasdbv', '_TZ3000_idrffznf', '_TZ3000_okaz9tjs', '_TZ3210_q7oryllx',
23
- '_TZ3000_ss98ec5d', '_TZ3000_gznh2xla', '_TZ3000_hdopuwv6', '_TZ3000_gvn91tmx'];
23
+ '_TZ3000_ss98ec5d', '_TZ3000_gznh2xla', '_TZ3000_hdopuwv6', '_TZ3000_gvn91tmx', '_TZ3000_dksbtrzs', '_TZ3000_b28wrpvx'];
24
24
 
25
25
  const tzLocal = {
26
26
  hpsz: {
@@ -336,6 +336,16 @@ const fzLocal = {
336
336
  return fz.battery.convert(model, msg, publish, options, meta);
337
337
  },
338
338
  },
339
+ TS0201_humidity: {
340
+ ...fz.humidity,
341
+ convert: (model, msg, publish, options, meta) => {
342
+ const result = fz.humidity.convert(model, msg, publish, options, meta);
343
+ if (meta.device.manufacturerName === '_TZ3000_ywagc4rj') {
344
+ result.humidity = result.humidity * 10;
345
+ }
346
+ return result;
347
+ },
348
+ },
339
349
  TS0222: {
340
350
  cluster: 'manuSpecificTuya',
341
351
  type: ['commandDataResponse', 'commandDataReport'],
@@ -737,7 +747,8 @@ module.exports = [
737
747
  {
738
748
  fingerprint: [{modelID: 'TS011F', manufacturerName: '_TZ3000_mvn6jl7x'},
739
749
  {modelID: 'TS011F', manufacturerName: '_TZ3000_raviyuvk'}, {modelID: 'TS011F', manufacturerName: '_TYZB01_hlla45kx'},
740
- {modelID: 'TS011F', manufacturerName: '_TZ3000_92qd4sqa'}, {modelID: 'TS011F', manufacturerName: '_TZ3000_zwaadvus'}],
750
+ {modelID: 'TS011F', manufacturerName: '_TZ3000_92qd4sqa'}, {modelID: 'TS011F', manufacturerName: '_TZ3000_zwaadvus'},
751
+ {modelID: 'TS011F', manufacturerName: '_TZ3000_k6fvknrr'}],
741
752
  model: 'TS011F_2_gang_wall',
742
753
  vendor: 'TuYa',
743
754
  description: '2 gang wall outlet',
@@ -890,6 +901,7 @@ module.exports = [
890
901
  {modelID: 'TS0501B', manufacturerName: '_TZ3210_wuheofsg'},
891
902
  {modelID: 'TS0501B', manufacturerName: '_TZ3210_e5t9bfdv'},
892
903
  {modelID: 'TS0501B', manufacturerName: '_TZ3210_19qb27da'},
904
+ {modelID: 'TS0501B', manufacturerName: '_TZ3210_aurnbfv4'},
893
905
  {modelID: 'TS0501B', manufacturerName: '_TZ3210_4zinq6io'},
894
906
  {modelID: 'TS0501B', manufacturerName: '_TZ3210_93gnbdgz'}],
895
907
  model: 'TS0501B',
@@ -1106,6 +1118,7 @@ module.exports = [
1106
1118
  description: 'Curtain/blind switch',
1107
1119
  fromZigbee: [fz.cover_position_tilt, fz.tuya_backlight_mode, fz.tuya_cover_options],
1108
1120
  toZigbee: [tz.cover_state, tz.cover_position_tilt, tz.tuya_cover_calibration, tz.tuya_cover_reversal, tz.tuya_backlight_mode],
1121
+ meta: {coverInverted: true},
1109
1122
  whiteLabel: [{vendor: 'LoraTap', model: 'SC400'}],
1110
1123
  exposes: [e.cover_position(), exposes.enum('moving', ea.STATE, ['UP', 'STOP', 'DOWN']),
1111
1124
  exposes.binary('calibration', ea.ALL, 'ON', 'OFF'), exposes.binary('motor_reversal', ea.ALL, 'ON', 'OFF'),
@@ -1323,7 +1336,7 @@ module.exports = [
1323
1336
  vendor: 'TuYa',
1324
1337
  description: 'Temperature & humidity sensor with display',
1325
1338
  whiteLabel: [{vendor: 'BlitzWolf', model: 'BW-IS4'}],
1326
- fromZigbee: [fzLocal.TS0201_battery, fz.temperature, fz.humidity],
1339
+ fromZigbee: [fzLocal.TS0201_battery, fz.temperature, fzLocal.TS0201_humidity],
1327
1340
  toZigbee: [],
1328
1341
  exposes: [e.battery(), e.temperature(), e.humidity(), e.battery_voltage()],
1329
1342
  configure: async (device, coordinatorEndpoint, logger) => {
@@ -2410,6 +2423,8 @@ module.exports = [
2410
2423
  },
2411
2424
  meta: {multiEndpoint: true},
2412
2425
  configure: async (device, coordinatorEndpoint, logger) => {
2426
+ await device.getEndpoint(1).read('genBasic',
2427
+ ['manufacturerName', 'zclVersion', 'appVersion', 'modelId', 'powerSource', 0xfffe]);
2413
2428
  await reporting.bind(device.getEndpoint(1), coordinatorEndpoint, ['genOnOff']);
2414
2429
  await reporting.bind(device.getEndpoint(2), coordinatorEndpoint, ['genOnOff']);
2415
2430
  await reporting.bind(device.getEndpoint(3), coordinatorEndpoint, ['genOnOff']);
package/devices/xiaomi.js CHANGED
@@ -39,6 +39,94 @@ const preventReset = async (type, data, device) => {
39
39
  await device.getEndpoint(1).write('genBasic', payload, options);
40
40
  };
41
41
 
42
+
43
+ const fzLocal = {
44
+ aqara_trv: {
45
+ cluster: 'aqaraOpple',
46
+ type: ['attributeReport', 'readResponse'],
47
+ convert: (model, msg, publish, options, meta) => {
48
+ const result = {};
49
+ Object.entries(msg.data).forEach(([key, value]) => {
50
+ switch (parseInt(key)) {
51
+ case 0x0271:
52
+ result['state'] = {1: 'ON', 0: 'OFF'}[value];
53
+ break;
54
+ case 0x0272:
55
+ result['preset'] = {2: 'away', 1: 'auto', 0: 'manual'}[value];
56
+ break;
57
+ case 0x0273:
58
+ result['window_detection'] = {1: 'ON', 0: 'OFF'}[value];
59
+ break;
60
+ case 0x0274:
61
+ result['valve_detection'] = {1: 'ON', 0: 'OFF'}[value];
62
+ break;
63
+ case 0x0277:
64
+ result['child_lock'] = {1: 'LOCK', 0: 'UNLOCK'}[value];
65
+ break;
66
+ case 0x0279:
67
+ result['away_preset_temperature'] = (value / 100).toFixed(1);
68
+ break;
69
+ case 0x027b:
70
+ result['calibration'] = {1: true, 0: false}[value];
71
+ break;
72
+ case 0x027e:
73
+ result['sensor'] = {1: 'external', 0: 'internal'}[value];
74
+ break;
75
+ case 0x00ff: // 4e:27:49:bb:24:b6:30:dd:74:de:53:76:89:44:c4:81
76
+ case 0x00f7: // 03:28:1f:05:21:01:00:0a:21:00:00:0d:23:19:08:00:00:11:23...
77
+ case 0x0275: // 0x00000001
78
+ case 0x0276: // 04:3e:01:e0:00:00:09:60:04:38:00:00:06:a4:05:64:00:00:08:98:81:e0:00:00:08:98
79
+ case 0x027a: // 0x00
80
+ case 0x027c: // 0x00
81
+ case 0x027d: // 0x00
82
+ case 0x0280: // 0x00/0x01
83
+ case 0x040a: // 0x64
84
+ meta.logger.debug(`zigbee-herdsman-converters:aqara_trv: Unhandled key ${key} = ${value}`);
85
+ break;
86
+ default:
87
+ meta.logger.warn(`zigbee-herdsman-converters:aqara_trv: Unknown key ${key} = ${value}`);
88
+ }
89
+ });
90
+ return result;
91
+ },
92
+ },
93
+ };
94
+
95
+ const tzLocal = {
96
+ aqara_trv: {
97
+ key: ['state', 'preset', 'window_detection', 'valve_detection', 'child_lock', 'away_preset_temperature'],
98
+ convertSet: async (entity, key, value, meta) => {
99
+ switch (key) {
100
+ case 'state':
101
+ await entity.write('aqaraOpple', {0x0271: {value: {'OFF': 0, 'ON': 1}[value], type: 0x20}},
102
+ {manufacturerCode: 0x115f});
103
+ break;
104
+ case 'preset':
105
+ await entity.write('aqaraOpple', {0x0272: {value: {'manual': 0, 'auto': 1, 'away': 2}[value], type: 0x20}},
106
+ {manufacturerCode: 0x115f});
107
+ break;
108
+ case 'window_detection':
109
+ await entity.write('aqaraOpple', {0x0273: {value: {'OFF': 0, 'ON': 1}[value], type: 0x20}},
110
+ {manufacturerCode: 0x115f});
111
+ break;
112
+ case 'valve_detection':
113
+ await entity.write('aqaraOpple', {0x0274: {value: {'OFF': 0, 'ON': 1}[value], type: 0x20}},
114
+ {manufacturerCode: 0x115f});
115
+ break;
116
+ case 'child_lock':
117
+ await entity.write('aqaraOpple', {0x0277: {value: {'UNLOCK': 0, 'LOCK': 1}[value], type: 0x20}},
118
+ {manufacturerCode: 0x115f});
119
+ break;
120
+ case 'away_preset_temperature':
121
+ await entity.write('aqaraOpple', {0x0279: {value: Math.round(value * 100), type: 0x23}}, {manufacturerCode: 0x115f});
122
+ break;
123
+ default: // Unknown key
124
+ meta.logger.warn(`zigbee-herdsman-converters:aqara_trv: Unhandled key ${key}`);
125
+ }
126
+ },
127
+ },
128
+ };
129
+
42
130
  module.exports = [
43
131
  {
44
132
  zigbeeModel: ['lumi.flood.acn001'],
@@ -724,7 +812,7 @@ module.exports = [
724
812
  exposes.enum('operation_mode', ea.ALL, ['control_relay', 'decoupled'])
725
813
  .withDescription('Decoupled mode for right button')
726
814
  .withEndpoint('right'),
727
- e.power().withAccess(ea.STATE), e.power_outage_memory(), e.led_disabled_night(),
815
+ e.power().withAccess(ea.STATE), e.power_outage_memory(), e.led_disabled_night(), e.voltage(),
728
816
  e.device_temperature().withAccess(ea.STATE), e.flip_indicator_light(),
729
817
  e.action([
730
818
  'single_left', 'double_left', 'single_center', 'double_center', 'single_right', 'double_right',
@@ -1685,7 +1773,7 @@ module.exports = [
1685
1773
  whiteLabel: [{vendor: 'Xiaomi', model: 'YTC4043GL'}],
1686
1774
  description: 'MiJia light intensity sensor',
1687
1775
  fromZigbee: [fz.battery, fz.illuminance, fz.aqara_opple],
1688
- toZigbee: [],
1776
+ toZigbee: [tz.illuminance],
1689
1777
  meta: {battery: {voltageToPercentage: '3V_2850_3000'}},
1690
1778
  configure: async (device, coordinatorEndpoint, logger) => {
1691
1779
  const endpoint = device.getEndpoint(1);
@@ -1693,7 +1781,8 @@ module.exports = [
1693
1781
  await reporting.illuminance(endpoint, {min: 15, max: constants.repInterval.HOUR, change: 500});
1694
1782
  await endpoint.read('genPowerCfg', ['batteryVoltage']);
1695
1783
  },
1696
- exposes: [e.battery(), e.battery_voltage(), e.illuminance(), e.illuminance_lux(), e.power_outage_count(false)],
1784
+ exposes: [e.battery(), e.battery_voltage(), e.illuminance().withAccess(ea.STATE_GET),
1785
+ e.illuminance_lux().withAccess(ea.STATE_GET), e.power_outage_count(false)],
1697
1786
  },
1698
1787
  {
1699
1788
  zigbeeModel: ['lumi.light.rgbac1'],
@@ -2164,4 +2253,18 @@ module.exports = [
2164
2253
  await endpoint1.read('aqaraOpple', [0x0125], {manufacturerCode: 0x115f});
2165
2254
  },
2166
2255
  },
2256
+ {
2257
+ zigbeeModel: ['lumi.airrtc.agl001'],
2258
+ model: 'SRTS-A01',
2259
+ vendor: 'Xiaomi',
2260
+ description: 'Aqara Smart Radiator Thermostat E1',
2261
+ fromZigbee: [fzLocal.aqara_trv, fz.thermostat],
2262
+ toZigbee: [tzLocal.aqara_trv, tz.thermostat_occupied_heating_setpoint],
2263
+ exposes: [e.switch().setAccess('state', ea.STATE_SET),
2264
+ exposes.climate().withSetpoint('occupied_heating_setpoint', 5, 30, 0.5)
2265
+ .withLocalTemperature(ea.STATE).withPreset(['manual', 'away', 'auto'], ea.STATE_SET),
2266
+ e.child_lock(), e.window_detection(), e.valve_detection(),
2267
+ e.away_preset_temperature(),
2268
+ ],
2269
+ },
2167
2270
  ];
package/devices/yale.js CHANGED
@@ -47,7 +47,7 @@ module.exports = [
47
47
  model: 'YMF30',
48
48
  vendor: 'Yale',
49
49
  description: 'Digital lock',
50
- extend: lockExtend(),
50
+ extend: lockExtend({battery: {dontDividePercentage: true}}),
51
51
  },
52
52
  {
53
53
  zigbeeModel: ['iZBModule01', '0700000001'],
package/lib/exposes.js CHANGED
@@ -423,6 +423,12 @@ class Climate extends Base {
423
423
  return this;
424
424
  }
425
425
 
426
+ withSwingMode(modes, access=a.ALL) {
427
+ assert(!this.endpoint, 'Cannot add feature after adding endpoint');
428
+ this.features.push(new Enum('swing_mode', access, modes).withDescription('Swing mode'));
429
+ return this;
430
+ }
431
+
426
432
  withSensor(sensors) {
427
433
  assert(!this.endpoint, 'Cannot add feature after adding endpoint');
428
434
  this.features.push(new Enum('sensor', access.STATE_SET, sensors).withDescription('Select temperature sensor to use'));
package/lib/reporting.js CHANGED
@@ -159,7 +159,7 @@ module.exports = {
159
159
  await endpoint.configureReporting('hvacThermostat', p);
160
160
  },
161
161
  thermostatUnoccupiedCoolingSetpoint: async (endpoint, overrides) => {
162
- const p = payload('occupiedCoolingSetpoint', 0, repInterval.HOUR, 10, overrides);
162
+ const p = payload('unoccupiedCoolingSetpoint', 0, repInterval.HOUR, 10, overrides);
163
163
  await endpoint.configureReporting('hvacThermostat', p);
164
164
  },
165
165
  thermostatPIHeatingDemand: async (endpoint, overrides) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zigbee-herdsman-converters",
3
- "version": "14.0.611",
3
+ "version": "14.0.614",
4
4
  "description": "Collection of device converters to be used with zigbee-herdsman",
5
5
  "main": "index.js",
6
6
  "files": [