@switchbot/homebridge-switchbot 3.5.0-beta.9 → 3.5.1-beta.0

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 (177) hide show
  1. package/.vscode/settings.json +4 -1
  2. package/CHANGELOG.md +4 -1
  3. package/config.schema.json +164 -22
  4. package/dist/device/blindtilt.d.ts +21 -96
  5. package/dist/device/blindtilt.d.ts.map +1 -1
  6. package/dist/device/blindtilt.js +457 -866
  7. package/dist/device/blindtilt.js.map +1 -1
  8. package/dist/device/bot.d.ts +27 -72
  9. package/dist/device/bot.d.ts.map +1 -1
  10. package/dist/device/bot.js +851 -913
  11. package/dist/device/bot.js.map +1 -1
  12. package/dist/device/ceilinglight.d.ts +15 -69
  13. package/dist/device/ceilinglight.d.ts.map +1 -1
  14. package/dist/device/ceilinglight.js +316 -742
  15. package/dist/device/ceilinglight.js.map +1 -1
  16. package/dist/device/colorbulb.d.ts +15 -76
  17. package/dist/device/colorbulb.d.ts.map +1 -1
  18. package/dist/device/colorbulb.js +380 -833
  19. package/dist/device/colorbulb.js.map +1 -1
  20. package/dist/device/contact.d.ts +14 -66
  21. package/dist/device/contact.d.ts.map +1 -1
  22. package/dist/device/contact.js +267 -602
  23. package/dist/device/contact.js.map +1 -1
  24. package/dist/device/curtain.d.ts +18 -89
  25. package/dist/device/curtain.d.ts.map +1 -1
  26. package/dist/device/curtain.js +469 -897
  27. package/dist/device/curtain.js.map +1 -1
  28. package/dist/device/device.d.ts +76 -0
  29. package/dist/device/device.d.ts.map +1 -0
  30. package/dist/device/device.js +846 -0
  31. package/dist/device/device.js.map +1 -0
  32. package/dist/device/fan.d.ts +63 -0
  33. package/dist/device/fan.d.ts.map +1 -0
  34. package/dist/device/fan.js +645 -0
  35. package/dist/device/fan.js.map +1 -0
  36. package/dist/device/hub.d.ts +19 -58
  37. package/dist/device/hub.d.ts.map +1 -1
  38. package/dist/device/hub.js +304 -640
  39. package/dist/device/hub.js.map +1 -1
  40. package/dist/device/humidifier.d.ts +11 -66
  41. package/dist/device/humidifier.d.ts.map +1 -1
  42. package/dist/device/humidifier.js +300 -710
  43. package/dist/device/humidifier.js.map +1 -1
  44. package/dist/device/iosensor.d.ts +12 -64
  45. package/dist/device/iosensor.d.ts.map +1 -1
  46. package/dist/device/iosensor.js +225 -643
  47. package/dist/device/iosensor.js.map +1 -1
  48. package/dist/device/lightstrip.d.ts +12 -70
  49. package/dist/device/lightstrip.d.ts.map +1 -1
  50. package/dist/device/lightstrip.js +371 -742
  51. package/dist/device/lightstrip.js.map +1 -1
  52. package/dist/device/lock.d.ts +17 -63
  53. package/dist/device/lock.d.ts.map +1 -1
  54. package/dist/device/lock.js +309 -642
  55. package/dist/device/lock.js.map +1 -1
  56. package/dist/device/meter.d.ts +15 -64
  57. package/dist/device/meter.d.ts.map +1 -1
  58. package/dist/device/meter.js +223 -638
  59. package/dist/device/meter.js.map +1 -1
  60. package/dist/device/meterplus.d.ts +15 -65
  61. package/dist/device/meterplus.d.ts.map +1 -1
  62. package/dist/device/meterplus.js +216 -644
  63. package/dist/device/meterplus.js.map +1 -1
  64. package/dist/device/motion.d.ts +12 -69
  65. package/dist/device/motion.d.ts.map +1 -1
  66. package/dist/device/motion.js +209 -588
  67. package/dist/device/motion.js.map +1 -1
  68. package/dist/device/plug.d.ts +10 -57
  69. package/dist/device/plug.d.ts.map +1 -1
  70. package/dist/device/plug.js +141 -532
  71. package/dist/device/plug.js.map +1 -1
  72. package/dist/device/robotvacuumcleaner.d.ts +13 -63
  73. package/dist/device/robotvacuumcleaner.d.ts.map +1 -1
  74. package/dist/device/robotvacuumcleaner.js +252 -609
  75. package/dist/device/robotvacuumcleaner.js.map +1 -1
  76. package/dist/device/waterdetector.d.ts +11 -63
  77. package/dist/device/waterdetector.d.ts.map +1 -1
  78. package/dist/device/waterdetector.js +179 -521
  79. package/dist/device/waterdetector.js.map +1 -1
  80. package/dist/homebridge-ui/public/index.html +22 -16
  81. package/dist/homebridge-ui/server.js +1 -1
  82. package/dist/homebridge-ui/server.js.map +1 -1
  83. package/dist/index.d.ts +1 -1
  84. package/dist/index.d.ts.map +1 -1
  85. package/dist/index.js +2 -2
  86. package/dist/index.js.map +1 -1
  87. package/dist/irdevice/airconditioner.d.ts +10 -50
  88. package/dist/irdevice/airconditioner.d.ts.map +1 -1
  89. package/dist/irdevice/airconditioner.js +337 -482
  90. package/dist/irdevice/airconditioner.js.map +1 -1
  91. package/dist/irdevice/airpurifier.d.ts +8 -39
  92. package/dist/irdevice/airpurifier.d.ts.map +1 -1
  93. package/dist/irdevice/airpurifier.js +108 -333
  94. package/dist/irdevice/airpurifier.js.map +1 -1
  95. package/dist/irdevice/camera.d.ts +7 -36
  96. package/dist/irdevice/camera.d.ts.map +1 -1
  97. package/dist/irdevice/camera.js +47 -299
  98. package/dist/irdevice/camera.js.map +1 -1
  99. package/dist/irdevice/fan.d.ts +7 -43
  100. package/dist/irdevice/fan.d.ts.map +1 -1
  101. package/dist/irdevice/fan.js +95 -364
  102. package/dist/irdevice/fan.js.map +1 -1
  103. package/dist/irdevice/irdevice.d.ts +46 -0
  104. package/dist/irdevice/irdevice.d.ts.map +1 -0
  105. package/dist/irdevice/irdevice.js +393 -0
  106. package/dist/irdevice/irdevice.js.map +1 -0
  107. package/dist/irdevice/light.d.ts +12 -45
  108. package/dist/irdevice/light.d.ts.map +1 -1
  109. package/dist/irdevice/light.js +121 -376
  110. package/dist/irdevice/light.js.map +1 -1
  111. package/dist/irdevice/other.d.ts +19 -48
  112. package/dist/irdevice/other.d.ts.map +1 -1
  113. package/dist/irdevice/other.js +441 -584
  114. package/dist/irdevice/other.js.map +1 -1
  115. package/dist/irdevice/tv.d.ts +8 -40
  116. package/dist/irdevice/tv.d.ts.map +1 -1
  117. package/dist/irdevice/tv.js +94 -353
  118. package/dist/irdevice/tv.js.map +1 -1
  119. package/dist/irdevice/vacuumcleaner.d.ts +7 -36
  120. package/dist/irdevice/vacuumcleaner.d.ts.map +1 -1
  121. package/dist/irdevice/vacuumcleaner.js +48 -299
  122. package/dist/irdevice/vacuumcleaner.js.map +1 -1
  123. package/dist/irdevice/waterheater.d.ts +7 -36
  124. package/dist/irdevice/waterheater.d.ts.map +1 -1
  125. package/dist/irdevice/waterheater.js +50 -305
  126. package/dist/irdevice/waterheater.js.map +1 -1
  127. package/dist/platform.d.ts +22 -8
  128. package/dist/platform.d.ts.map +1 -1
  129. package/dist/platform.js +342 -191
  130. package/dist/platform.js.map +1 -1
  131. package/dist/settings.d.ts +66 -18
  132. package/dist/settings.d.ts.map +1 -1
  133. package/dist/settings.js +16 -552
  134. package/dist/settings.js.map +1 -1
  135. package/dist/utils.d.ts +95 -0
  136. package/dist/utils.d.ts.map +1 -1
  137. package/dist/utils.js +657 -1
  138. package/dist/utils.js.map +1 -1
  139. package/eslint.config.js +96 -0
  140. package/package.json +20 -16
  141. package/src/custom.d.ts +2 -1
  142. package/src/device/blindtilt.ts +488 -937
  143. package/src/device/bot.ts +907 -1016
  144. package/src/device/ceilinglight.ts +330 -798
  145. package/src/device/colorbulb.ts +394 -904
  146. package/src/device/contact.ts +298 -637
  147. package/src/device/curtain.ts +496 -954
  148. package/src/device/device.ts +872 -0
  149. package/src/device/fan.ts +692 -0
  150. package/src/device/hub.ts +338 -671
  151. package/src/device/humidifier.ts +330 -777
  152. package/src/device/iosensor.ts +258 -671
  153. package/src/device/lightstrip.ts +394 -809
  154. package/src/device/lock.ts +345 -700
  155. package/src/device/meter.ts +256 -666
  156. package/src/device/meterplus.ts +248 -672
  157. package/src/device/motion.ts +234 -622
  158. package/src/device/plug.ts +152 -572
  159. package/src/device/robotvacuumcleaner.ts +273 -653
  160. package/src/device/waterdetector.ts +198 -549
  161. package/src/homebridge-ui/public/index.html +22 -16
  162. package/src/homebridge-ui/server.ts +1 -1
  163. package/src/index.ts +4 -3
  164. package/src/irdevice/airconditioner.ts +368 -540
  165. package/src/irdevice/airpurifier.ts +134 -369
  166. package/src/irdevice/camera.ts +60 -324
  167. package/src/irdevice/fan.ts +111 -392
  168. package/src/irdevice/irdevice.ts +406 -0
  169. package/src/irdevice/light.ts +159 -425
  170. package/src/irdevice/other.ts +509 -661
  171. package/src/irdevice/tv.ts +123 -388
  172. package/src/irdevice/vacuumcleaner.ts +61 -324
  173. package/src/irdevice/waterheater.ts +63 -333
  174. package/src/platform.ts +395 -259
  175. package/src/settings.ts +120 -610
  176. package/src/utils.ts +661 -1
  177. package/src/device/waterdetector.json +0 -11
@@ -1,153 +1,113 @@
1
- import { request } from 'undici';
2
- import { Devices } from '../settings.js';
1
+ /* Copyright(C) 2021-2024, donavanbecker (https://github.com/donavanbecker). All rights reserved.
2
+ *
3
+ * fan.ts: @switchbot/homebridge-switchbot.
4
+ */
5
+ import { irdeviceBase } from './irdevice.js';
3
6
  /**
4
7
  * Platform Accessory
5
8
  * An instance of this class is created for each accessory your platform registers
6
9
  * Each accessory may expose multiple services of different service types.
7
10
  */
8
- export class Fan {
11
+ export class IRFan extends irdeviceBase {
9
12
  platform;
10
- accessory;
11
- device;
12
- api;
13
- log;
14
- config;
15
- hap;
16
13
  // Services
17
- fanService;
18
- // Characteristic Values
19
- Active;
20
- SwingMode;
21
- RotationSpeed;
22
- FirmwareRevision;
23
- ActiveIdentifier;
24
- RotationDirection;
25
- // Config
26
- minStep;
27
- minValue;
28
- maxValue;
29
- deviceLogging;
30
- disablePushOn;
31
- disablePushOff;
14
+ Fan;
32
15
  constructor(platform, accessory, device) {
16
+ super(platform, accessory, device);
33
17
  this.platform = platform;
34
- this.accessory = accessory;
35
- this.device = device;
36
- this.api = this.platform.api;
37
- this.log = this.platform.log;
38
- this.config = this.platform.config;
39
- this.hap = this.api.hap;
40
- // default placeholders
41
- this.deviceLogs(device);
42
- this.deviceContext();
43
- this.disablePushOnChanges(device);
44
- this.disablePushOffChanges(device);
45
- this.deviceConfig(device);
46
- // set accessory information
47
- accessory
48
- .getService(this.hap.Service.AccessoryInformation)
49
- .setCharacteristic(this.hap.Characteristic.Manufacturer, 'SwitchBot')
50
- .setCharacteristic(this.hap.Characteristic.Model, device.remoteType)
51
- .setCharacteristic(this.hap.Characteristic.SerialNumber, device.deviceId)
52
- .setCharacteristic(this.hap.Characteristic.FirmwareRevision, accessory.context.FirmwareRevision);
53
- // get the Television service if it exists, otherwise create a new Television service
54
- // you can create multiple services for each accessory
55
- const fanService = `${accessory.displayName} Fan`;
56
- (this.fanService = accessory.getService(this.hap.Service.Fanv2)
57
- || accessory.addService(this.hap.Service.Fanv2)), fanService;
58
- this.fanService.setCharacteristic(this.hap.Characteristic.Name, accessory.displayName);
59
- if (!this.fanService.testCharacteristic(this.hap.Characteristic.ConfiguredName)) {
60
- this.fanService.addCharacteristic(this.hap.Characteristic.ConfiguredName, accessory.displayName);
61
- }
62
- // handle on / off events using the Active characteristic
63
- this.fanService.getCharacteristic(this.hap.Characteristic.Active).onSet(this.ActiveSet.bind(this));
18
+ // Initialize Switch Service
19
+ accessory.context.Fan = accessory.context.Fan ?? {};
20
+ this.Fan = {
21
+ Name: accessory.context.Fan.Name ?? `${accessory.displayName} Fan`,
22
+ Service: accessory.getService(this.hap.Service.Fanv2) ?? accessory.addService(this.hap.Service.Fanv2),
23
+ Active: accessory.context.Active ?? this.hap.Characteristic.Active.INACTIVE,
24
+ SwingMode: accessory.context.SwingMode ?? this.hap.Characteristic.SwingMode.SWING_DISABLED,
25
+ RotationSpeed: accessory.context.RotationSpeed ?? 0,
26
+ RotationDirection: accessory.context.RotationDirection ?? this.hap.Characteristic.RotationDirection.CLOCKWISE,
27
+ };
28
+ accessory.context.Fan = this.Fan;
29
+ this.Fan.Service
30
+ .setCharacteristic(this.hap.Characteristic.Name, this.Fan.Name)
31
+ .getCharacteristic(this.hap.Characteristic.Active)
32
+ .onGet(() => {
33
+ return this.Fan.Active;
34
+ })
35
+ .onSet(this.ActiveSet.bind(this));
64
36
  if (device.irfan?.rotation_speed) {
65
- if (device.irfan?.set_minStep) {
66
- this.minStep = device.irfan?.set_minStep;
67
- }
68
- else {
69
- this.minStep = 1;
70
- }
71
- if (device.irfan?.set_min) {
72
- this.minValue = device.irfan?.set_min;
73
- }
74
- else {
75
- this.minValue = 1;
76
- }
77
- if (device.irfan?.set_max) {
78
- this.maxValue = device.irfan?.set_max;
79
- }
80
- else {
81
- this.maxValue = 100;
82
- }
83
37
  // handle Rotation Speed events using the RotationSpeed characteristic
84
- this.fanService
38
+ this.Fan.Service
85
39
  .getCharacteristic(this.hap.Characteristic.RotationSpeed)
86
40
  .setProps({
87
- minStep: this.minStep,
88
- minValue: this.minValue,
89
- maxValue: this.maxValue,
41
+ minStep: device.irfan?.set_minStep ?? 1,
42
+ minValue: device.irfan?.set_min ?? 1,
43
+ maxValue: device.irfan?.set_max ?? 100,
44
+ })
45
+ .onGet(() => {
46
+ return this.Fan.RotationSpeed;
90
47
  })
91
48
  .onSet(this.RotationSpeedSet.bind(this));
92
49
  }
93
- else if (this.fanService.testCharacteristic(this.hap.Characteristic.RotationSpeed) && !device.irfan?.swing_mode) {
94
- const characteristic = this.fanService.getCharacteristic(this.hap.Characteristic.RotationSpeed);
95
- this.fanService.removeCharacteristic(characteristic);
50
+ else if (this.Fan.Service.testCharacteristic(this.hap.Characteristic.RotationSpeed) && !device.irfan?.swing_mode) {
51
+ const characteristic = this.Fan.Service.getCharacteristic(this.hap.Characteristic.RotationSpeed);
52
+ this.Fan.Service.removeCharacteristic(characteristic);
96
53
  this.debugLog(`${this.device.remoteType}: ${this.accessory.displayName} Rotation Speed Characteristic was removed.`);
97
54
  }
98
55
  else {
99
- // eslint-disable-next-line max-len
100
- this.debugLog(`${this.device.remoteType}: ${this.accessory.displayName} RotationSpeed Characteristic was not removed/added, ` +
101
- `Clear Cache on ${this.accessory.displayName} to remove Chracteristic`);
56
+ this.debugLog(`${this.device.remoteType}: ${this.accessory.displayName} RotationSpeed Characteristic was not removed/added, `
57
+ + `Clear Cache on ${this.accessory.displayName} to remove Chracteristic`);
102
58
  }
103
59
  if (device.irfan?.swing_mode) {
104
60
  // handle Osolcation events using the SwingMode characteristic
105
- this.fanService.getCharacteristic(this.hap.Characteristic.SwingMode).onSet(this.SwingModeSet.bind(this));
61
+ this.Fan.Service
62
+ .getCharacteristic(this.hap.Characteristic.SwingMode)
63
+ .onGet(() => {
64
+ return this.Fan.SwingMode;
65
+ })
66
+ .onSet(this.SwingModeSet.bind(this));
106
67
  }
107
- else if (this.fanService.testCharacteristic(this.hap.Characteristic.SwingMode) && !device.irfan?.swing_mode) {
108
- const characteristic = this.fanService.getCharacteristic(this.hap.Characteristic.SwingMode);
109
- this.fanService.removeCharacteristic(characteristic);
68
+ else if (this.Fan.Service.testCharacteristic(this.hap.Characteristic.SwingMode) && !device.irfan?.swing_mode) {
69
+ const characteristic = this.Fan.Service.getCharacteristic(this.hap.Characteristic.SwingMode);
70
+ this.Fan.Service.removeCharacteristic(characteristic);
110
71
  this.debugLog(`${this.device.remoteType}: ${this.accessory.displayName} Swing Mode Characteristic was removed.`);
111
72
  }
112
73
  else {
113
- // eslint-disable-next-line max-len
114
- this.debugLog(`${this.device.remoteType}: ${this.accessory.displayName} Swing Mode Characteristic was not removed/added, ` +
115
- `Clear Cache on ${this.accessory.displayName} To Remove Chracteristic`);
74
+ this.debugLog(`${this.device.remoteType}: ${this.accessory.displayName} Swing Mode Characteristic was not removed/added, `
75
+ + `Clear Cache on ${this.accessory.displayName} To Remove Chracteristic`);
116
76
  }
117
77
  }
118
78
  async SwingModeSet(value) {
119
79
  this.debugLog(`${this.device.remoteType}: ${this.accessory.displayName} SwingMode: ${value}`);
120
- if (value > this.SwingMode) {
121
- this.SwingMode = 1;
80
+ if (value > this.Fan.SwingMode) {
81
+ this.Fan.SwingMode = 1;
122
82
  await this.pushFanOnChanges();
123
83
  await this.pushFanSwingChanges();
124
84
  }
125
85
  else {
126
- this.SwingMode = 0;
86
+ this.Fan.SwingMode = 0;
127
87
  await this.pushFanOnChanges();
128
88
  await this.pushFanSwingChanges();
129
89
  }
130
- this.SwingMode = value;
131
- this.accessory.context.SwingMode = this.SwingMode;
90
+ this.Fan.SwingMode = value;
91
+ this.accessory.context.SwingMode = this.Fan.SwingMode;
132
92
  }
133
93
  async RotationSpeedSet(value) {
134
94
  this.debugLog(`${this.device.remoteType}: ${this.accessory.displayName} RotationSpeed: ${value}`);
135
- if (value > this.RotationSpeed) {
136
- this.RotationSpeed = 1;
95
+ if (value > this.Fan.RotationSpeed) {
96
+ this.Fan.RotationSpeed = 1;
137
97
  this.pushFanSpeedUpChanges();
138
98
  this.pushFanOnChanges();
139
99
  }
140
100
  else {
141
- this.RotationSpeed = 0;
101
+ this.Fan.RotationSpeed = 0;
142
102
  this.pushFanSpeedDownChanges();
143
103
  }
144
- this.RotationSpeed = value;
145
- this.accessory.context.RotationSpeed = this.RotationSpeed;
104
+ this.Fan.RotationSpeed = value;
105
+ this.accessory.context.RotationSpeed = this.Fan.RotationSpeed;
146
106
  }
147
107
  async ActiveSet(value) {
148
108
  this.debugLog(`${this.device.remoteType}: ${this.accessory.displayName} Active: ${value}`);
149
- this.Active = value;
150
- if (this.Active === this.hap.Characteristic.Active.ACTIVE) {
109
+ this.Fan.Active = value;
110
+ if (this.Fan.Active === this.hap.Characteristic.Active.ACTIVE) {
151
111
  this.pushFanOnChanges();
152
112
  }
153
113
  else {
@@ -164,8 +124,9 @@ export class Fan {
164
124
  * Fan - "command" "highSpeed" "default" = fan speed to high
165
125
  */
166
126
  async pushFanOnChanges() {
167
- this.debugLog(`${this.device.remoteType}: ${this.accessory.displayName} pushFanOnChanges Active: ${this.Active},` + ` disablePushOn: ${this.disablePushOn}`);
168
- if (this.Active === this.hap.Characteristic.Active.ACTIVE && !this.disablePushOn) {
127
+ this.debugLog(`${this.device.remoteType}: ${this.accessory.displayName} pushFanOnChanges Active: ${this.Fan.Active},`
128
+ + ` disablePushOn: ${this.disablePushOn}`);
129
+ if (this.Fan.Active === this.hap.Characteristic.Active.ACTIVE && !this.disablePushOn) {
169
130
  const commandType = await this.commandType();
170
131
  const command = await this.commandOn();
171
132
  const bodyChange = JSON.stringify({
@@ -177,9 +138,9 @@ export class Fan {
177
138
  }
178
139
  }
179
140
  async pushFanOffChanges() {
180
- this.debugLog(`${this.device.remoteType}: ${this.accessory.displayName} pushLightOffChanges Active: ${this.Active},` +
181
- ` disablePushOff: ${this.disablePushOff}`);
182
- if (this.Active === this.hap.Characteristic.Active.INACTIVE && !this.disablePushOff) {
141
+ this.debugLog(`${this.device.remoteType}: ${this.accessory.displayName} pushLightOffChanges Active: ${this.Fan.Active},`
142
+ + ` disablePushOff: ${this.disablePushOff}`);
143
+ if (this.Fan.Active === this.hap.Characteristic.Active.INACTIVE && !this.disablePushOff) {
183
144
  const commandType = await this.commandType();
184
145
  const command = await this.commandOff();
185
146
  const bodyChange = JSON.stringify({
@@ -219,289 +180,59 @@ export class Fan {
219
180
  if (this.device.connectionType === 'OpenAPI') {
220
181
  this.infoLog(`${this.device.remoteType}: ${this.accessory.displayName} Sending request to SwitchBot API, body: ${bodyChange},`);
221
182
  try {
222
- const { body, statusCode } = await request(`${Devices}/${this.device.deviceId}/commands`, {
223
- body: bodyChange,
224
- method: 'POST',
225
- headers: this.platform.generateHeaders(),
226
- });
227
- this.debugWarnLog(`${this.device.remoteType}: ${this.accessory.displayName} statusCode: ${statusCode}`);
183
+ const { body, statusCode } = await this.pushChangeRequest(bodyChange);
228
184
  const deviceStatus = await body.json();
229
- this.debugWarnLog(`${this.device.remoteType}: ${this.accessory.displayName} deviceStatus: ${JSON.stringify(deviceStatus)}`);
230
- this.debugWarnLog(`${this.device.remoteType}: ${this.accessory.displayName} deviceStatus statusCode: ${deviceStatus.statusCode}`);
185
+ await this.pushStatusCodes(statusCode, deviceStatus);
231
186
  if ((statusCode === 200 || statusCode === 100) && (deviceStatus.statusCode === 200 || deviceStatus.statusCode === 100)) {
232
- this.debugErrorLog(`${this.device.remoteType}: ${this.accessory.displayName} `
233
- + `statusCode: ${statusCode} & deviceStatus StatusCode: ${deviceStatus.statusCode}`);
234
- this.updateHomeKitCharacteristics();
187
+ await this.successfulPushChange(statusCode, deviceStatus, bodyChange);
188
+ await this.updateHomeKitCharacteristics();
235
189
  }
236
190
  else {
237
- this.statusCode(statusCode);
238
- this.statusCode(deviceStatus.statusCode);
191
+ await this.statusCode(statusCode);
192
+ await this.statusCode(deviceStatus.statusCode);
239
193
  }
240
194
  }
241
195
  catch (e) {
242
196
  this.apiError(e);
243
- this.errorLog(`${this.device.remoteType}: ${this.accessory.displayName} failed pushChanges with ${this.device.connectionType}` +
244
- ` Connection, Error Message: ${JSON.stringify(e.message)}`);
197
+ this.errorLog(`${this.device.remoteType}: ${this.accessory.displayName} failed pushChanges with ${this.device.connectionType}`
198
+ + ` Connection, Error Message: ${JSON.stringify(e.message)}`);
245
199
  }
246
200
  }
247
201
  else {
248
- this.warnLog(`${this.device.remoteType}: ${this.accessory.displayName}` +
249
- ` Connection Type: ${this.device.connectionType}, commands will not be sent to OpenAPI`);
202
+ this.warnLog(`${this.device.remoteType}: ${this.accessory.displayName}`
203
+ + ` Connection Type: ${this.device.connectionType}, commands will not be sent to OpenAPI`);
250
204
  }
251
205
  }
252
206
  async updateHomeKitCharacteristics() {
253
- if (this.Active === undefined) {
254
- this.debugLog(`${this.device.remoteType}: ${this.accessory.displayName} Active: ${this.Active}`);
207
+ if (this.Fan.Active === undefined) {
208
+ this.debugLog(`${this.device.remoteType}: ${this.accessory.displayName} Active: ${this.Fan.Active}`);
255
209
  }
256
210
  else {
257
- this.accessory.context.Active = this.Active;
258
- this.fanService?.updateCharacteristic(this.hap.Characteristic.Active, this.Active);
259
- this.debugLog(`${this.device.remoteType}: ${this.accessory.displayName} updateCharacteristic Active: ${this.Active}`);
211
+ this.accessory.context.Active = this.Fan.Active;
212
+ this.Fan.Service.updateCharacteristic(this.hap.Characteristic.Active, this.Fan.Active);
213
+ this.debugLog(`${this.device.remoteType}: ${this.accessory.displayName} updateCharacteristic Active: ${this.Fan.Active}`);
260
214
  }
261
- if (this.SwingMode === undefined) {
262
- this.debugLog(`${this.device.remoteType}: ${this.accessory.displayName} SwingMode: ${this.SwingMode}`);
215
+ if (this.Fan.SwingMode === undefined) {
216
+ this.debugLog(`${this.device.remoteType}: ${this.accessory.displayName} SwingMode: ${this.Fan.SwingMode}`);
263
217
  }
264
218
  else {
265
- this.accessory.context.SwingMode = this.SwingMode;
266
- this.fanService?.updateCharacteristic(this.hap.Characteristic.SwingMode, this.SwingMode);
267
- this.debugLog(`${this.device.remoteType}: ${this.accessory.displayName} updateCharacteristic SwingMode: ${this.SwingMode}`);
219
+ this.accessory.context.SwingMode = this.Fan.SwingMode;
220
+ this.Fan.Service.updateCharacteristic(this.hap.Characteristic.SwingMode, this.Fan.SwingMode);
221
+ this.debugLog(`${this.device.remoteType}: ${this.accessory.displayName} updateCharacteristic SwingMode: ${this.Fan.SwingMode}`);
268
222
  }
269
- if (this.RotationSpeed === undefined) {
270
- this.debugLog(`${this.device.remoteType}: ${this.accessory.displayName} RotationSpeed: ${this.RotationSpeed}`);
223
+ if (this.Fan.RotationSpeed === undefined) {
224
+ this.debugLog(`${this.device.remoteType}: ${this.accessory.displayName} RotationSpeed: ${this.Fan.RotationSpeed}`);
271
225
  }
272
226
  else {
273
- this.accessory.context.RotationSpeed = this.RotationSpeed;
274
- this.fanService?.updateCharacteristic(this.hap.Characteristic.RotationSpeed, this.RotationSpeed);
275
- this.debugLog(`${this.device.remoteType}: ${this.accessory.displayName} updateCharacteristic RotationSpeed: ${this.RotationSpeed}`);
276
- }
277
- }
278
- async disablePushOnChanges(device) {
279
- if (device.disablePushOn === undefined) {
280
- this.disablePushOn = false;
281
- }
282
- else {
283
- this.disablePushOn = device.disablePushOn;
284
- }
285
- }
286
- async disablePushOffChanges(device) {
287
- if (device.disablePushOff === undefined) {
288
- this.disablePushOff = false;
289
- }
290
- else {
291
- this.disablePushOff = device.disablePushOff;
292
- }
293
- }
294
- async commandType() {
295
- let commandType;
296
- if (this.device.customize) {
297
- commandType = 'customize';
298
- }
299
- else {
300
- commandType = 'command';
301
- }
302
- return commandType;
303
- }
304
- async commandOn() {
305
- let command;
306
- if (this.device.customize && this.device.customOn) {
307
- command = this.device.customOn;
308
- }
309
- else {
310
- command = 'turnOn';
311
- }
312
- return command;
313
- }
314
- async commandOff() {
315
- let command;
316
- if (this.device.customize && this.device.customOff) {
317
- command = this.device.customOff;
318
- }
319
- else {
320
- command = 'turnOff';
321
- }
322
- return command;
323
- }
324
- async statusCode(statusCode) {
325
- switch (statusCode) {
326
- case 151:
327
- this.errorLog(`${this.device.remoteType}: ${this.accessory.displayName} Command not supported by this deviceType, statusCode: ${statusCode}`);
328
- break;
329
- case 152:
330
- this.errorLog(`${this.device.remoteType}: ${this.accessory.displayName} Device not found, statusCode: ${statusCode}`);
331
- break;
332
- case 160:
333
- this.errorLog(`${this.device.remoteType}: ${this.accessory.displayName} Command is not supported, statusCode: ${statusCode}`);
334
- break;
335
- case 161:
336
- this.errorLog(`${this.device.remoteType}: ${this.accessory.displayName} Device is offline, statusCode: ${statusCode}`);
337
- break;
338
- case 171:
339
- this.errorLog(`${this.device.remoteType}: ${this.accessory.displayName} Hub Device is offline, statusCode: ${statusCode}. ` +
340
- `Hub: ${this.device.hubDeviceId}`);
341
- break;
342
- case 190:
343
- this.errorLog(`${this.device.remoteType}: ${this.accessory.displayName} Device internal error due to device states not synchronized with server,` +
344
- ` Or command format is invalid, statusCode: ${statusCode}`);
345
- break;
346
- case 100:
347
- this.debugLog(`${this.device.remoteType}: ${this.accessory.displayName} Command successfully sent, statusCode: ${statusCode}`);
348
- break;
349
- case 200:
350
- this.debugLog(`${this.device.remoteType}: ${this.accessory.displayName} Request successful, statusCode: ${statusCode}`);
351
- break;
352
- case 400:
353
- this.errorLog(`${this.device.remoteType}: ${this.accessory.displayName} Bad Request, The client has issued an invalid request. `
354
- + `This is commonly used to specify validation errors in a request payload, statusCode: ${statusCode}`);
355
- break;
356
- case 401:
357
- this.errorLog(`${this.device.remoteType}: ${this.accessory.displayName} Unauthorized, Authorization for the API is required, `
358
- + `but the request has not been authenticated, statusCode: ${statusCode}`);
359
- break;
360
- case 403:
361
- this.errorLog(`${this.device.remoteType}: ${this.accessory.displayName} Forbidden, The request has been authenticated but does not `
362
- + `have appropriate permissions, or a requested resource is not found, statusCode: ${statusCode}`);
363
- break;
364
- case 404:
365
- this.errorLog(`${this.device.remoteType}: ${this.accessory.displayName} Not Found, Specifies the requested path does not exist, `
366
- + `statusCode: ${statusCode}`);
367
- break;
368
- case 406:
369
- this.errorLog(`${this.device.remoteType}: ${this.accessory.displayName} Not Acceptable, The client has requested a MIME type via `
370
- + `the Accept header for a value not supported by the server, statusCode: ${statusCode}`);
371
- break;
372
- case 415:
373
- this.errorLog(`${this.device.remoteType}: ${this.accessory.displayName} Unsupported Media Type, The client has defined a contentType `
374
- + `header that is not supported by the server, statusCode: ${statusCode}`);
375
- break;
376
- case 422:
377
- this.errorLog(`${this.device.remoteType}: ${this.accessory.displayName} Unprocessable Entity, The client has made a valid request, but `
378
- + `the server cannot process it. This is often used for APIs for which certain limits have been exceeded, statusCode: ${statusCode}`);
379
- break;
380
- case 429:
381
- this.errorLog(`${this.device.remoteType}: ${this.accessory.displayName} Too Many Requests, The client has exceeded the number of `
382
- + `requests allowed for a given time window, statusCode: ${statusCode}`);
383
- break;
384
- case 500:
385
- this.errorLog(`${this.device.remoteType}: ${this.accessory.displayName} Internal Server Error, An unexpected error on the SmartThings `
386
- + `servers has occurred. These errors should be rare, statusCode: ${statusCode}`);
387
- break;
388
- default:
389
- this.infoLog(`${this.device.remoteType}: ${this.accessory.displayName} Unknown statusCode: ` +
390
- `${statusCode}, Submit Bugs Here: ' + 'https://tinyurl.com/SwitchBotBug`);
227
+ this.accessory.context.RotationSpeed = this.Fan.RotationSpeed;
228
+ this.Fan.Service.updateCharacteristic(this.hap.Characteristic.RotationSpeed, this.Fan.RotationSpeed);
229
+ this.debugLog(`${this.device.remoteType}: ${this.accessory.displayName} updateCharacteristic RotationSpeed: ${this.Fan.RotationSpeed}`);
391
230
  }
392
231
  }
393
232
  async apiError(e) {
394
- this.fanService.updateCharacteristic(this.hap.Characteristic.Active, e);
395
- this.fanService.updateCharacteristic(this.hap.Characteristic.RotationSpeed, e);
396
- this.fanService.updateCharacteristic(this.hap.Characteristic.SwingMode, e);
397
- }
398
- async deviceContext() {
399
- if (this.Active === undefined) {
400
- this.Active = this.hap.Characteristic.Active.INACTIVE;
401
- }
402
- else {
403
- this.Active = this.accessory.context.Active;
404
- }
405
- if (this.FirmwareRevision === undefined) {
406
- this.FirmwareRevision = this.platform.version;
407
- this.accessory.context.FirmwareRevision = this.FirmwareRevision;
408
- }
409
- }
410
- async deviceConfig(device) {
411
- let config = {};
412
- if (device.irfan) {
413
- config = device.irfan;
414
- }
415
- if (device.logging !== undefined) {
416
- config['logging'] = device.logging;
417
- }
418
- if (device.connectionType !== undefined) {
419
- config['connectionType'] = device.connectionType;
420
- }
421
- if (device.external !== undefined) {
422
- config['external'] = device.external;
423
- }
424
- if (device.customOn !== undefined) {
425
- config['customOn'] = device.customOn;
426
- }
427
- if (device.customOff !== undefined) {
428
- config['customOff'] = device.customOff;
429
- }
430
- if (device.customize !== undefined) {
431
- config['customize'] = device.customize;
432
- }
433
- if (device.disablePushOn !== undefined) {
434
- config['disablePushOn'] = device.disablePushOn;
435
- }
436
- if (device.disablePushOff !== undefined) {
437
- config['disablePushOff'] = device.disablePushOff;
438
- }
439
- if (Object.entries(config).length !== 0) {
440
- this.debugWarnLog(`${this.device.remoteType}: ${this.accessory.displayName} Config: ${JSON.stringify(config)}`);
441
- }
442
- }
443
- async deviceLogs(device) {
444
- if (this.platform.debugMode) {
445
- this.deviceLogging = this.accessory.context.logging = 'debugMode';
446
- this.debugLog(`${this.device.remoteType}: ${this.accessory.displayName} Using Debug Mode Logging: ${this.deviceLogging}`);
447
- }
448
- else if (device.logging) {
449
- this.deviceLogging = this.accessory.context.logging = device.logging;
450
- this.debugLog(`${this.device.remoteType}: ${this.accessory.displayName} Using Device Config Logging: ${this.deviceLogging}`);
451
- }
452
- else if (this.platform.config.options?.logging) {
453
- this.deviceLogging = this.accessory.context.logging = this.platform.config.options?.logging;
454
- this.debugLog(`${this.device.remoteType}: ${this.accessory.displayName} Using Platform Config Logging: ${this.deviceLogging}`);
455
- }
456
- else {
457
- this.deviceLogging = this.accessory.context.logging = 'standard';
458
- this.debugLog(`${this.device.remoteType}: ${this.accessory.displayName} Logging Not Set, Using: ${this.deviceLogging}`);
459
- }
460
- }
461
- /**
462
- * Logging for Device
463
- */
464
- infoLog(...log) {
465
- if (this.enablingDeviceLogging()) {
466
- this.platform.log.info(String(...log));
467
- }
468
- }
469
- warnLog(...log) {
470
- if (this.enablingDeviceLogging()) {
471
- this.platform.log.warn(String(...log));
472
- }
473
- }
474
- debugWarnLog(...log) {
475
- if (this.enablingDeviceLogging()) {
476
- if (this.deviceLogging?.includes('debug')) {
477
- this.platform.log.warn('[DEBUG]', String(...log));
478
- }
479
- }
480
- }
481
- errorLog(...log) {
482
- if (this.enablingDeviceLogging()) {
483
- this.platform.log.error(String(...log));
484
- }
485
- }
486
- debugErrorLog(...log) {
487
- if (this.enablingDeviceLogging()) {
488
- if (this.deviceLogging?.includes('debug')) {
489
- this.platform.log.error('[DEBUG]', String(...log));
490
- }
491
- }
492
- }
493
- debugLog(...log) {
494
- if (this.enablingDeviceLogging()) {
495
- if (this.deviceLogging === 'debug') {
496
- this.platform.log.info('[DEBUG]', String(...log));
497
- }
498
- else {
499
- this.platform.log.debug(String(...log));
500
- }
501
- }
502
- }
503
- enablingDeviceLogging() {
504
- return this.deviceLogging.includes('debug') || this.deviceLogging === 'standard';
233
+ this.Fan.Service.updateCharacteristic(this.hap.Characteristic.Active, e);
234
+ this.Fan.Service.updateCharacteristic(this.hap.Characteristic.RotationSpeed, e);
235
+ this.Fan.Service.updateCharacteristic(this.hap.Characteristic.SwingMode, e);
505
236
  }
506
237
  }
507
238
  //# sourceMappingURL=fan.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"fan.js","sourceRoot":"","sources":["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