zigbee-herdsman-converters 14.0.509 → 14.0.512
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 +16 -0
- package/converters/toZigbee.js +100 -73
- package/devices/aurora_lighting.js +13 -2
- package/devices/awox.js +2 -0
- package/devices/gledopto.js +7 -0
- package/devices/heiman.js +1 -1
- package/devices/ikea.js +11 -1
- package/devices/immax.js +5 -3
- package/devices/philips.js +18 -0
- package/devices/rtx.js +2 -1
- package/devices/tuya.js +21 -6
- package/package.json +1 -1
package/converters/fromZigbee.js
CHANGED
|
@@ -7191,6 +7191,22 @@ const converters = {
|
|
|
7191
7191
|
}
|
|
7192
7192
|
},
|
|
7193
7193
|
},
|
|
7194
|
+
tuya_relay_din_led_indicator: {
|
|
7195
|
+
cluster: 'genOnOff',
|
|
7196
|
+
type: ['attributeReport', 'readResponse'],
|
|
7197
|
+
convert: (model, msg, publish, options, meta) => {
|
|
7198
|
+
const property = 0x8001;
|
|
7199
|
+
|
|
7200
|
+
if (msg.data.hasOwnProperty(property)) {
|
|
7201
|
+
const dict = {0x00: 'off', 0x01: 'on_off', 0x02: 'off_on'};
|
|
7202
|
+
const value = msg.data[property];
|
|
7203
|
+
|
|
7204
|
+
if (dict.hasOwnProperty(value)) {
|
|
7205
|
+
return {[postfixWithEndpointName('indicator_mode', msg, model)]: dict[value]};
|
|
7206
|
+
}
|
|
7207
|
+
}
|
|
7208
|
+
},
|
|
7209
|
+
},
|
|
7194
7210
|
ias_keypad: {
|
|
7195
7211
|
cluster: 'ssIasZone',
|
|
7196
7212
|
type: 'commandStatusChangeNotification',
|
package/converters/toZigbee.js
CHANGED
|
@@ -798,7 +798,7 @@ const converters = {
|
|
|
798
798
|
const {message} = meta;
|
|
799
799
|
const transition = utils.getTransition(entity, 'brightness', meta);
|
|
800
800
|
const turnsOffAtBrightness1 = utils.getMetaValue(entity, meta.mapped, 'turnsOffAtBrightness1', 'allEqual', false);
|
|
801
|
-
let state = message.hasOwnProperty('state') ? message.state.toLowerCase() : undefined;
|
|
801
|
+
let state = message.hasOwnProperty('state') ? (message.state === null ? null : message.state.toLowerCase()) : undefined;
|
|
802
802
|
let brightness = undefined;
|
|
803
803
|
if (message.hasOwnProperty('brightness')) {
|
|
804
804
|
brightness = Number(message.brightness);
|
|
@@ -806,91 +806,106 @@ const converters = {
|
|
|
806
806
|
brightness = utils.mapNumberRange(Number(message.brightness_percent), 0, 100, 0, 255);
|
|
807
807
|
}
|
|
808
808
|
|
|
809
|
-
if (brightness
|
|
810
|
-
// Allow 255
|
|
809
|
+
if (brightness === 255) {
|
|
810
|
+
// Allow 255 for backwards compatibility.
|
|
811
|
+
brightness = 254;
|
|
812
|
+
}
|
|
813
|
+
|
|
814
|
+
if (brightness !== undefined && (isNaN(brightness) || brightness < 0 || brightness > 254)) {
|
|
811
815
|
throw new Error(`Brightness value of message: '${JSON.stringify(message)}' invalid, must be a number >= 0 and =< 254`);
|
|
812
816
|
}
|
|
813
817
|
|
|
814
|
-
if (state !== undefined && ['on', 'off', 'toggle'].includes(state) === false) {
|
|
818
|
+
if (state !== undefined && state !== null && ['on', 'off', 'toggle'].includes(state) === false) {
|
|
815
819
|
throw new Error(`State value of message: '${JSON.stringify(message)}' invalid, must be 'ON', 'OFF' or 'TOGGLE'`);
|
|
816
820
|
}
|
|
817
821
|
|
|
818
|
-
if (state ===
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
//
|
|
860
|
-
//
|
|
861
|
-
if (
|
|
862
|
-
|
|
863
|
-
globalStore.putValue(entity, 'turnedOffWithTransition', false);
|
|
864
|
-
}
|
|
865
|
-
|
|
866
|
-
const result = await converters.on_off.convertSet(entity, 'state', state, meta);
|
|
867
|
-
result.readAfterWriteTime = 0;
|
|
868
|
-
if (result.state && result.state.state === 'ON' && meta.state.brightness === 0) {
|
|
869
|
-
result.state.brightness = 1;
|
|
822
|
+
if ((state === undefined || state === null) && brightness === undefined) {
|
|
823
|
+
throw new Error(`At least one of "brightness" or "state" must have a value: '${JSON.stringify(message)}'`);
|
|
824
|
+
}
|
|
825
|
+
|
|
826
|
+
// Infer state from desired brightness if unset. Ideally we'd want to keep it as it is, but this code has always
|
|
827
|
+
// used 'MoveToLevelWithOnOff' so that'd break backwards compatibility. To keep the state, the user
|
|
828
|
+
// has to explicitly set it to null.
|
|
829
|
+
if (state === undefined) {
|
|
830
|
+
// Also write to `meta.message.state` in case we delegate to the `on_off` converter.
|
|
831
|
+
state = meta.message.state = brightness === 0 ? 'off' : 'on';
|
|
832
|
+
}
|
|
833
|
+
|
|
834
|
+
const targetState = state === 'toggle' ? (meta.state.state === 'ON' ? 'off' : 'on') : state;
|
|
835
|
+
if (targetState === 'off') {
|
|
836
|
+
// Simulate 'Off' with transition via 'MoveToLevelWithOnOff', otherwise just use 'Off'.
|
|
837
|
+
// TODO: if this is a group where some members don't support Level Control, turning them off
|
|
838
|
+
// with transition may have no effect. (Some devices, such as Envilar ZG302-BOX-RELAY, handle
|
|
839
|
+
// 'MoveToLevelWithOnOff' despite not supporting the cluster; others, like the LEDVANCE SMART+
|
|
840
|
+
// plug, do not.)
|
|
841
|
+
brightness = transition.specified || brightness === 0 ? 0 : undefined;
|
|
842
|
+
if (meta.state.hasOwnProperty('brightness') && meta.state.state === 'ON') {
|
|
843
|
+
// The light's current level gets clobbered in two cases:
|
|
844
|
+
// 1. when 'Off' has a transition, in which case it is really 'MoveToLevelWithOnOff'
|
|
845
|
+
// https://github.com/Koenkk/zigbee-herdsman-converters/issues/1073
|
|
846
|
+
// 2. when 'OnLevel' is set: "If OnLevel is not defined, set the CurrentLevel to the stored level."
|
|
847
|
+
// https://github.com/Koenkk/zigbee2mqtt/issues/2850#issuecomment-580365633
|
|
848
|
+
// We need to remember current brightness in case the next 'On' does not provide it. `meta` is not reliable
|
|
849
|
+
// here, as it will get clobbered too if reporting is configured.
|
|
850
|
+
globalStore.putValue(entity, 'brightness', meta.state.brightness);
|
|
851
|
+
globalStore.putValue(entity, 'turnedOffWithTransition', brightness !== undefined);
|
|
852
|
+
}
|
|
853
|
+
} else if (targetState === 'on' && brightness === undefined) {
|
|
854
|
+
// Simulate 'On' with transition via 'MoveToLevelWithOnOff', or restore the level from before
|
|
855
|
+
// it was clobbered by a previous transition to off; otherwise just use 'On'.
|
|
856
|
+
// TODO: same problem as above.
|
|
857
|
+
// TODO: if transition is not specified, should use device default (OnTransitionTime), not 0.
|
|
858
|
+
if (transition.specified || globalStore.getValue(entity, 'turnedOffWithTransition') === true) {
|
|
859
|
+
const current = utils.getObjectProperty(meta.state, 'brightness', 254);
|
|
860
|
+
brightness = globalStore.getValue(entity, 'brightness', current);
|
|
861
|
+
try {
|
|
862
|
+
const attributeRead = await entity.read('genLevelCtrl', ['onLevel']);
|
|
863
|
+
// TODO: for groups, `read` does not wait for responses. If it did, we could still issue a single
|
|
864
|
+
// command if all values of `OnLevel` are equal, or split into one command per device if not.
|
|
865
|
+
if (attributeRead !== undefined && attributeRead['onLevel'] != 255) {
|
|
866
|
+
brightness = attributeRead['onLevel'];
|
|
870
867
|
}
|
|
871
|
-
|
|
872
|
-
|
|
868
|
+
} catch (e) {
|
|
869
|
+
// OnLevel not supported
|
|
873
870
|
}
|
|
874
871
|
}
|
|
875
|
-
}
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
872
|
+
}
|
|
873
|
+
|
|
874
|
+
if (brightness === undefined) {
|
|
875
|
+
const result = await converters.on_off.convertSet(entity, 'state', state, meta);
|
|
876
|
+
result.readAfterWriteTime = 0;
|
|
877
|
+
if (result.state && result.state.state === 'ON' && meta.state.brightness === 0) {
|
|
878
|
+
result.state.brightness = 1;
|
|
879
879
|
}
|
|
880
|
+
return result;
|
|
881
|
+
}
|
|
882
|
+
|
|
883
|
+
if (brightness === 0 && (targetState === 'on' || state === null)) {
|
|
884
|
+
brightness = 1;
|
|
885
|
+
}
|
|
886
|
+
if (brightness === 1 && turnsOffAtBrightness1) {
|
|
887
|
+
brightness = 2;
|
|
888
|
+
}
|
|
880
889
|
|
|
890
|
+
if (targetState !== 'off') {
|
|
881
891
|
globalStore.putValue(entity, 'brightness', brightness);
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
)
|
|
892
|
+
globalStore.clearValue(entity, 'turnedOffWithTransition');
|
|
893
|
+
}
|
|
894
|
+
await entity.command(
|
|
895
|
+
'genLevelCtrl',
|
|
896
|
+
state === null ? 'moveToLevel' : 'moveToLevelWithOnOff',
|
|
897
|
+
{level: Number(brightness), transtime: transition.time},
|
|
898
|
+
utils.getOptions(meta.mapped, entity),
|
|
899
|
+
);
|
|
888
900
|
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
901
|
+
const result = {state: {}, readAfterWriteTime: transition.time * 100};
|
|
902
|
+
if (brightness !== 0) {
|
|
903
|
+
result.state.brightness = Number(brightness);
|
|
904
|
+
}
|
|
905
|
+
if (state !== null) {
|
|
906
|
+
result.state.state = brightness === 0 ? 'OFF' : 'ON';
|
|
893
907
|
}
|
|
908
|
+
return result;
|
|
894
909
|
},
|
|
895
910
|
convertGet: async (entity, key, meta) => {
|
|
896
911
|
if (key === 'brightness') {
|
|
@@ -2531,12 +2546,24 @@ const converters = {
|
|
|
2531
2546
|
return {state: {power_outage_memory: value}};
|
|
2532
2547
|
},
|
|
2533
2548
|
},
|
|
2549
|
+
tuya_relay_din_led_indicator: {
|
|
2550
|
+
key: ['indicator_mode'],
|
|
2551
|
+
convertSet: async (entity, key, value, meta) => {
|
|
2552
|
+
value = value.toLowerCase();
|
|
2553
|
+
const lookup = {'off': 0x00, 'on_off': 0x01, 'off_on': 0x02};
|
|
2554
|
+
utils.validateValue(value, Object.keys(lookup));
|
|
2555
|
+
const payload = lookup[value];
|
|
2556
|
+
await entity.write('genOnOff', {0x8001: {value: payload, type: 0x30}});
|
|
2557
|
+
return {state: {indicator_mode: value}};
|
|
2558
|
+
},
|
|
2559
|
+
},
|
|
2534
2560
|
kmpcil_res005_on_off: {
|
|
2535
2561
|
key: ['state'],
|
|
2536
2562
|
convertSet: async (entity, key, value, meta) => {
|
|
2537
2563
|
const options = {disableDefaultResponse: true};
|
|
2564
|
+
value = value.toLowerCase();
|
|
2538
2565
|
utils.validateValue(value, ['toggle', 'off', 'on']);
|
|
2539
|
-
if (value
|
|
2566
|
+
if (value === 'toggle') {
|
|
2540
2567
|
if (!meta.state.hasOwnProperty('state')) {
|
|
2541
2568
|
throw new Error('Cannot toggle, state not known yet');
|
|
2542
2569
|
} else {
|
|
@@ -18,6 +18,17 @@ const tzLocal = {
|
|
|
18
18
|
return {state: {backlight_led: state.toUpperCase()}};
|
|
19
19
|
},
|
|
20
20
|
},
|
|
21
|
+
backlight_brightness: {
|
|
22
|
+
key: ['brightness'],
|
|
23
|
+
options: [exposes.options.transition()],
|
|
24
|
+
convertSet: async (entity, key, value, meta) => {
|
|
25
|
+
await entity.command('genLevelCtrl', 'moveToLevel', {level: value, transtime: 0}, utils.getOptions(meta.mapped, entity));
|
|
26
|
+
return {state: {brightness: value}};
|
|
27
|
+
},
|
|
28
|
+
convertGet: async (entity, key, meta) => {
|
|
29
|
+
await entity.read('genLevelCtrl', ['currentLevel']);
|
|
30
|
+
},
|
|
31
|
+
},
|
|
21
32
|
};
|
|
22
33
|
|
|
23
34
|
const disableBatteryRotaryDimmerReporting = async (endpoint) => {
|
|
@@ -181,12 +192,12 @@ module.exports = [
|
|
|
181
192
|
model: 'AU-A1ZBDSS',
|
|
182
193
|
vendor: 'Aurora Lighting',
|
|
183
194
|
description: 'Double smart socket UK',
|
|
184
|
-
fromZigbee: [fz.identify, fz.on_off, fz.electrical_measurement],
|
|
195
|
+
fromZigbee: [fz.identify, fz.on_off, fz.electrical_measurement, fz.brightness],
|
|
185
196
|
exposes: [e.switch().withEndpoint('left'), e.switch().withEndpoint('right'),
|
|
186
197
|
e.power().withEndpoint('left'), e.power().withEndpoint('right'),
|
|
187
198
|
exposes.numeric('brightness', ea.ALL).withValueMin(0).withValueMax(254)
|
|
188
199
|
.withDescription('Brightness of this backlight LED')],
|
|
189
|
-
toZigbee: [tz.
|
|
200
|
+
toZigbee: [tzLocal.backlight_brightness, tz.on_off],
|
|
190
201
|
meta: {multiEndpoint: true},
|
|
191
202
|
endpoint: (device) => {
|
|
192
203
|
return {'left': 1, 'right': 2};
|
package/devices/awox.js
CHANGED
|
@@ -67,6 +67,7 @@ module.exports = [
|
|
|
67
67
|
vendor: 'AwoX',
|
|
68
68
|
description: 'LED white',
|
|
69
69
|
extend: extend.light_onoff_brightness(),
|
|
70
|
+
whiteLabel: [{vendor: 'EGLO', model: '12229'}],
|
|
70
71
|
},
|
|
71
72
|
{
|
|
72
73
|
fingerprint: [
|
|
@@ -248,6 +249,7 @@ module.exports = [
|
|
|
248
249
|
vendor: 'AwoX',
|
|
249
250
|
description: 'LED light with color temperature',
|
|
250
251
|
extend: extend.light_onoff_brightness_colortemp({colorTempRange: [153, 370]}),
|
|
252
|
+
whiteLabel: [{vendor: 'EGLO', model: '12239'}],
|
|
251
253
|
},
|
|
252
254
|
{
|
|
253
255
|
fingerprint: [
|
package/devices/gledopto.js
CHANGED
|
@@ -315,6 +315,13 @@ module.exports = [
|
|
|
315
315
|
extend: gledoptoExtend.light_onoff_brightness_colortemp_color(),
|
|
316
316
|
meta: {disableDefaultResponse: true},
|
|
317
317
|
},
|
|
318
|
+
{
|
|
319
|
+
zigbeeModel: ['GL-B-002P'],
|
|
320
|
+
model: 'GL-B-002P',
|
|
321
|
+
vendor: 'Gledopto',
|
|
322
|
+
description: 'Zigbee smart filament LED bulb',
|
|
323
|
+
extend: extend.light_onoff_brightness_colortemp_color({colorTempRange: [158, 495]}),
|
|
324
|
+
},
|
|
318
325
|
{
|
|
319
326
|
zigbeeModel: ['GL-MC-001P'],
|
|
320
327
|
model: 'GL-MC-001P',
|
package/devices/heiman.js
CHANGED
|
@@ -287,7 +287,7 @@ module.exports = [
|
|
|
287
287
|
description: 'Smart motion sensor',
|
|
288
288
|
fromZigbee: [fz.ias_occupancy_alarm_1, fz.battery],
|
|
289
289
|
toZigbee: [],
|
|
290
|
-
exposes: [e.occupancy(), e.battery_low(), e.battery(), e.battery_voltage()],
|
|
290
|
+
exposes: [e.occupancy(), e.battery_low(), e.battery(), e.battery_voltage(), e.tamper()],
|
|
291
291
|
meta: {battery: {voltageToPercentage: '3V_2500'}},
|
|
292
292
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
293
293
|
const endpoint = device.getEndpoint(1);
|
package/devices/ikea.js
CHANGED
|
@@ -13,11 +13,15 @@ const {
|
|
|
13
13
|
calibrateAndPrecisionRoundOptions, postfixWithEndpointName, getMetaValue,
|
|
14
14
|
} = require('../lib/utils');
|
|
15
15
|
|
|
16
|
-
const bulbOnEvent = async (type, data, device) => {
|
|
16
|
+
const bulbOnEvent = async (type, data, device, options, state) => {
|
|
17
17
|
/**
|
|
18
18
|
* IKEA bulbs lose their configured reportings when losing power.
|
|
19
19
|
* A deviceAnnounce indicates they are powered on again.
|
|
20
20
|
* Reconfigure the configured reoprting here.
|
|
21
|
+
*
|
|
22
|
+
* Additionally some other information is lost like
|
|
23
|
+
* color_options.execute_if_off. We also restore these.
|
|
24
|
+
*
|
|
21
25
|
* NOTE: binds are not lost so rebinding is not needed!
|
|
22
26
|
*/
|
|
23
27
|
if (type === 'deviceAnnounce') {
|
|
@@ -29,6 +33,12 @@ const bulbOnEvent = async (type, data, device) => {
|
|
|
29
33
|
}]);
|
|
30
34
|
}
|
|
31
35
|
}
|
|
36
|
+
|
|
37
|
+
// NOTE: execute_if_off default is false
|
|
38
|
+
// we only restore if true, to save unneeded network writes
|
|
39
|
+
if (state.color_options.execute_if_off === true) {
|
|
40
|
+
device.endpoints[0].write('lightingColorCtrl', {'options': 1});
|
|
41
|
+
}
|
|
32
42
|
}
|
|
33
43
|
};
|
|
34
44
|
|
package/devices/immax.js
CHANGED
|
@@ -66,16 +66,18 @@ module.exports = [
|
|
|
66
66
|
model: '07048L',
|
|
67
67
|
vendor: 'Immax',
|
|
68
68
|
description: 'NEO SMART plug',
|
|
69
|
-
fromZigbee: [fz.on_off, fz.electrical_measurement],
|
|
69
|
+
fromZigbee: [fz.on_off, fz.electrical_measurement, fz.metering],
|
|
70
70
|
toZigbee: [tz.on_off],
|
|
71
71
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
72
72
|
const endpoint = device.getEndpoint(1);
|
|
73
|
-
await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff', 'haElectricalMeasurement']);
|
|
73
|
+
await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff', 'haElectricalMeasurement', 'seMetering']);
|
|
74
74
|
await reporting.onOff(endpoint);
|
|
75
75
|
await reporting.readEletricalMeasurementMultiplierDivisors(endpoint);
|
|
76
|
+
await reporting.readMeteringMultiplierDivisor(endpoint);
|
|
77
|
+
await reporting.currentSummDelivered(endpoint);
|
|
76
78
|
await reporting.activePower(endpoint);
|
|
77
79
|
},
|
|
78
|
-
exposes: [e.switch(), e.power()],
|
|
80
|
+
exposes: [e.switch(), e.power(), e.energy()],
|
|
79
81
|
},
|
|
80
82
|
{
|
|
81
83
|
zigbeeModel: ['losfena'],
|
package/devices/philips.js
CHANGED
|
@@ -81,6 +81,15 @@ module.exports = [
|
|
|
81
81
|
extend: hueExtend.light_onoff_brightness_colortemp_color({colorTempRange: [153, 500]}),
|
|
82
82
|
ota: ota.zigbeeOTA,
|
|
83
83
|
},
|
|
84
|
+
{
|
|
85
|
+
zigbeeModel: ['929003045501_01', '929003045501_02', '929003045501_03'],
|
|
86
|
+
model: '929003045501',
|
|
87
|
+
vendor: 'Philips',
|
|
88
|
+
description: 'Hue Centura recessed spotlight white and color ambiance GU10 (black)',
|
|
89
|
+
meta: {turnsOffAtBrightness1: true},
|
|
90
|
+
extend: hueExtend.light_onoff_brightness_colortemp_color({colorTempRange: [153, 500]}),
|
|
91
|
+
ota: ota.zigbeeOTA,
|
|
92
|
+
},
|
|
84
93
|
{
|
|
85
94
|
zigbeeModel: ['929003047501'],
|
|
86
95
|
model: '929003047501',
|
|
@@ -2636,6 +2645,15 @@ module.exports = [
|
|
|
2636
2645
|
extend: hueExtend.light_onoff_brightness_colortemp({colorTempRange: [153, 454]}),
|
|
2637
2646
|
ota: ota.zigbeeOTA,
|
|
2638
2647
|
},
|
|
2648
|
+
{
|
|
2649
|
+
zigbeeModel: ['929003045601_01', '929003045601_02'],
|
|
2650
|
+
model: '8719514338142',
|
|
2651
|
+
vendor: 'Philips',
|
|
2652
|
+
description: 'Hue White ambiance Runner double spotlight',
|
|
2653
|
+
meta: {turnsOffAtBrightness1: true},
|
|
2654
|
+
extend: hueExtend.light_onoff_brightness_colortemp({colorTempRange: [153, 454]}),
|
|
2655
|
+
ota: ota.zigbeeOTA,
|
|
2656
|
+
},
|
|
2639
2657
|
{
|
|
2640
2658
|
zigbeeModel: ['5047230P6', '5047230P6'],
|
|
2641
2659
|
model: '5047230P6',
|
package/devices/rtx.js
CHANGED
|
@@ -6,7 +6,8 @@ const ea = exposes.access;
|
|
|
6
6
|
|
|
7
7
|
module.exports = [
|
|
8
8
|
{
|
|
9
|
-
fingerprint: [{modelID: 'TS0601', manufacturerName: '_TZE200_akjefhj5'}, {modelID: 'TS0601', manufacturerName: '_TZE200_2wg5qrjy'}
|
|
9
|
+
fingerprint: [{modelID: 'TS0601', manufacturerName: '_TZE200_akjefhj5'}, {modelID: 'TS0601', manufacturerName: '_TZE200_2wg5qrjy'},
|
|
10
|
+
{modelID: 'TS0601', manufacturerName: '_TZE200_81isopgh'}],
|
|
10
11
|
model: 'ZVG1',
|
|
11
12
|
vendor: 'RTX',
|
|
12
13
|
description: 'Zigbee smart water valve',
|
package/devices/tuya.js
CHANGED
|
@@ -1929,8 +1929,9 @@ module.exports = [
|
|
|
1929
1929
|
model: 'TS011F_din_smart_relay',
|
|
1930
1930
|
description: 'Din smart relay (with power monitoring)',
|
|
1931
1931
|
vendor: 'TuYa',
|
|
1932
|
-
fromZigbee: [fz.on_off, fz.electrical_measurement, fz.metering, fz.ignore_basic_report, fz.tuya_switch_power_outage_memory
|
|
1933
|
-
|
|
1932
|
+
fromZigbee: [fz.on_off, fz.electrical_measurement, fz.metering, fz.ignore_basic_report, fz.tuya_switch_power_outage_memory,
|
|
1933
|
+
fz.tuya_relay_din_led_indicator],
|
|
1934
|
+
toZigbee: [tz.on_off, tz.tuya_switch_power_outage_memory, tz.tuya_relay_din_led_indicator],
|
|
1934
1935
|
whiteLabel: [{vendor: 'MatSee Plus', model: 'ATMS1602Z'}],
|
|
1935
1936
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
1936
1937
|
const endpoint = device.getEndpoint(1);
|
|
@@ -1945,15 +1946,17 @@ module.exports = [
|
|
|
1945
1946
|
},
|
|
1946
1947
|
exposes: [e.switch(), e.power(), e.current(), e.voltage().withAccess(ea.STATE),
|
|
1947
1948
|
e.energy(), exposes.enum('power_outage_memory', ea.STATE_SET, ['on', 'off', 'restore'])
|
|
1948
|
-
.withDescription('Recover state after power outage')
|
|
1949
|
+
.withDescription('Recover state after power outage'),
|
|
1950
|
+
exposes.enum('indicator_mode', ea.STATE_SET, ['off', 'on_off', 'off_on'])
|
|
1951
|
+
.withDescription('Relay LED indicator mode')],
|
|
1949
1952
|
},
|
|
1950
1953
|
{
|
|
1951
1954
|
fingerprint: [{modelID: 'TS011F', manufacturerName: '_TZ3000_7issjl2q'}],
|
|
1952
1955
|
model: 'ATMS1601Z',
|
|
1953
1956
|
description: 'Din smart relay (without power monitoring)',
|
|
1954
1957
|
vendor: 'TuYa',
|
|
1955
|
-
fromZigbee: [fz.on_off, fz.ignore_basic_report, fz.tuya_switch_power_outage_memory],
|
|
1956
|
-
toZigbee: [tz.on_off, tz.tuya_switch_power_outage_memory],
|
|
1958
|
+
fromZigbee: [fz.on_off, fz.ignore_basic_report, fz.tuya_switch_power_outage_memory, fz.tuya_relay_din_led_indicator],
|
|
1959
|
+
toZigbee: [tz.on_off, tz.tuya_switch_power_outage_memory, tz.tuya_relay_din_led_indicator],
|
|
1957
1960
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
1958
1961
|
const endpoint = device.getEndpoint(1);
|
|
1959
1962
|
await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff']);
|
|
@@ -1961,7 +1964,9 @@ module.exports = [
|
|
|
1961
1964
|
},
|
|
1962
1965
|
exposes: [e.switch(),
|
|
1963
1966
|
exposes.enum('power_outage_memory', ea.STATE_SET, ['on', 'off', 'restore'])
|
|
1964
|
-
.withDescription('Recover state after power outage')
|
|
1967
|
+
.withDescription('Recover state after power outage'),
|
|
1968
|
+
exposes.enum('indicator_mode', ea.STATE_SET, ['off', 'on_off', 'off_on'])
|
|
1969
|
+
.withDescription('Relay LED indicator mode')],
|
|
1965
1970
|
},
|
|
1966
1971
|
{
|
|
1967
1972
|
fingerprint: [{modelID: 'TS0601', manufacturerName: '_TZE200_nklqjk62'}],
|
|
@@ -2335,4 +2340,14 @@ module.exports = [
|
|
|
2335
2340
|
.withDescription('Alarm humidity min'),
|
|
2336
2341
|
],
|
|
2337
2342
|
},
|
|
2343
|
+
{
|
|
2344
|
+
fingerprint: [{modelID: 'TS0601', manufacturerName: '_TZE200_qoy0ekbd'}],
|
|
2345
|
+
model: 'CX-0726',
|
|
2346
|
+
vendor: 'TuYa',
|
|
2347
|
+
description: 'Temperature & humidity LCD sensor',
|
|
2348
|
+
fromZigbee: [fz.tuya_temperature_humidity_sensor, fz.ignore_tuya_set_time],
|
|
2349
|
+
toZigbee: [],
|
|
2350
|
+
onEvent: tuya.onEventSetLocalTime,
|
|
2351
|
+
exposes: [e.temperature(), e.humidity(), e.battery()],
|
|
2352
|
+
},
|
|
2338
2353
|
];
|