@homebridge-plugins/homebridge-govee 11.32.1 → 11.32.2-beta.1

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/CHANGELOG.md CHANGED
@@ -2,6 +2,13 @@
2
2
 
3
3
  All notable changes to `@homebridge-plugins/homebridge-govee` will be documented in this file.
4
4
 
5
+ ## v11.32.2 (Pending Release)
6
+
7
+ ### Changed
8
+
9
+ - fix: implement the H7107's oscillation toggle, which threw a not-implemented error when tapped (#1334)
10
+ - fix: also send the H7107's oscillation command as the multiSync frame the fan itself uses, since the first shape only turned it off sometimes (#1334)
11
+
5
12
  ## v11.32.1 (2026-08-02)
6
13
 
7
14
  ### Changed
@@ -204,33 +204,43 @@ export default class {
204
204
 
205
205
  async internalSwingUpdate(value) {
206
206
  try {
207
+ const newValue = value ? 'on' : 'off'
207
208
  // Don't continue if the new value is the same as before
208
- if (this.cacheSwing === value) {
209
+ if (this.cacheSwing === newValue) {
209
210
  return
210
211
  }
211
212
 
212
- throw new Error('Swing mode update not implemented yet')
213
-
214
- // const newValue = value ? 'on' : 'off'
215
- // The existing cacheSwingCode might be something like aa1d0101960384000000000000000000000000a6
216
- // We need to change the third hex value to 00 for off or 01 for on
217
- // const hexValues = [
218
- // 0x3A,
219
- // 0x1D,
220
- // value ? 0x01 : 0x00,
221
- // ...this.cacheSwingCode.slice(6, 14).match(/.{1,2}/g).map(byte => Number.parseInt(byte, 16)),
222
- // ]
223
- //
224
- // await this.platform.sendDeviceUpdate(this.accessory, {
225
- // cmd: 'multiSync',
226
- // value: generateCodeFromHexValues(hexValues),
227
- // })
213
+ // The AWS code mirrors the device's own `aa1d..` oscillation report,
214
+ // carrying over the extra bytes from the last report seen (#1334).
215
+ // Mirroring a status code is not guaranteed on every model, so the
216
+ // documented OpenAPI oscillation toggle is also sent when the device
217
+ // advertises it
218
+ const tailBytes = this.cacheSwingCode
219
+ ? this.cacheSwingCode.slice(6, 14).match(/.{1,2}/g).map(byte => Number.parseInt(byte, 16))
220
+ : []
221
+ await this.platform.sendDeviceUpdate(this.accessory, {
222
+ cmd: 'ptReal',
223
+ value: generateCodeFromHexValues([0x33, 0x1D, value ? 0x01 : 0x00, ...tailBytes]),
224
+ openApi: this.accessory.context.openApiCapabilities?.oscillationToggle
225
+ ? { instance: 'oscillationToggle', capabilityType: 'devices.capabilities.toggle', value: value ? 1 : 0 }
226
+ : undefined,
227
+ })
228
+
229
+ // Hardware testing showed the `331d..` frame above turns oscillation ON
230
+ // reliably but OFF only sometimes - and the fan's own oscillation state
231
+ // travels as multiSync traffic, which is what the `3a`-prefixed frame
232
+ // belongs to. Both shapes mean the same thing, so the one the fan
233
+ // ignores is harmless, and one test tells us which it honours (#1334)
234
+ await this.platform.sendDeviceUpdate(this.accessory, {
235
+ cmd: 'multiSync',
236
+ value: generateCodeFromHexValues([0x3A, 0x1D, value ? 0x01 : 0x00, ...tailBytes]),
237
+ })
228
238
 
229
239
  // Cache the new state and log if appropriate
230
- // if (this.cacheSwing !== newValue) {
231
- // this.cacheSwing = newValue
232
- // this.accessory.log(`${platformLang.curSwing} [${newValue}]`)
233
- // }
240
+ if (this.cacheSwing !== newValue) {
241
+ this.cacheSwing = newValue
242
+ this.accessory.log(`${platformLang.curSwing} [${newValue}]`)
243
+ }
234
244
  } catch (err) {
235
245
  // Catch any errors during the process
236
246
  this.accessory.logWarn(`${platformLang.devNotUpdated} ${parseError(err)}`)
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@homebridge-plugins/homebridge-govee",
3
3
  "alias": "Govee",
4
4
  "type": "module",
5
- "version": "11.32.1",
5
+ "version": "11.32.2-beta.1",
6
6
  "description": "Homebridge plugin to integrate Govee devices into HomeKit.",
7
7
  "author": {
8
8
  "name": "bwp91",