zigbee-herdsman-converters 15.0.16 → 15.0.17
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/danfoss.js +3 -3
- package/devices/dawon_dns.js +3 -3
- package/devices/heiman.js +2 -2
- package/devices/hilux.js +11 -0
- package/devices/iris.js +1 -1
- package/devices/legrand.js +4 -0
- package/devices/nodon.js +3 -0
- package/devices/philips.js +10 -3
- package/devices/sinope.js +21 -34
- package/devices/tuya.js +27 -3
- package/devices/ubisys.js +6 -4
- package/lib/reporting.js +4 -0
- package/package.json +1 -1
package/devices/danfoss.js
CHANGED
|
@@ -63,12 +63,12 @@ module.exports = [
|
|
|
63
63
|
'from the `local_temperature` measured by the TRV by 5°C to 8°C. In this case you might choose to use an external ' +
|
|
64
64
|
'room sensor and send the measured value of the external room sensor to the `External_measured_room_sensor` property.' +
|
|
65
65
|
'The way the TRV operates on the `External_measured_room_sensor` depends on the setting of the `Radiator_covered` ' +
|
|
66
|
-
'property: If `Radiator_covered` is `
|
|
66
|
+
'property: If `Radiator_covered` is `false` (Auto Offset Mode): You *must* set the `External_measured_room_sensor` ' +
|
|
67
67
|
'property *at least* every 3 hours. After 3 hours the TRV disables this function and resets the value of the ' +
|
|
68
68
|
'`External_measured_room_sensor` property to -8000 (disabled). You *should* set the `External_measured_room_sensor` ' +
|
|
69
69
|
'property *at most* every 30 minutes or every 0.1K change in measured room temperature.' +
|
|
70
|
-
'If `Radiator_covered` is `
|
|
71
|
-
'least every 30 minutes. After 35 minutes the TRV disables this function and resets the value of the ' +
|
|
70
|
+
'If `Radiator_covered` is `true` (Room Sensor Mode): You *must* set the `External_measured_room_sensor` property *at ' +
|
|
71
|
+
'least* every 30 minutes. After 35 minutes the TRV disables this function and resets the value of the ' +
|
|
72
72
|
'`External_measured_room_sensor` property to -8000 (disabled). You *should* set the `External_measured_room_sensor` ' +
|
|
73
73
|
'property *at most* every 5 minutes or every 0.1K change in measured room temperature.')
|
|
74
74
|
.withValueMin(-8000).withValueMax(3500),
|
package/devices/dawon_dns.js
CHANGED
|
@@ -109,7 +109,7 @@ module.exports = [
|
|
|
109
109
|
model: 'PM-S140-ZB',
|
|
110
110
|
vendor: 'Dawon DNS',
|
|
111
111
|
description: 'IOT smart switch 1 gang without neutral wire',
|
|
112
|
-
extend: extend.switch(),
|
|
112
|
+
extend: extend.switch({disablePowerOnBehavior: true}),
|
|
113
113
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
114
114
|
const endpoint = device.getEndpoint(1);
|
|
115
115
|
await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff']);
|
|
@@ -159,7 +159,7 @@ module.exports = [
|
|
|
159
159
|
model: 'PM-S140R-ZB',
|
|
160
160
|
vendor: 'Dawon DNS',
|
|
161
161
|
description: 'IOT smart switch 1 gang router without neutral wire',
|
|
162
|
-
extend: extend.switch(),
|
|
162
|
+
extend: extend.switch({disablePowerOnBehavior: true}),
|
|
163
163
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
164
164
|
const endpoint = device.getEndpoint(1);
|
|
165
165
|
await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff']);
|
|
@@ -209,7 +209,7 @@ module.exports = [
|
|
|
209
209
|
model: 'PM-S150-ZB',
|
|
210
210
|
vendor: 'Dawon DNS',
|
|
211
211
|
description: 'IOT smart switch 1 gang router without neutral wire',
|
|
212
|
-
extend: extend.switch(),
|
|
212
|
+
extend: extend.switch({disablePowerOnBehavior: true}),
|
|
213
213
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
214
214
|
const endpoint = device.getEndpoint(1);
|
|
215
215
|
await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff']);
|
package/devices/heiman.js
CHANGED
|
@@ -122,7 +122,7 @@ module.exports = [
|
|
|
122
122
|
{
|
|
123
123
|
zigbeeModel: ['RH3070'],
|
|
124
124
|
model: 'HS1CG',
|
|
125
|
-
vendor: '
|
|
125
|
+
vendor: 'HEIMAN',
|
|
126
126
|
description: 'Smart combustible gas sensor',
|
|
127
127
|
fromZigbee: [fz.ias_gas_alarm_1],
|
|
128
128
|
toZigbee: [],
|
|
@@ -403,7 +403,7 @@ module.exports = [
|
|
|
403
403
|
zigbeeModel: ['STHM-I1H'],
|
|
404
404
|
model: 'STHM-I1H',
|
|
405
405
|
vendor: 'HEIMAN',
|
|
406
|
-
description: '
|
|
406
|
+
description: 'Temperature & humidity sensor',
|
|
407
407
|
fromZigbee: [fz.temperature, fz.humidity, fz.battery],
|
|
408
408
|
toZigbee: [],
|
|
409
409
|
meta: {battery: {voltageToPercentage: '3V_2500'}},
|
package/devices/hilux.js
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
const extend = require('../lib/extend');
|
|
2
|
+
|
|
3
|
+
module.exports = [
|
|
4
|
+
{
|
|
5
|
+
zigbeeModel: ['Hilux DZ8'],
|
|
6
|
+
model: 'DZ8',
|
|
7
|
+
vendor: 'Hilux',
|
|
8
|
+
description: 'Spot 7W',
|
|
9
|
+
extend: extend.light_onoff_brightness_colortemp({colorTempRange: [153, 370], disablePowerOnBehavior: true}),
|
|
10
|
+
},
|
|
11
|
+
];
|
package/devices/iris.js
CHANGED
|
@@ -111,7 +111,7 @@ module.exports = [
|
|
|
111
111
|
meta: {battery: {voltageToPercentage: '3V_2100'}},
|
|
112
112
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
113
113
|
const endpoint = device.getEndpoint(1);
|
|
114
|
-
await reporting.bind(endpoint, coordinatorEndpoint, ['
|
|
114
|
+
await reporting.bind(endpoint, coordinatorEndpoint, ['genPowerCfg', 'msTemperatureMeasurement']);
|
|
115
115
|
await reporting.onOff(endpoint);
|
|
116
116
|
await reporting.batteryVoltage(endpoint);
|
|
117
117
|
await reporting.temperature(endpoint);
|
package/devices/legrand.js
CHANGED
|
@@ -253,6 +253,7 @@ module.exports = [
|
|
|
253
253
|
await reporting.onOff(endpoint);
|
|
254
254
|
await reporting.readEletricalMeasurementMultiplierDivisors(endpoint);
|
|
255
255
|
await reporting.activePower(endpoint);
|
|
256
|
+
await reporting.apparentPower(endpoint);
|
|
256
257
|
},
|
|
257
258
|
},
|
|
258
259
|
{
|
|
@@ -310,6 +311,7 @@ module.exports = [
|
|
|
310
311
|
await reporting.bind(endpoint, coordinatorEndpoint, ['haElectricalMeasurement', 'genIdentify']);
|
|
311
312
|
await reporting.readEletricalMeasurementMultiplierDivisors(endpoint);
|
|
312
313
|
await reporting.activePower(endpoint);
|
|
314
|
+
await reporting.apparentPower(endpoint);
|
|
313
315
|
// Read configuration values that are not sent periodically as well as current power (activePower).
|
|
314
316
|
await endpoint.read('haElectricalMeasurement', ['activePower', 0xf000, 0xf001, 0xf002]);
|
|
315
317
|
},
|
|
@@ -377,6 +379,7 @@ module.exports = [
|
|
|
377
379
|
exposes.enum('cable_outlet_mode', ea.ALL, ['comfort', 'comfort-1', 'comfort-2', 'eco', 'frost_protection', 'off']),
|
|
378
380
|
exposes.switch().withState('state', true, 'Works only when the pilot wire is deactivated'),
|
|
379
381
|
e.power().withAccess(ea.STATE_GET),
|
|
382
|
+
e.power_apparent(),
|
|
380
383
|
e.power_on_behavior().withDescription(`Controls the behavior when the device is powered on. Works only when the pilot wire is
|
|
381
384
|
deactivated`)],
|
|
382
385
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
@@ -385,6 +388,7 @@ module.exports = [
|
|
|
385
388
|
await reporting.onOff(endpoint);
|
|
386
389
|
await reporting.readEletricalMeasurementMultiplierDivisors(endpoint);
|
|
387
390
|
await reporting.activePower(endpoint);
|
|
391
|
+
await reporting.apparentPower(endpoint);
|
|
388
392
|
},
|
|
389
393
|
},
|
|
390
394
|
{
|
package/devices/nodon.js
CHANGED
package/devices/philips.js
CHANGED
|
@@ -1379,14 +1379,14 @@ module.exports = [
|
|
|
1379
1379
|
model: '8718696598283',
|
|
1380
1380
|
vendor: 'Philips',
|
|
1381
1381
|
description: 'Hue white ambiance GU10',
|
|
1382
|
-
extend: hueExtend.light_onoff_brightness_colortemp(),
|
|
1382
|
+
extend: hueExtend.light_onoff_brightness_colortemp({colorTempRange: [153, 454]}),
|
|
1383
1383
|
},
|
|
1384
1384
|
{
|
|
1385
1385
|
zigbeeModel: ['LTG002'],
|
|
1386
1386
|
model: '929001953301',
|
|
1387
1387
|
vendor: 'Philips',
|
|
1388
1388
|
description: 'Hue white ambiance GU10 with Bluetooth',
|
|
1389
|
-
extend: hueExtend.light_onoff_brightness_colortemp({colorTempRange: [153,
|
|
1389
|
+
extend: hueExtend.light_onoff_brightness_colortemp({colorTempRange: [153, 454], disableHueEffects: false}),
|
|
1390
1390
|
},
|
|
1391
1391
|
{
|
|
1392
1392
|
zigbeeModel: ['LTD005'],
|
|
@@ -1400,7 +1400,7 @@ module.exports = [
|
|
|
1400
1400
|
model: '9290019534',
|
|
1401
1401
|
vendor: 'Philips',
|
|
1402
1402
|
description: 'Hue white ambiance GU10 with Bluetooth',
|
|
1403
|
-
extend: hueExtend.light_onoff_brightness_colortemp(),
|
|
1403
|
+
extend: hueExtend.light_onoff_brightness_colortemp({colorTempRange: [153, 454]}),
|
|
1404
1404
|
},
|
|
1405
1405
|
{
|
|
1406
1406
|
zigbeeModel: ['3417831P6', '929003056101'],
|
|
@@ -1955,6 +1955,13 @@ module.exports = [
|
|
|
1955
1955
|
description: 'Hue Gradient Signe floor lamp (white)',
|
|
1956
1956
|
extend: hueExtend.light_onoff_brightness_colortemp_color_gradient({colorTempRange: [153, 500]}),
|
|
1957
1957
|
},
|
|
1958
|
+
{
|
|
1959
|
+
zigbeeModel: ['915005987701'],
|
|
1960
|
+
model: '915005987701',
|
|
1961
|
+
vendor: 'Philips',
|
|
1962
|
+
description: 'Hue Gradient Signe floor lamp (wood)',
|
|
1963
|
+
extend: hueExtend.light_onoff_brightness_colortemp_color_gradient({colorTempRange: [153, 500]}),
|
|
1964
|
+
},
|
|
1958
1965
|
{
|
|
1959
1966
|
zigbeeModel: ['LCT020'],
|
|
1960
1967
|
model: '4080148P7',
|
package/devices/sinope.js
CHANGED
|
@@ -724,19 +724,25 @@ module.exports = [
|
|
|
724
724
|
description: 'Zigbee low volt thermostat',
|
|
725
725
|
fromZigbee: [fzLocal.thermostat, fzLocal.sinope, fz.legacy.hvac_user_interface,
|
|
726
726
|
fz.electrical_measurement, fz.metering, fz.ignore_temperature_report],
|
|
727
|
-
toZigbee: [tz.thermostat_local_temperature, tz.thermostat_occupied_heating_setpoint, tz.
|
|
728
|
-
tz.thermostat_keypad_lockout, tz.thermostat_system_mode, tzLocal.backlight_autodim,
|
|
729
|
-
tzLocal.
|
|
730
|
-
tzLocal.
|
|
731
|
-
|
|
732
|
-
|
|
727
|
+
toZigbee: [tz.thermostat_local_temperature, tz.thermostat_occupied_heating_setpoint, tz.thermostat_unoccupied_heating_setpoint,
|
|
728
|
+
tz.thermostat_temperature_display_mode, tz.thermostat_keypad_lockout, tz.thermostat_system_mode, tzLocal.backlight_autodim,
|
|
729
|
+
tzLocal.thermostat_time, tzLocal.time_format, tzLocal.enable_outdoor_temperature, tzLocal.outdoor_temperature,
|
|
730
|
+
tzLocal.thermostat_occupancy, tzLocal.floor_control_mode, tzLocal.ambiant_max_heat_setpoint, tzLocal.floor_min_heat_setpoint,
|
|
731
|
+
tzLocal.floor_max_heat_setpoint, tzLocal.temperature_sensor, tz.thermostat_min_heat_setpoint_limit,
|
|
732
|
+
tz.thermostat_max_heat_setpoint_limit, tzLocal.connected_load, tzLocal.aux_connected_load, tzLocal.main_cycle_output,
|
|
733
|
+
tzLocal.aux_cycle_output, tzLocal.pump_protection],
|
|
733
734
|
exposes: [
|
|
734
735
|
exposes.climate()
|
|
735
736
|
.withSetpoint('occupied_heating_setpoint', 5, 36, 0.5)
|
|
737
|
+
.withSetpoint('unoccupied_heating_setpoint', 5, 36, 0.5)
|
|
736
738
|
.withLocalTemperature()
|
|
737
739
|
.withSystemMode(['off', 'heat'])
|
|
738
740
|
.withPiHeatingDemand()
|
|
739
741
|
.withRunningState(['idle', 'heat'], ea.STATE),
|
|
742
|
+
e.max_heat_setpoint_limit(5, 36, 0.5),
|
|
743
|
+
e.min_heat_setpoint_limit(5, 36, 0.5),
|
|
744
|
+
exposes.enum('thermostat_occupancy', ea.ALL, ['unoccupied', 'occupied'])
|
|
745
|
+
.withDescription('Occupancy state of the thermostat'),
|
|
740
746
|
exposes.binary('enable_outdoor_temperature', ea.ALL, 'ON', 'OFF')
|
|
741
747
|
.withDescription('Showing outdoor temperature on secondary display'),
|
|
742
748
|
exposes.enum('temperature_display_mode', ea.ALL, ['celsius', 'fahrenheit'])
|
|
@@ -747,34 +753,21 @@ module.exports = [
|
|
|
747
753
|
.withDescription('The display backlight behavior'),
|
|
748
754
|
exposes.enum('keypad_lockout', ea.ALL, ['unlock', 'lock1'])
|
|
749
755
|
.withDescription('Enables or disables the device’s buttons'),
|
|
750
|
-
exposes.presets.max_heat_setpoint_limit(5, 36, 0.5),
|
|
751
|
-
exposes.presets.min_heat_setpoint_limit(5, 36, 0.5),
|
|
752
756
|
exposes.numeric('connected_load', ea.ALL)
|
|
753
|
-
.withUnit('W')
|
|
754
|
-
.withValueMin(1)
|
|
755
|
-
.withValueMax(20000)
|
|
757
|
+
.withUnit('W').withValueMin(1).withValueMax(20000)
|
|
756
758
|
.withDescription('The power in watts of the electrical load connected to the device'),
|
|
757
759
|
exposes.enum('floor_control_mode', ea.ALL, ['ambiant', 'floor'])
|
|
758
760
|
.withDescription('Control mode using floor or ambient temperature'),
|
|
759
761
|
exposes.numeric('floor_max_heat_setpoint', ea.ALL)
|
|
760
|
-
.withUnit('°C')
|
|
761
|
-
.withValueMin(7)
|
|
762
|
-
.withValueMax(36)
|
|
763
|
-
.withValueStep(0.5)
|
|
762
|
+
.withUnit('°C').withValueMin(7).withValueMax(36).withValueStep(0.5)
|
|
764
763
|
.withPreset('off', 'off', 'Use minimum permitted value')
|
|
765
764
|
.withDescription('The maximum floor temperature limit of the floor when in ambient control mode'),
|
|
766
765
|
exposes.numeric('floor_min_heat_setpoint', ea.ALL)
|
|
767
|
-
.withUnit('°C')
|
|
768
|
-
.withValueMin(5)
|
|
769
|
-
.withValueMax(34)
|
|
770
|
-
.withValueStep(0.5)
|
|
766
|
+
.withUnit('°C').withValueMin(5).withValueMax(34).withValueStep(0.5)
|
|
771
767
|
.withPreset('off', 'off', 'Use minimum permitted value')
|
|
772
768
|
.withDescription('The minimum floor temperature limit of the floor when in ambient control mode'),
|
|
773
769
|
exposes.numeric('ambiant_max_heat_setpoint', ea.ALL)
|
|
774
|
-
.withUnit('°C')
|
|
775
|
-
.withValueMin(5)
|
|
776
|
-
.withValueMax(36)
|
|
777
|
-
.withValueStep(0.5)
|
|
770
|
+
.withUnit('°C').withValueMin(5).withValueMax(36).withValueStep(0.5)
|
|
778
771
|
.withPreset('off', 'off', 'Use minimum permitted value')
|
|
779
772
|
.withDescription('The maximum ambient temperature limit when in floor control mode'),
|
|
780
773
|
exposes.enum('floor_temperature_sensor', ea.ALL, ['10k', '12k'])
|
|
@@ -786,9 +779,7 @@ module.exports = [
|
|
|
786
779
|
exposes.binary('pump_protection', ea.ALL, 'ON', 'OFF')
|
|
787
780
|
.withDescription('This function prevents the seizure of the pump'),
|
|
788
781
|
exposes.numeric('aux_connected_load', ea.ALL)
|
|
789
|
-
.withUnit('W')
|
|
790
|
-
.withValueMin(0)
|
|
791
|
-
.withValueMax(20000)
|
|
782
|
+
.withUnit('W').withValueMin(0).withValueMax(20000)
|
|
792
783
|
.withDescription('The power in watts of the heater connected to the auxiliary output of the thermostat'),
|
|
793
784
|
],
|
|
794
785
|
|
|
@@ -929,18 +920,16 @@ module.exports = [
|
|
|
929
920
|
description: 'Zigbee smart plug',
|
|
930
921
|
fromZigbee: [fz.on_off, fz.electrical_measurement, fz.metering],
|
|
931
922
|
toZigbee: [tz.on_off, tz.frequency],
|
|
932
|
-
exposes: [e.switch(), e.power(), e.current(), e.voltage(), e.energy()
|
|
923
|
+
exposes: [e.switch(), e.power(), e.current(), e.voltage(), e.energy()],
|
|
933
924
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
934
925
|
const endpoint = device.getEndpoint(1);
|
|
935
926
|
const binds = ['genBasic', 'genIdentify', 'genOnOff', 'haElectricalMeasurement', 'seMetering'];
|
|
936
927
|
await reporting.bind(endpoint, coordinatorEndpoint, binds);
|
|
937
|
-
await reporting.readEletricalMeasurementMultiplierDivisors(endpoint
|
|
928
|
+
await reporting.readEletricalMeasurementMultiplierDivisors(endpoint);
|
|
938
929
|
await reporting.onOff(endpoint);
|
|
939
930
|
await reporting.activePower(endpoint, {min: 10, max: 305, change: 1}); // divider 10 : 0.1W
|
|
940
931
|
await reporting.rmsCurrent(endpoint, {min: 10, max: 306, change: 10}); // divider 100: 0.1Arms
|
|
941
932
|
await reporting.rmsVoltage(endpoint, {min: 10, max: 307, change: 10}); // divider 100: 0.1Vrms
|
|
942
|
-
await reporting.acFrequency(endpoint, {min: 10, max: 308, change: 100}); // divider 100: 1Hz
|
|
943
|
-
await endpoint.read('haElectricalMeasurement', ['acFrequency']); // get a first read
|
|
944
933
|
await reporting.currentSummDelivered(endpoint, {min: 10, max: 303, change: [1, 1]});
|
|
945
934
|
},
|
|
946
935
|
},
|
|
@@ -951,18 +940,16 @@ module.exports = [
|
|
|
951
940
|
description: 'Zigbee smart plug',
|
|
952
941
|
fromZigbee: [fz.on_off, fz.electrical_measurement, fz.metering],
|
|
953
942
|
toZigbee: [tz.on_off, tz.frequency],
|
|
954
|
-
exposes: [e.switch(), e.power(), e.current(), e.voltage(), e.energy()
|
|
943
|
+
exposes: [e.switch(), e.power(), e.current(), e.voltage(), e.energy()],
|
|
955
944
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
956
945
|
const endpoint = device.getEndpoint(1);
|
|
957
946
|
const binds = ['genBasic', 'genIdentify', 'genOnOff', 'haElectricalMeasurement', 'seMetering'];
|
|
958
947
|
await reporting.bind(endpoint, coordinatorEndpoint, binds);
|
|
959
|
-
await reporting.readEletricalMeasurementMultiplierDivisors(endpoint
|
|
948
|
+
await reporting.readEletricalMeasurementMultiplierDivisors(endpoint);
|
|
960
949
|
await reporting.onOff(endpoint);
|
|
961
950
|
await reporting.activePower(endpoint, {min: 10, max: 305, change: 1}); // divider 10 : 0.1W
|
|
962
951
|
await reporting.rmsCurrent(endpoint, {min: 10, max: 306, change: 10}); // divider 100: 0.1Arms
|
|
963
952
|
await reporting.rmsVoltage(endpoint, {min: 10, max: 307, change: 10}); // divider 100: 0.1Vrms
|
|
964
|
-
await reporting.acFrequency(endpoint, {min: 10, max: 308, change: 100}); // divider 100: 1Hz
|
|
965
|
-
await endpoint.read('haElectricalMeasurement', ['acFrequency']); // get a first read
|
|
966
953
|
await reporting.currentSummDelivered(endpoint, {min: 10, max: 303, change: [1, 1]});
|
|
967
954
|
},
|
|
968
955
|
},
|
package/devices/tuya.js
CHANGED
|
@@ -1253,10 +1253,10 @@ module.exports = [
|
|
|
1253
1253
|
fromZigbee: [tuya.fz.datapoints],
|
|
1254
1254
|
toZigbee: [tuya.tz.datapoints],
|
|
1255
1255
|
configure: tuya.configureMagicPacket,
|
|
1256
|
-
exposes: [e.temperature(), e.
|
|
1256
|
+
exposes: [e.temperature(), e.soil_moisture(), tuya.exposes.temperatureUnit(), e.battery(), tuya.exposes.batteryState()],
|
|
1257
1257
|
meta: {
|
|
1258
1258
|
tuyaDatapoints: [
|
|
1259
|
-
[3, '
|
|
1259
|
+
[3, 'soil_moisture', tuya.valueConverter.raw],
|
|
1260
1260
|
[5, 'temperature', tuya.valueConverter.raw],
|
|
1261
1261
|
[9, 'temperature_unit', tuya.valueConverter.temperatureUnit],
|
|
1262
1262
|
[14, 'battery_state', tuya.valueConverter.batteryState],
|
|
@@ -1881,6 +1881,30 @@ module.exports = [
|
|
|
1881
1881
|
exposes: [e.switch(), e.power(), e.current(), e.voltage().withAccess(ea.STATE), e.energy(), tuya.exposes.switchType(),
|
|
1882
1882
|
exposes.enum('power_outage_memory', ea.ALL, ['on', 'off', 'restore']).withDescription('Recover state after power outage')],
|
|
1883
1883
|
},
|
|
1884
|
+
{
|
|
1885
|
+
fingerprint: [{modelID: 'TS0002', manufacturerName: '_TZ3000_irrmjcgi'}],
|
|
1886
|
+
model: 'TS0002_power',
|
|
1887
|
+
vendor: 'TuYa',
|
|
1888
|
+
description: '2 gang switch with power monitoring',
|
|
1889
|
+
extend: tuya.extend.switch({switchType: true, endpoints: ['l1', 'l2'], electricalMeasurements: true}),
|
|
1890
|
+
endpoint: (device) => {
|
|
1891
|
+
return {'l1': 1, 'l2': 2};
|
|
1892
|
+
},
|
|
1893
|
+
meta: {multiEndpoint: true, multiEndpointSkip: ['energy', 'current', 'voltage', 'power']},
|
|
1894
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
1895
|
+
const endpoint = device.getEndpoint(1);
|
|
1896
|
+
await endpoint.read('genBasic', ['manufacturerName', 'zclVersion', 'appVersion', 'modelId', 'powerSource', 0xfffe]);
|
|
1897
|
+
await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff', 'haElectricalMeasurement', 'seMetering']);
|
|
1898
|
+
await reporting.rmsVoltage(endpoint, {change: 5});
|
|
1899
|
+
await reporting.rmsCurrent(endpoint, {change: 50});
|
|
1900
|
+
await reporting.activePower(endpoint, {change: 10});
|
|
1901
|
+
await reporting.currentSummDelivered(endpoint);
|
|
1902
|
+
endpoint.saveClusterAttributeKeyValue('haElectricalMeasurement', {acCurrentDivisor: 1000, acCurrentMultiplier: 1});
|
|
1903
|
+
endpoint.saveClusterAttributeKeyValue('seMetering', {divisor: 100, multiplier: 1});
|
|
1904
|
+
device.save();
|
|
1905
|
+
await reporting.bind(device.getEndpoint(2), coordinatorEndpoint, ['genOnOff']);
|
|
1906
|
+
},
|
|
1907
|
+
},
|
|
1884
1908
|
{
|
|
1885
1909
|
fingerprint: tuya.fingerprint('TS000F', ['_TZ3000_xkap8wtb']),
|
|
1886
1910
|
model: 'TS000F_power',
|
|
@@ -1935,7 +1959,7 @@ module.exports = [
|
|
|
1935
1959
|
},
|
|
1936
1960
|
},
|
|
1937
1961
|
{
|
|
1938
|
-
fingerprint: [{modelID: 'TS0001', manufacturerName: '_TZ3000_tqlv4ug4'}],
|
|
1962
|
+
fingerprint: [{modelID: 'TS0001', manufacturerName: '_TZ3000_tqlv4ug4'}, {modelID: 'TS0001', manufacturerName: '_TZ3000_gjrubzje'}],
|
|
1939
1963
|
model: 'TS0001_switch_module',
|
|
1940
1964
|
vendor: 'TuYa',
|
|
1941
1965
|
description: '1 gang switch module',
|
package/devices/ubisys.js
CHANGED
|
@@ -86,7 +86,7 @@ const ubisys = {
|
|
|
86
86
|
cluster: 'manuSpecificUbisysDeviceSetup',
|
|
87
87
|
type: ['attributeReport', 'readResponse'],
|
|
88
88
|
convert: (model, msg, publish, options, meta) => {
|
|
89
|
-
const result = {};
|
|
89
|
+
const result = meta.state.hasOwnProperty('configure_device_setup') ? meta.state.configure_device_setup : {};
|
|
90
90
|
if (msg.data['inputConfigurations'] != null) {
|
|
91
91
|
result['input_configurations'] = msg.data['inputConfigurations'];
|
|
92
92
|
}
|
|
@@ -501,7 +501,7 @@ const ubisys = {
|
|
|
501
501
|
endpoint += 1;
|
|
502
502
|
}
|
|
503
503
|
|
|
504
|
-
meta.logger.debug(`ubisys: input_actions to be sent to '${meta.options.
|
|
504
|
+
meta.logger.debug(`ubisys: input_actions to be sent to '${meta.options.friendly_name}': ` +
|
|
505
505
|
JSON.stringify(resultingInputActions));
|
|
506
506
|
await devMgmtEp.write(
|
|
507
507
|
'manuSpecificUbisysDeviceSetup',
|
|
@@ -511,12 +511,14 @@ const ubisys = {
|
|
|
511
511
|
}
|
|
512
512
|
|
|
513
513
|
// re-read effective settings and dump them to the log
|
|
514
|
-
ubisys.tz.configure_device_setup.convertGet(entity, key, meta);
|
|
514
|
+
await ubisys.tz.configure_device_setup.convertGet(entity, key, meta);
|
|
515
515
|
},
|
|
516
516
|
|
|
517
517
|
convertGet: async (entity, key, meta) => {
|
|
518
518
|
const devMgmtEp = meta.device.getEndpoint(232);
|
|
519
|
-
await devMgmtEp.read('manuSpecificUbisysDeviceSetup', ['inputConfigurations'
|
|
519
|
+
await devMgmtEp.read('manuSpecificUbisysDeviceSetup', ['inputConfigurations'],
|
|
520
|
+
manufacturerOptions.ubisysNull);
|
|
521
|
+
await devMgmtEp.read('manuSpecificUbisysDeviceSetup', ['inputActions'],
|
|
520
522
|
manufacturerOptions.ubisysNull);
|
|
521
523
|
},
|
|
522
524
|
},
|
package/lib/reporting.js
CHANGED
|
@@ -202,6 +202,10 @@ module.exports = {
|
|
|
202
202
|
const p = payload('activePower', 5, repInterval.HOUR, 1, overrides);
|
|
203
203
|
await endpoint.configureReporting('haElectricalMeasurement', p);
|
|
204
204
|
},
|
|
205
|
+
apparentPower: async (endpoint, overrides) => {
|
|
206
|
+
const p = payload('apparentPower', 5, repInterval.HOUR, 1, overrides);
|
|
207
|
+
await endpoint.configureReporting('haElectricalMeasurement', p);
|
|
208
|
+
},
|
|
205
209
|
rmsCurrent: async (endpoint, overrides) => {
|
|
206
210
|
const p = payload('rmsCurrent', 5, repInterval.HOUR, 1, overrides);
|
|
207
211
|
await endpoint.configureReporting('haElectricalMeasurement', p);
|