@homebridge-plugins/homebridge-ewelink 12.3.3

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.
Files changed (113) hide show
  1. package/CHANGELOG.md +1363 -0
  2. package/LICENSE +21 -0
  3. package/README.md +68 -0
  4. package/config.schema.json +1757 -0
  5. package/eslint.config.js +15 -0
  6. package/lib/connection/api.js +508 -0
  7. package/lib/connection/http.js +304 -0
  8. package/lib/connection/lan.js +318 -0
  9. package/lib/connection/ws.js +414 -0
  10. package/lib/device/curtain.js +324 -0
  11. package/lib/device/diffuser.js +473 -0
  12. package/lib/device/fan.js +349 -0
  13. package/lib/device/group.js +106 -0
  14. package/lib/device/humidifier.js +199 -0
  15. package/lib/device/index.js +61 -0
  16. package/lib/device/light-cct.js +333 -0
  17. package/lib/device/light-dimmer.js +257 -0
  18. package/lib/device/light-rgb-cct.js +809 -0
  19. package/lib/device/light-rgb.js +272 -0
  20. package/lib/device/motor.js +363 -0
  21. package/lib/device/outlet-multi.js +417 -0
  22. package/lib/device/outlet-single-inched.js +409 -0
  23. package/lib/device/outlet-single.js +384 -0
  24. package/lib/device/panel.js +382 -0
  25. package/lib/device/rf-bridge.js +321 -0
  26. package/lib/device/rf-button.js +125 -0
  27. package/lib/device/rf-sensor.js +173 -0
  28. package/lib/device/sensor-ambient.js +311 -0
  29. package/lib/device/sensor-contact.js +140 -0
  30. package/lib/device/sensor-temp-humi.js +182 -0
  31. package/lib/device/simulation/blind.js +253 -0
  32. package/lib/device/simulation/cooler.js +312 -0
  33. package/lib/device/simulation/door.js +253 -0
  34. package/lib/device/simulation/doorbell.js +190 -0
  35. package/lib/device/simulation/garage-eachen.js +235 -0
  36. package/lib/device/simulation/garage-four.js +176 -0
  37. package/lib/device/simulation/garage-od-switch.js +36 -0
  38. package/lib/device/simulation/garage-one.js +395 -0
  39. package/lib/device/simulation/garage-two.js +394 -0
  40. package/lib/device/simulation/gate-one.js +327 -0
  41. package/lib/device/simulation/heater.js +389 -0
  42. package/lib/device/simulation/index.js +75 -0
  43. package/lib/device/simulation/light-fan.js +258 -0
  44. package/lib/device/simulation/lock-eachen.js +163 -0
  45. package/lib/device/simulation/lock-one.js +366 -0
  46. package/lib/device/simulation/p-button.js +223 -0
  47. package/lib/device/simulation/purifier.js +289 -0
  48. package/lib/device/simulation/rf-blind.js +192 -0
  49. package/lib/device/simulation/rf-door.js +180 -0
  50. package/lib/device/simulation/rf-window.js +180 -0
  51. package/lib/device/simulation/sensor-hidden.js +105 -0
  52. package/lib/device/simulation/sensor-leak.js +123 -0
  53. package/lib/device/simulation/sensor-visible.js +231 -0
  54. package/lib/device/simulation/sensor.js +300 -0
  55. package/lib/device/simulation/switch-valve.js +351 -0
  56. package/lib/device/simulation/tap-one.js +283 -0
  57. package/lib/device/simulation/tap-two.js +266 -0
  58. package/lib/device/simulation/th-cooler.js +443 -0
  59. package/lib/device/simulation/th-dehumidifier.js +424 -0
  60. package/lib/device/simulation/th-heater.js +449 -0
  61. package/lib/device/simulation/th-humidifier.js +424 -0
  62. package/lib/device/simulation/th-thermostat.js +611 -0
  63. package/lib/device/simulation/tv.js +252 -0
  64. package/lib/device/simulation/valve-four.js +232 -0
  65. package/lib/device/simulation/valve-one.js +345 -0
  66. package/lib/device/simulation/valve-two.js +340 -0
  67. package/lib/device/simulation/window.js +253 -0
  68. package/lib/device/switch-man.js +106 -0
  69. package/lib/device/switch-mate.js +82 -0
  70. package/lib/device/switch-multi.js +411 -0
  71. package/lib/device/switch-single-inched.js +332 -0
  72. package/lib/device/switch-single.js +307 -0
  73. package/lib/device/template.js +43 -0
  74. package/lib/device/thermostat.js +286 -0
  75. package/lib/device/zigbee/index.js +27 -0
  76. package/lib/device/zigbee/light-cct.js +263 -0
  77. package/lib/device/zigbee/light-dimmer.js +148 -0
  78. package/lib/device/zigbee/light-rgb-cct.js +400 -0
  79. package/lib/device/zigbee/motor.js +301 -0
  80. package/lib/device/zigbee/sensor-ambient.js +177 -0
  81. package/lib/device/zigbee/sensor-contact.js +137 -0
  82. package/lib/device/zigbee/sensor-leak.js +119 -0
  83. package/lib/device/zigbee/sensor-motion.js +119 -0
  84. package/lib/device/zigbee/sensor-occupancy.js +119 -0
  85. package/lib/device/zigbee/sensor-smoke.js +96 -0
  86. package/lib/device/zigbee/switch-stateless.js +104 -0
  87. package/lib/device/zigbee/thermostat.js +323 -0
  88. package/lib/fakegato/LICENSE +21 -0
  89. package/lib/fakegato/fakegato-history.js +813 -0
  90. package/lib/fakegato/fakegato-storage.js +108 -0
  91. package/lib/fakegato/fakegato-timer.js +125 -0
  92. package/lib/fakegato/uuid.js +27 -0
  93. package/lib/homebridge-ui/public/index.html +365 -0
  94. package/lib/homebridge-ui/server.js +46 -0
  95. package/lib/index.js +7 -0
  96. package/lib/node-dns-sd/LICENSE +21 -0
  97. package/lib/node-dns-sd/README.md +613 -0
  98. package/lib/node-dns-sd/lib/dns-sd-classes.json +6 -0
  99. package/lib/node-dns-sd/lib/dns-sd-composer.js +83 -0
  100. package/lib/node-dns-sd/lib/dns-sd-parser.js +344 -0
  101. package/lib/node-dns-sd/lib/dns-sd-types.json +52 -0
  102. package/lib/node-dns-sd/lib/dns-sd.js +580 -0
  103. package/lib/platform.js +2156 -0
  104. package/lib/utils/colour.js +552 -0
  105. package/lib/utils/constants.js +589 -0
  106. package/lib/utils/custom-chars.js +33 -0
  107. package/lib/utils/eve-chars.js +130 -0
  108. package/lib/utils/functions.js +42 -0
  109. package/lib/utils/lang-en.js +160 -0
  110. package/lib/utils/lang-fr.js +163 -0
  111. package/lib/utils/lang-th.js +160 -0
  112. package/lib/utils/lang.js +5 -0
  113. package/package.json +75 -0
@@ -0,0 +1,589 @@
1
+ export default {
2
+ defaultConfig: {
3
+ name: 'eWeLink',
4
+ username: '',
5
+ password: '',
6
+ mode: 'auto',
7
+ language: 'en',
8
+ disableDeviceLogging: false,
9
+ disableNoResponse: false,
10
+ ignoredHomes: '',
11
+ countryCode: '+44',
12
+ httpHost: 'eu-apia.coolkit.cc',
13
+ apiPort: 0,
14
+ singleDevices: [],
15
+ multiDevices: [],
16
+ lightDevices: [],
17
+ thDevices: [],
18
+ fanDevices: [],
19
+ sensorDevices: [],
20
+ bridgeSensors: [],
21
+ platform: 'eWeLink',
22
+ },
23
+
24
+ defaultValues: {
25
+ adaptiveLightingShift: 0,
26
+ apiPort: 0,
27
+ brightnessStep: 1,
28
+ curtainType: 'buttons',
29
+ deviceType: 'button',
30
+ httpHost: 'eu-apia.coolkit.cc',
31
+ humidityOffset: 0,
32
+ inUsePowerThreshold: 0,
33
+ language: 'en',
34
+ lowBattThreshold: 25,
35
+ maxTarget: 30,
36
+ minTarget: 10,
37
+ mode: 'auto',
38
+ offset: 0,
39
+ operationTime: 100,
40
+ operationTimeDown: 100,
41
+ sensorTimeDifference: 60,
42
+ sensorTimeLength: 60,
43
+ sensorWebHook: '',
44
+ showAs: 'default',
45
+ showAsMotor: 'blind',
46
+ targetTempThreshold: 0,
47
+ },
48
+
49
+ minValues: {
50
+ adaptiveLightingShift: -1,
51
+ apiPort: 0,
52
+ brightnessStep: 1,
53
+ inUsePowerThreshold: 0,
54
+ lowBattThreshold: 5,
55
+ maxTarget: 1,
56
+ minTarget: 0,
57
+ operationTime: 20,
58
+ operationTimeDown: 20,
59
+ sensorTimeDifference: 5,
60
+ sensorTimeLength: 1,
61
+ targetTempThreshold: 0,
62
+ },
63
+
64
+ appId: 'Uw83EKZFxdif7XFXEsrpduz5YyjP7nTl',
65
+
66
+ appSecret: 'mXLOjea0woSMvK9gw7Fjsy7YlFO4iSu6',
67
+
68
+ httpRetryCodes: ['ENOTFOUND', 'ETIMEDOUT', 'EAI_AGAIN', 'ECONNABORTED'],
69
+
70
+ allowed: {
71
+ language: ['en', 'fr', 'th'],
72
+ httpHosts: [
73
+ 'auto',
74
+ 'eu-apia.coolkit.cc',
75
+ 'us-apia.coolkit.cc',
76
+ 'as-apia.coolkit.cc',
77
+ 'cn-apia.coolkit.cn',
78
+ ],
79
+ mode: ['auto', 'wan', 'lan'],
80
+ singleDevices: [
81
+ 'label',
82
+ 'deviceId',
83
+ 'ignoreDevice',
84
+ 'deviceModel',
85
+ 'showAs',
86
+ 'showAsMotor',
87
+ 'showAsEachen',
88
+ 'inUsePowerThreshold',
89
+ 'disableTimer',
90
+ 'temperatureSource',
91
+ 'isInched',
92
+ 'operationTime',
93
+ 'operationTimeDown',
94
+ 'sensorId',
95
+ 'hideSensor',
96
+ 'obstructId',
97
+ 'sensorType',
98
+ 'ipAddress',
99
+ ],
100
+ multiDevices: [
101
+ 'label',
102
+ 'deviceId',
103
+ 'ignoreDevice',
104
+ 'deviceModel',
105
+ 'showAs',
106
+ 'showAsMotor',
107
+ 'hideChannels',
108
+ 'inUsePowerThreshold',
109
+ 'disableTimer',
110
+ 'inchChannels',
111
+ 'sensorType',
112
+ 'operationTime',
113
+ 'operationTimeDown',
114
+ 'sensorId',
115
+ 'hideSensor',
116
+ 'obstructId',
117
+ 'ipAddress',
118
+ ],
119
+ lightDevices: [
120
+ 'label',
121
+ 'deviceId',
122
+ 'ignoreDevice',
123
+ 'deviceModel',
124
+ 'showAs',
125
+ 'brightnessStep',
126
+ 'adaptiveLightingShift',
127
+ 'offlineAsOff',
128
+ 'ipAddress',
129
+ ],
130
+ thDevices: [
131
+ 'label',
132
+ 'deviceId',
133
+ 'ignoreDevice',
134
+ 'deviceModel',
135
+ 'showAs',
136
+ 'showHeatCool',
137
+ 'hideSwitch',
138
+ 'offset',
139
+ 'offsetFactor',
140
+ 'humidityOffset',
141
+ 'humidityOffsetFactor',
142
+ 'targetTempThreshold',
143
+ 'minTarget',
144
+ 'maxTarget',
145
+ 'ipAddress',
146
+ ],
147
+ fanDevices: [
148
+ 'label',
149
+ 'deviceId',
150
+ 'ignoreDevice',
151
+ 'deviceModel',
152
+ 'hideLight',
153
+ 'ipAddress',
154
+ ],
155
+ sensorDevices: [
156
+ 'label',
157
+ 'deviceId',
158
+ 'ignoreDevice',
159
+ 'deviceModel',
160
+ 'showAs',
161
+ 'lowBattThreshold',
162
+ 'offset',
163
+ 'offsetFactor',
164
+ 'humidityOffset',
165
+ 'humidityOffsetFactor',
166
+ 'hideLongDouble',
167
+ 'scaleBattery',
168
+ 'sensorTimeDifference',
169
+ ],
170
+ rfDevices: [
171
+ 'label',
172
+ 'deviceId',
173
+ 'ignoreDevice',
174
+ 'resetOnStartup',
175
+ 'ipAddress',
176
+ ],
177
+ models: {
178
+ singleDevices: ['single', 't', 'pow', 'iw', 's', 'micro', 'slampher', 'gddc5', 'king', 'zb'],
179
+ multiDevices: ['dual_dualr2', 'dualr3_switch', 'dualr3_motor', '4ch', 't'],
180
+ lightDevices: [
181
+ 'd1',
182
+ 'b1',
183
+ 'l1',
184
+ 'bulbB02BA60',
185
+ 'bulbB02FA60',
186
+ 'bulbB02FST64',
187
+ 'bulbB05BA60',
188
+ 'bulbB05BLA19',
189
+ 'king',
190
+ 'zl_d',
191
+ 'zl_dc',
192
+ ],
193
+ thDevices: ['th', 'panel', 'sc', 'hc'],
194
+ fanDevices: ['ifan'],
195
+ sensorDevices: ['dw', 'snzb01', 'snzb02', 'snzb03', 'snzb04', 'leak'],
196
+ rfDevices: [],
197
+ },
198
+ sensorType: [
199
+ 'water',
200
+ 'smoke',
201
+ 'co',
202
+ 'co2',
203
+ 'contact',
204
+ 'occupancy',
205
+ 'motion',
206
+ 'p_button',
207
+ 'doorbell',
208
+ ],
209
+ showAs: [
210
+ 'audio',
211
+ 'blind',
212
+ 'box',
213
+ 'cooler',
214
+ 'default',
215
+ 'dehumidifier',
216
+ 'door',
217
+ 'doorbell',
218
+ 'fan',
219
+ 'garage',
220
+ 'garage_eachen',
221
+ 'garage_four',
222
+ 'garage_two',
223
+ 'gate',
224
+ 'heater',
225
+ 'humidifier',
226
+ 'lock',
227
+ 'outlet',
228
+ 'purifier',
229
+ 'p_button',
230
+ 'sensor',
231
+ 'sensor_leak',
232
+ 'stick',
233
+ 'switch_valve',
234
+ 'tap',
235
+ 'tap_two',
236
+ 'thermostat',
237
+ 'valve',
238
+ 'valve_two',
239
+ 'valve_four',
240
+ 'window',
241
+ ],
242
+ showAsMotor: ['blind', 'door', 'garage', 'window'],
243
+ showAsEachen: ['garage', 'lock'],
244
+ curtainType: ['buttons', 'blind', 'door', 'window'],
245
+ deviceType: ['button', 'curtain', 'sensor'],
246
+ },
247
+
248
+ devices: {
249
+ lan: [
250
+ 1,
251
+ 2,
252
+ 3,
253
+ 4,
254
+ 5,
255
+ 6,
256
+ 7,
257
+ 8,
258
+ 9,
259
+ 14,
260
+ 15,
261
+ 28,
262
+ 32,
263
+ 34,
264
+ 44,
265
+ 77,
266
+ 78,
267
+ 112,
268
+ 113,
269
+ 114,
270
+ 126,
271
+ 133,
272
+ 136,
273
+ 138,
274
+ 160,
275
+ 161,
276
+ 162,
277
+ 165,
278
+ 181,
279
+ 182,
280
+ 190,
281
+ 191,
282
+ 209,
283
+ 210,
284
+ 211,
285
+ 212,
286
+ ],
287
+ switchSingle: [1, 6, 14, 24, 27, 1009, 1256, 7004, 7005],
288
+ switchSCM: [77, 78, 81, 107, 112, 138, 160, 191, 209],
289
+ switchSCMPower: [182, 190],
290
+ switchSinglePower: [5, 32],
291
+ switchMulti: [
292
+ 2,
293
+ 3,
294
+ 4,
295
+ 7,
296
+ 8,
297
+ 9,
298
+ 29,
299
+ 30,
300
+ 31,
301
+ 41,
302
+ 82,
303
+ 83,
304
+ 84,
305
+ 113,
306
+ 114,
307
+ 139,
308
+ 140,
309
+ 141,
310
+ 161,
311
+ 162,
312
+ 210,
313
+ 211,
314
+ 212,
315
+ 2256,
316
+ 3256,
317
+ 4256,
318
+ ],
319
+ switchMultiPower: [126, 165],
320
+ switchMate: [177],
321
+ switchMan: [174],
322
+ lightDimmer: [36, 44, 57],
323
+ lightRGB: [22],
324
+ lightCCT: [103],
325
+ lightRGBCCT: [33, 59, 104, 135, 136, 137, 173],
326
+ curtain: [11, 67],
327
+ sensorContact: [102, 154],
328
+ sensorAmbient: [15, 181],
329
+ sensorTempHumi: [18],
330
+ thermostat: [127],
331
+ panel: [133, 195],
332
+ fan: [34],
333
+ humidifier: [19],
334
+ diffuser: [25],
335
+ camera: [87],
336
+ rfBridge: [28, 98],
337
+ zbBridge: [66, 128, 168, 243], // 128 not technically Zigbee, but same data structure
338
+ zbSwitchStateless: [1000, 7000],
339
+ zbLightDimmer: [1257],
340
+ zbLightCCT: [1258],
341
+ zbLightRGBCCT: [3258],
342
+ zbMotor: [1514, 7006],
343
+ zbSensorAmbient: [1770, 1771, 7014],
344
+ zbSensorMotion: [2026, 7002],
345
+ zbSensorOccupancy: [7016],
346
+ zbSensorContact: [3026, 7003],
347
+ zbSensorWater: [4026],
348
+ zbSensorSmoke: [5026],
349
+ zbThermostat: [7017],
350
+ group: [5000],
351
+ template: [130], // SPM sub unit
352
+ cannotSupport: [0, 65, 118, 119, 120, 121],
353
+ garageSensors: [102, 154, 3026],
354
+ skipUpdateRequest: [1000],
355
+ },
356
+
357
+ paramsToKeep: [
358
+ 'actionTime',
359
+ 'actPow_',
360
+ 'battery',
361
+ 'bright',
362
+ 'brightness',
363
+ 'cctBrightness',
364
+ 'channel',
365
+ 'cmd',
366
+ 'color',
367
+ 'colorB',
368
+ 'colorG',
369
+ 'colorMode',
370
+ 'colorR',
371
+ 'colorTemp',
372
+ 'config',
373
+ 'curPercent',
374
+ 'current',
375
+ 'currentHumidity',
376
+ 'currentTemperature',
377
+ 'current_',
378
+ 'currLocation',
379
+ 'curTargetTemp',
380
+ 'fan',
381
+ 'hue',
382
+ 'human',
383
+ 'humidity',
384
+ 'key',
385
+ 'light',
386
+ 'lightbright',
387
+ 'lightswitch',
388
+ 'lightRcolor',
389
+ 'lightGcolor',
390
+ 'lightBcolor',
391
+ 'location',
392
+ 'lock',
393
+ 'ltype',
394
+ 'mainSwitch',
395
+ 'mode',
396
+ 'motion',
397
+ 'motorTurn',
398
+ 'openPercent',
399
+ 'online',
400
+ 'outlet',
401
+ 'per',
402
+ 'power',
403
+ 'op',
404
+ 'rfChl',
405
+ 'rfList',
406
+ 'rfTrig',
407
+ 'rgbBrightness',
408
+ 'saturation',
409
+ 'setclose',
410
+ 'smoke',
411
+ 'speed',
412
+ 'state',
413
+ 'switch',
414
+ 'switches',
415
+ 'targetTemp',
416
+ 'temperature',
417
+ 'tempScale',
418
+ 'trigTime',
419
+ 'type',
420
+ 'voltage',
421
+ 'voltage_',
422
+ 'water',
423
+ 'white',
424
+ 'workMode',
425
+ 'workState',
426
+ 'zyx_mode',
427
+ ],
428
+
429
+ // Ref: https://github.com/CoolKit-Technologies/eWeLink-API/blob/main/en/UIIDProtocol.md
430
+ supportedDevices: {
431
+ 1: 1, // "SOCKET" (MINI, BASIC, S20, S26, S55, RF, RF_R2)
432
+ 2: 2, // "SOCKET_2"
433
+ 3: 3, // "SOCKET_3"
434
+ 4: 4, // "SOCKET_4"
435
+ 5: 1, // "SOCKET_POWER" (Sonoff Pow)
436
+ 6: 1, // "SWITCH" (T1 1C, TX1C, G1)
437
+ 7: 2, // "SWITCH_2" (T1 2C, TX2C)
438
+ 8: 3, // "SWITCH_3" (T1 3C, TX3C)
439
+ 9: 4, // "SWITCH_4"
440
+ 11: 1, // "CURTAIN" (King Q4 Cover)
441
+ 14: 1, // "SWITCH_CHANGE" (Sonoff SV)
442
+ 15: 1, // "THERMOSTAT" (TH10, TH16)
443
+ 18: 1, // "SENSORS_CENTER" (Sonoff SC)
444
+ 19: 1, // "HUMIDIFIER"
445
+ 22: 1, // "RGB_BALL_LIGHT" (B1, B1_R2)
446
+ 24: 1, // "GSM_SOCKET"
447
+ 25: 1, // "AROMATHERAPY" (Diffuser, Komeito 1515-X)
448
+ 27: 1, // "GSM_UNLIMIT_SOCKET"
449
+ 28: 1, // "RF_BRIDGE" (RFBridge, RF_Bridge)
450
+ 29: 2, // "GSM_SOCKET_2"
451
+ 30: 3, // "GSM_SOCKET_3"
452
+ 31: 4, // "GSM_SOCKET_4"
453
+ 32: 1, // "POWER_DETECTION_SOCKET" (Pow_R2, S31, IW101)
454
+ 33: 1, // "LIGHT_BELT",
455
+ 34: 4, // "FAN_LIGHT" (iFan02, iFan)
456
+ 36: 1, // "SINGLE_CHANNEL_DIMMER_SWITCH" (KING-M4)
457
+ 41: 4, // "CUN_YOU_DOOR"
458
+ 44: 1, // "SNOFF_LIGHT" (D1)
459
+ 57: 1, // "MONOCHROMATIC_BALL_LIGHT" (mosquito killer)
460
+ 59: 1, // "MUSIC_LIGHT_BELT" (L1)
461
+ 66: 1, // "ZIGBEE_MAIN_DEVICE"
462
+ 67: 1, // "RollingDoor"
463
+ 77: 4, // "SINGLE_SOCKET_MULTIPLE" (1 socket device using data structure of four)
464
+ 78: 4, // "SINGLE_SWITCH_MULTIPLE" (1 switch device using data structure of four
465
+ 81: 1, // "GSM_SOCKET_NO_FLOW" (1 socket device using data structure of four)
466
+ 82: 2, // "GSM_SOCKET_2_NO_FLOW"
467
+ 83: 3, // "GSM_SOCKET_3_NO_FLOW"
468
+ 84: 4, // "GSM_SOCKET_4_NO_FLOW"
469
+ 87: 1, // "EWELINK_IOT_CAMERA" (GK-200MP2B)
470
+ 98: 1, // "DOORBELL_RFBRIDGE"
471
+ 102: 1, // "DOOR_MAGNETIC" (OPL-DMA, DW2)
472
+ 103: 1, // "WOTEWODE_TEM_LIGHT" (B02-F)
473
+ 104: 1, // "WOTEWODE_RGB_TEM_LIGHT"
474
+ 107: 1, // "GSM_SOCKET_NO_FLOW"
475
+ 112: 1,
476
+ 113: 2,
477
+ 114: 3,
478
+ 126: 2, // "DUALR3"
479
+ 127: 1, // "GTTA127"
480
+ 128: 1, // SPM Main Unit (same data structure as zigbee bridge)
481
+ 130: 1, // SPM Sub Unit
482
+ 133: 1, // "NSPANEL"
483
+ 135: 1, // ""
484
+ 136: 1, // RGB Five-Color Light_Support 2.4G eWeLink-Remote
485
+ 137: 1, // "L2/SPIDER CONTROLLER"
486
+ 138: 1, // "MINIR3?" (WOOLLEY WLAN SMART SWITCH)
487
+ 139: 2, // "MINIR3?"
488
+ 140: 3, // "MINIR3?"
489
+ 141: 4, // "MINIR3?"
490
+ 154: 1, // DW2-Wi-Fi-L
491
+ 160: 1, // "SwitchMan Smart Wall Switch-M5 - 1 Gang"
492
+ 161: 2, // "SwitchMan Smart Wall Switch-M5 - 2 Gang"
493
+ 162: 3, // "SwitchMan Smart Wall Switch-M5 - 3 Gang"
494
+ 165: 2, // "DUALR3 Lite"
495
+ 168: 1, // Zigbee Bridge Pro
496
+ 173: 1, // Sonoff L3
497
+ 174: 1, // SwitchMan R5 - 6 Gang
498
+ 177: 1, // Switch Mate
499
+ 181: 1, // Sonoff TH Elite THR316 and THR320
500
+ 182: 1, // Power Detection Plug Overload Alarm-Multi-Channel Protocols (S40)
501
+ 190: 1, // POWR316 POWR316D POWR320D
502
+ 191: 1, // Like the above 190
503
+ 195: 1, // NSPANEL Pro
504
+ 209: 1, // Sonoff Ultimate Switch T5-1C-86
505
+ 210: 2, // Sonoff Ultimate Switch T5-2C-86
506
+ 211: 3, // Sonoff Ultimate Switch T5-3C-86
507
+ 212: 4, // Sonoff Ultimate Switch T5-4C-86
508
+ 243: 1, // Zigbee Bridge Ultra
509
+ 1000: 1, // "zigbee_ON_OFF_SWITCH_1000" (button device)
510
+ 1009: 1, // "" (Some sort of single switch device)
511
+ 1256: 1, // "ZIGBEE_SINGLE_SWITCH"
512
+ 1257: 1, // "ZigbeeWhiteLight"
513
+ 1258: 1,
514
+ 1514: 1, // Graywind Zigbee Shades
515
+ 1770: 1, // "ZIGBEE_TEMPERATURE_SENSOR"
516
+ 1771: 1, // "" some duplicate of the above https://github.com/homebridge-plugins/homebridge-ewelink/issues/494
517
+ 2026: 1, // "ZIGBEE_MOBILE_SENSOR"
518
+ 2256: 2, // "ZIGBEE_SWITCH_2"
519
+ 3026: 1, // "ZIGBEE_DOOR_AND_WINDOW_SENSOR"
520
+ 3256: 3, // "ZIGBEE_SWITCH_3"
521
+ 3258: 1, // "ZigbeeRGBLight"
522
+ 4026: 1, // "ZIGBEE_WATER_SENSOR"
523
+ 4256: 4, // "ZIGBEE_SWITCH_4"
524
+ 5000: 1, // Custom uiid for groups
525
+ 5026: 1, // Zigbee Smoke Sensor
526
+ 7000: 1, // Zigbee Button?
527
+ 7002: 1, // Zigbee Human Body Sensor_Support OTA
528
+ 7003: 1, // Zigbee Door Magnet_Support OTA
529
+ 7004: 1, // Zigbee Single-Channel Switch ­_Support OTA
530
+ 7005: 1, // Some switch, not entirely sure
531
+ 7006: 1, // Zigbee Curtain_Support OTA
532
+ 7014: 1, // some sensor https://github.com/homebridge-plugins/homebridge-ewelink/issues/494
533
+ 7016: 1, // https://sonoff.tech/product/gateway-and-sensors/snzb-06p/
534
+ 7017: 1, // https://github.com/homebridge-plugins/homebridge-ewelink/issues/518
535
+ },
536
+
537
+ cannotSupportDevices: {
538
+ 0: 0, // Placeholder for devices reported without a uiid (should be a never case)
539
+ 65: 0, // "CustomCamera" (eWeLink Camera App)
540
+ 118: 0, // "2.4G-1C" (eWeLink 2.4G Remote)
541
+ 119: 0, // "2.4G-2C" (eWeLink 2.4G Remote)
542
+ 120: 0, // "2.4G-3C" (eWeLink 2.4G Remote)
543
+ 121: 0, // "2.4G-6C" (eWeLink 2.4G Remote)
544
+ 147: 0, // NSPanel linked device (bulb) but no controls available
545
+ },
546
+
547
+ yetToSupportDevices: {
548
+ 10: 0, // "OSPF"
549
+ 12: 0, // "EW-RE"
550
+ 13: 0, // "FIREPLACE"
551
+ 16: 0, // "COLD_WARM_LED"
552
+ 17: 0, // "THREE_GEAR_FAN"
553
+ 23: 0, // "NEST_THERMOSTAT"
554
+ 26: 0, // "RuiMiTeWenKongQi"
555
+ 35: 0, // "EZVIZ_CAMERA",
556
+ 38: 0, // "HOME_KIT_BRIDGE",
557
+ 40: 0, // "FUJIN_OPS"
558
+ 42: 0, // "SMART_BEDSIDE_AND_NEW_RGB_BALL_LIGHT"
559
+ 43: 0, // "?"
560
+ 45: 0, // "DOWN_CEILING_LIGHT"
561
+ 46: 0, // "AIR_CLEANER"
562
+ 49: 0, // "MACHINE_BED"
563
+ 51: 0, // "COLD_WARM_DESK_LIGHT"
564
+ 52: 0, // "DOUBLE_COLOR_DEMO_LIGHT"
565
+ 53: 0, // "ELECTRIC_FAN_WITH_LAMP"
566
+ 55: 0, // "SWEEPING_ROBOT"
567
+ 56: 0, // "RGB_BALL_LIGHT_4"
568
+ 60: 0, // "NEW_HUMIDIFIER"
569
+ 61: 0, // "KAI_WEI_ROUTER"
570
+ 62: 0, // "MEARICAMERA"
571
+ 64: 0, // "HeatingTable"
572
+ 68: 0, // "KOOCHUWAH"
573
+ 69: 0, // "ATMOSPHERE_LAMP"
574
+ 76: 0, // "YI_GE_ER_LAMP"
575
+ 79: 0, // "CHRISTMAS_LIGHT"
576
+ 80: 0, // "HANYUAN_AIR_CONDITION"
577
+ 86: 0, // "CLEAR_BOOT"
578
+ 88: 0, // "YK_INFRARED"
579
+ 89: 0, // "SMART_OPEN_MACHINE"
580
+ 90: 0, // "GSM_RFBridge"
581
+ 91: 0, // "ROLLING_DOOR_91"
582
+ 93: 0, // "HTHD_AIR_CLEANER"
583
+ 94: 0, // "YIAN_ELECTRIC_PROTECT"
584
+ 109: 0, // "YK_INFRARED_2"
585
+ 1001: 0, // "BLADELESS_FAN"
586
+ 1002: 0, // "NEW_HUMIDIFIER"
587
+ 1003: 0, // "WARM_AIR_BLOWER"
588
+ },
589
+ }
@@ -0,0 +1,33 @@
1
+ import { inherits } from 'node:util'
2
+
3
+ export default class {
4
+ constructor(api) {
5
+ this.hapServ = api.hap.Service
6
+ this.hapChar = api.hap.Characteristic
7
+ this.uuids = {
8
+ invertSwitch: 'E965F001-079E-48FF-8F27-9C2605A29F52',
9
+ festiveScene: 'E965F002-079E-48FF-8F27-9C2605A29F52',
10
+ }
11
+ const self = this
12
+ this.InvertSwitch = function InvertSwitch() {
13
+ self.hapChar.call(this, 'Invert Switch', self.uuids.invertSwitch)
14
+ this.setProps({
15
+ format: api.hap.Formats.BOOL,
16
+ perms: [api.hap.Perms.READ, api.hap.Perms.WRITE, api.hap.Perms.NOTIFY],
17
+ })
18
+ this.value = this.getDefaultValue()
19
+ }
20
+ this.FestiveScene = function FestiveScene() {
21
+ self.hapChar.call(this, 'Festive Scene', self.uuids.festiveScene)
22
+ this.setProps({
23
+ format: api.hap.Formats.BOOL,
24
+ perms: [api.hap.Perms.READ, api.hap.Perms.WRITE, api.hap.Perms.NOTIFY],
25
+ })
26
+ this.value = this.getDefaultValue()
27
+ }
28
+ inherits(this.InvertSwitch, this.hapChar)
29
+ inherits(this.FestiveScene, this.hapChar)
30
+ this.InvertSwitch.UUID = this.uuids.invertSwitch
31
+ this.FestiveScene.UUID = this.uuids.festiveScene
32
+ }
33
+ }