zigbee-herdsman-converters 14.0.347 → 14.0.348

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.
@@ -0,0 +1,42 @@
1
+ const fz = require('zigbee-herdsman-converters/converters/fromZigbee');
2
+ const tz = require('zigbee-herdsman-converters/converters/toZigbee');
3
+ const exposes = require('zigbee-herdsman-converters/lib/exposes');
4
+ const reporting = require('zigbee-herdsman-converters/lib/reporting');
5
+ const e = exposes.presets;
6
+
7
+
8
+ module.exports = [
9
+ {
10
+ zigbeeModel: ['zigfred uno'],
11
+ model: 'ZFU-1D-CH',
12
+ vendor: 'Siglis',
13
+ description: 'zigfred uno smart in-wall switch',
14
+ exposes: [e.light_brightness_colorxy().withEndpoint('l1'), e.switch().withEndpoint('l2'), e.light_brightness().withEndpoint('l3')],
15
+ fromZigbee: [fz.color_colortemp, fz.on_off, fz.brightness, fz.level_config, fz.power_on_behavior, fz.ignore_basic_report],
16
+ toZigbee: [tz.light_onoff_brightness, tz.light_color, tz.ignore_transition, tz.ignore_rate, tz.light_brightness_move,
17
+ tz.light_brightness_step, tz.level_config, tz.power_on_behavior, tz.light_hue_saturation_move,
18
+ tz.light_hue_saturation_step, tz.light_color_options, tz.light_color_mode],
19
+ meta: {multiEndpoint: true},
20
+ endpoint: (device) => {
21
+ return {'l1': 5, 'l2': 6, 'l3': 7};
22
+ },
23
+ configure: async (device, coordinatorEndpoint, logger) => {
24
+ const controlEp = device.getEndpoint(5);
25
+ const relayEp = device.getEndpoint(6);
26
+ const dimmerEp = device.getEndpoint(7);
27
+ // Bind Control EP (LED)
28
+ await reporting.bind(controlEp, coordinatorEndpoint, ['genOnOff']);
29
+ await reporting.bind(controlEp, coordinatorEndpoint, ['genLevelCtrl']);
30
+ await reporting.onOff(controlEp);
31
+ await reporting.brightness(controlEp);
32
+ // Bind Relay EP
33
+ await reporting.bind(relayEp, coordinatorEndpoint, ['genOnOff']);
34
+ await reporting.onOff(relayEp);
35
+ // Bind Dimmer EP
36
+ await reporting.bind(dimmerEp, coordinatorEndpoint, ['genOnOff']);
37
+ await reporting.bind(dimmerEp, coordinatorEndpoint, ['genLevelCtrl']);
38
+ await reporting.onOff(dimmerEp);
39
+ await reporting.brightness(dimmerEp);
40
+ },
41
+ },
42
+ ];
package/devices/tuya.js CHANGED
@@ -9,6 +9,10 @@ const extend = require('../lib/extend');
9
9
  const e = exposes.presets;
10
10
  const ea = exposes.access;
11
11
 
12
+
13
+ const TS011Fplugs = ['_TZ3000_5f43h46b', '_TZ3000_cphmq0q7', '_TZ3000_dpo1ysak', '_TZ3000_ew3ldmgx',
14
+ '_TZ3000_jvzvulen', '_TZ3000_mraovvmm', '_TZ3000_nfnmi125', '_TZ3000_ps3dmato', '_TZ3000_w0qqde0g', '_TZ3000_u5u4cakc'];
15
+
12
16
  module.exports = [
13
17
  {
14
18
  zigbeeModel: ['TS0203'],
@@ -1016,18 +1020,9 @@ module.exports = [
1016
1020
  extend: extend.switch(),
1017
1021
  },
1018
1022
  {
1019
- fingerprint: [
1020
- {modelID: 'TS011F', manufacturerName: '_TZ3000_5f43h46b'},
1021
- {modelID: 'TS011F', manufacturerName: '_TZ3000_cphmq0q7'},
1022
- {modelID: 'TS011F', manufacturerName: '_TZ3000_dpo1ysak'},
1023
- {modelID: 'TS011F', manufacturerName: '_TZ3000_ew3ldmgx'},
1024
- {modelID: 'TS011F', manufacturerName: '_TZ3000_jvzvulen'},
1025
- {modelID: 'TS011F', manufacturerName: '_TZ3000_mraovvmm'},
1026
- {modelID: 'TS011F', manufacturerName: '_TZ3000_nfnmi125'},
1027
- {modelID: 'TS011F', manufacturerName: '_TZ3000_ps3dmato'},
1028
- {modelID: 'TS011F', manufacturerName: '_TZ3000_w0qqde0g'},
1029
- {modelID: 'TS011F', manufacturerName: '_TZ3000_u5u4cakc'},
1030
- ],
1023
+ fingerprint: TS011Fplugs.map((manufacturerName) => {
1024
+ return {modelID: 'TS011F', manufacturerName};
1025
+ }),
1031
1026
  model: 'TS011F_plug_1',
1032
1027
  description: 'Smart plug (with power monitoring)',
1033
1028
  vendor: 'TuYa',
@@ -1067,27 +1062,11 @@ module.exports = [
1067
1062
  .withDescription('Recover state after power outage')],
1068
1063
  },
1069
1064
  {
1070
- fingerprint: [
1071
- {modelID: 'TS011F', manufacturerName: '_TZ3000_5f43h46b', applicationVersion: 68},
1072
- {modelID: 'TS011F', manufacturerName: '_TZ3000_5f43h46b', applicationVersion: 69},
1073
- {modelID: 'TS011F', manufacturerName: '_TZ3000_cphmq0q7', applicationVersion: 68},
1074
- {modelID: 'TS011F', manufacturerName: '_TZ3000_cphmq0q7', applicationVersion: 69},
1075
- {modelID: 'TS011F', manufacturerName: '_TZ3000_ew3ldmgx', applicationVersion: 68},
1076
- {modelID: 'TS011F', manufacturerName: '_TZ3000_ew3ldmgx', applicationVersion: 69},
1077
- {modelID: 'TS011F', manufacturerName: '_TZ3000_jvzvulen', applicationVersion: 68},
1078
- {modelID: 'TS011F', manufacturerName: '_TZ3000_jvzvulen', applicationVersion: 69},
1079
- {modelID: 'TS011F', manufacturerName: '_TZ3000_mraovvmm', applicationVersion: 68},
1080
- {modelID: 'TS011F', manufacturerName: '_TZ3000_mraovvmm', applicationVersion: 69},
1081
- {modelID: 'TS011F', manufacturerName: '_TZ3000_nfnmi125', applicationVersion: 68},
1082
- {modelID: 'TS011F', manufacturerName: '_TZ3000_nfnmi125', applicationVersion: 65},
1083
- {modelID: 'TS011F', manufacturerName: '_TZ3000_nfnmi125', applicationVersion: 69},
1084
- {modelID: 'TS011F', manufacturerName: '_TZ3000_ps3dmato', applicationVersion: 68},
1085
- {modelID: 'TS011F', manufacturerName: '_TZ3000_ps3dmato', applicationVersion: 69},
1086
- {modelID: 'TS011F', manufacturerName: '_TZ3000_w0qqde0g', applicationVersion: 64},
1087
- {modelID: 'TS011F', manufacturerName: '_TZ3000_w0qqde0g', applicationVersion: 68},
1088
- {modelID: 'TS011F', manufacturerName: '_TZ3000_w0qqde0g', applicationVersion: 69},
1089
- {modelID: 'TS011F', manufacturerName: '_TZ3000_u5u4cakc', applicationVersion: 69},
1090
- ],
1065
+ fingerprint: [].concat(...TS011Fplugs.map((manufacturerName) => {
1066
+ return [69, 68, 65, 64].map((applicationVersion) => {
1067
+ return {modelID: 'TS011F', manufacturerName, applicationVersion};
1068
+ });
1069
+ })),
1091
1070
  model: 'TS011F_plug_3',
1092
1071
  description: 'Smart plug (with power monitoring by polling)',
1093
1072
  vendor: 'TuYa',
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zigbee-herdsman-converters",
3
- "version": "14.0.347",
3
+ "version": "14.0.348",
4
4
  "lockfileVersion": 1,
5
5
  "requires": true,
6
6
  "dependencies": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zigbee-herdsman-converters",
3
- "version": "14.0.347",
3
+ "version": "14.0.348",
4
4
  "description": "Collection of device converters to be used with zigbee-herdsman",
5
5
  "main": "index.js",
6
6
  "files": [