@homebridge-plugins/homebridge-govee 11.32.2-beta.22 → 11.32.2-beta.23
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 +1 -0
- package/lib/device/index.js +2 -2
- package/lib/device/sensor-probe.js +52 -0
- package/lib/utils/constants.js +17 -3
- package/lib/utils/dispatch.js +1 -1
- package/package.json +1 -1
- package/lib/device/sensor-thermo4.js +0 -59
package/CHANGELOG.md
CHANGED
|
@@ -41,6 +41,7 @@ All notable changes to `@homebridge-plugins/homebridge-govee` will be documented
|
|
|
41
41
|
- feat: say when govee has not listed a capability the plugin is about to use, since the request then succeeds and the device does nothing
|
|
42
42
|
- docs: note that the local network api accepts the raw command form, which is how scenes work without the cloud
|
|
43
43
|
- refactor: give every device one shared starting point, so the way a failed command is reported and undone is decided in one place rather than a hundred
|
|
44
|
+
- feat: recognise eleven more meat thermometers, which report what they send so their readings can be worked out, and stop the one already known printing its whole update as a warning
|
|
44
45
|
|
|
45
46
|
## v11.32.1 (2026-08-02)
|
|
46
47
|
|
package/lib/device/index.js
CHANGED
|
@@ -37,7 +37,7 @@ import deviceSensorCO2 from './sensor-co2.js'
|
|
|
37
37
|
import deviceSensorLeak from './sensor-leak.js'
|
|
38
38
|
import deviceSensorMonitor from './sensor-monitor.js'
|
|
39
39
|
import deviceSensorPresence from './sensor-presence.js'
|
|
40
|
-
import
|
|
40
|
+
import deviceSensorProbe from './sensor-probe.js'
|
|
41
41
|
import deviceSensorThermoSwitch from './sensor-thermo-switch.js'
|
|
42
42
|
import deviceSensorThermo from './sensor-thermo.js'
|
|
43
43
|
import deviceSwitchDouble, { asOutlet as deviceOutletDouble } from './switch-double.js'
|
|
@@ -116,7 +116,7 @@ export default {
|
|
|
116
116
|
deviceSensorPresence,
|
|
117
117
|
deviceSensorThermo,
|
|
118
118
|
deviceSensorThermoSwitch,
|
|
119
|
-
|
|
119
|
+
deviceSensorProbe,
|
|
120
120
|
deviceSwitchDouble,
|
|
121
121
|
deviceSwitchSingle,
|
|
122
122
|
deviceSwitchTriple,
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { base64ToHex } from '../utils/functions.js'
|
|
2
|
+
import { logUnknownData } from '../utils/report-unknown.js'
|
|
3
|
+
import GoveeDevice from './base.js'
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* A meat thermometer: one or more probes, each reading its own temperature.
|
|
7
|
+
*
|
|
8
|
+
* None of these models has had its readings worked out yet. The H5198 was once
|
|
9
|
+
* given the ordinary thermometer tiles and it went badly - owners saw one probe
|
|
10
|
+
* out of four, stuck at its starting value (#338). A tile showing a number that
|
|
11
|
+
* never changes is worse than no tile, because there is no way to tell it apart
|
|
12
|
+
* from a real reading.
|
|
13
|
+
*
|
|
14
|
+
* So this offers nothing, and instead reports what the device sends in the form
|
|
15
|
+
* that can be pasted into an issue. One owner's log is all that is needed to
|
|
16
|
+
* turn these into real temperature tiles.
|
|
17
|
+
*/
|
|
18
|
+
export default class extends GoveeDevice {
|
|
19
|
+
constructor(platform, accessory) {
|
|
20
|
+
super(platform, accessory)
|
|
21
|
+
|
|
22
|
+
// Clear the tiles a previous version gave this device, which never updated
|
|
23
|
+
this.removeServiceIfPresent(this.hapServ.TemperatureSensor)
|
|
24
|
+
this.removeServiceIfPresent(this.hapServ.HumiditySensor)
|
|
25
|
+
this.removeServiceIfPresent(this.hapServ.Battery)
|
|
26
|
+
|
|
27
|
+
this.logInitOptions({})
|
|
28
|
+
this.accessory.log('this thermometer\'s readings are not understood yet, so it has no tiles - the lines below are what is needed to add them')
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
externalUpdate(params) {
|
|
32
|
+
// The probe readings could arrive as raw commands or as fields on the
|
|
33
|
+
// update itself, and which is not known yet - so both are reported
|
|
34
|
+
;(params.commands || []).forEach((command) => {
|
|
35
|
+
logUnknownData(this.accessory, {
|
|
36
|
+
kind: 'probe reading',
|
|
37
|
+
source: params.source,
|
|
38
|
+
raw: command,
|
|
39
|
+
hex: base64ToHex(command),
|
|
40
|
+
})
|
|
41
|
+
})
|
|
42
|
+
|
|
43
|
+
const fields = Object.keys(params).filter(key => !['commands', 'source'].includes(key))
|
|
44
|
+
if (fields.length > 0) {
|
|
45
|
+
logUnknownData(this.accessory, {
|
|
46
|
+
kind: 'probe update',
|
|
47
|
+
source: params.source,
|
|
48
|
+
raw: JSON.stringify(Object.fromEntries(fields.map(key => [key, params[key]]))),
|
|
49
|
+
})
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
package/lib/utils/constants.js
CHANGED
|
@@ -657,7 +657,23 @@ export default {
|
|
|
657
657
|
'H5310', // https://github.com/homebridge-plugins/homebridge-govee/issues/1293
|
|
658
658
|
'R5112', // the refreshed H5112
|
|
659
659
|
],
|
|
660
|
-
|
|
660
|
+
// Meat thermometers. None has had its readings worked out yet, so they
|
|
661
|
+
// report what they send rather than showing a tile that never changes.
|
|
662
|
+
// ⚠️ The H5183 is one of these but stays on the list above, because it has
|
|
663
|
+
// been given working tiles for years and nobody has said they are wrong
|
|
664
|
+
sensorProbe: [
|
|
665
|
+
'H5181',
|
|
666
|
+
'H5182',
|
|
667
|
+
'H5184',
|
|
668
|
+
'H5185', // https://github.com/homebridge-plugins/homebridge-govee/issues/804
|
|
669
|
+
'H5191', // https://github.com/homebridge-plugins/homebridge-govee/issues/1121
|
|
670
|
+
'H5192',
|
|
671
|
+
'H5194',
|
|
672
|
+
'H5196',
|
|
673
|
+
'H5198',
|
|
674
|
+
'H5199',
|
|
675
|
+
'H5610',
|
|
676
|
+
],
|
|
661
677
|
sensorMonitor: ['H5106'],
|
|
662
678
|
sensorCO2: ['H5140'], // CO2 + temp + humidity monitor, AWS opcode 0x0A — closes #1179
|
|
663
679
|
fan: ['H1310', 'H1370', 'H7100', 'H7101', 'H7102', 'H7103', 'H7105', 'H7106', 'H7107', 'H7111', 'H7112', 'R1310'],
|
|
@@ -686,8 +702,6 @@ export default {
|
|
|
686
702
|
'H5126', // https://github.com/homebridge-plugins/homebridge-govee/issues/910
|
|
687
703
|
'H5129', // https://github.com/homebridge-plugins/homebridge-govee/issues/1084
|
|
688
704
|
'H5125', // https://github.com/homebridge-plugins/homebridge-govee/issues/981
|
|
689
|
-
'H5185', // https://github.com/homebridge-plugins/homebridge-govee/issues/804
|
|
690
|
-
'H5191', // https://github.com/homebridge-plugins/homebridge-govee/issues/1121
|
|
691
705
|
'H7184', // https://github.com/homebridge-plugins/homebridge-govee/issues/1282
|
|
692
706
|
],
|
|
693
707
|
},
|
package/lib/utils/dispatch.js
CHANGED
|
@@ -45,7 +45,7 @@ const routes = [
|
|
|
45
45
|
list: 'sensorThermo',
|
|
46
46
|
choose: ({ deviceConf }) => (deviceConf.showExtraSwitch ? 'deviceSensorThermoSwitch' : 'deviceSensorThermo'),
|
|
47
47
|
},
|
|
48
|
-
{ list: '
|
|
48
|
+
{ list: 'sensorProbe', handler: 'deviceSensorProbe' },
|
|
49
49
|
{ list: 'sensorMonitor', handler: 'deviceSensorMonitor', awsPolling: true },
|
|
50
50
|
{ list: 'sensorCO2', handler: 'deviceSensorCO2', awsPolling: true },
|
|
51
51
|
{ list: 'fan', prefix: 'deviceFan', fallback: 'deviceFanBasic' },
|
package/package.json
CHANGED
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import { base64ToHex, getTwoItemPosition, hexToTwoItems } from '../utils/functions.js'
|
|
2
|
-
import platformLang from '../utils/lang-en.js'
|
|
3
|
-
import { logUnknownData } from '../utils/report-unknown.js'
|
|
4
|
-
import GoveeDevice from './base.js'
|
|
5
|
-
|
|
6
|
-
export default class extends GoveeDevice {
|
|
7
|
-
constructor(platform, accessory) {
|
|
8
|
-
super(platform, accessory)
|
|
9
|
-
// remove temperature sensor, humidity sensor, battery service
|
|
10
|
-
if (this.accessory.getService(this.hapServ.TemperatureSensor)) {
|
|
11
|
-
this.accessory.removeService(this.accessory.getService(this.hapServ.TemperatureSensor))
|
|
12
|
-
}
|
|
13
|
-
if (this.accessory.getService(this.hapServ.HumiditySensor)) {
|
|
14
|
-
this.accessory.removeService(this.accessory.getService(this.hapServ.HumiditySensor))
|
|
15
|
-
}
|
|
16
|
-
if (this.accessory.getService(this.hapServ.Battery)) {
|
|
17
|
-
this.accessory.removeService(this.accessory.getService(this.hapServ.Battery))
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
// Output the customised options to the log
|
|
21
|
-
const opts = JSON.stringify({})
|
|
22
|
-
platform.log('[%s] %s %s.', accessory.displayName, platformLang.devInitOpts, opts)
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
externalUpdate(params) {
|
|
26
|
-
this.accessory.logWarn(JSON.stringify(params, null, 2));
|
|
27
|
-
|
|
28
|
-
// Check for some other scene/mode change
|
|
29
|
-
(params.commands || []).forEach((command) => {
|
|
30
|
-
const hexString = base64ToHex(command)
|
|
31
|
-
const hexParts = hexToTwoItems(hexString)
|
|
32
|
-
|
|
33
|
-
logUnknownData(this.accessory, {
|
|
34
|
-
kind: 'scene',
|
|
35
|
-
source: params.source,
|
|
36
|
-
raw: command,
|
|
37
|
-
hex: hexString,
|
|
38
|
-
})
|
|
39
|
-
|
|
40
|
-
// Return now if not a device query update code
|
|
41
|
-
if (getTwoItemPosition(hexParts, 1) !== 'aa') {
|
|
42
|
-
return
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
const deviceFunction = `${getTwoItemPosition(hexParts, 1)}${getTwoItemPosition(hexParts, 2)}`
|
|
46
|
-
|
|
47
|
-
switch (deviceFunction) {
|
|
48
|
-
default:
|
|
49
|
-
logUnknownData(this.accessory, {
|
|
50
|
-
kind: 'scene',
|
|
51
|
-
source: params.source,
|
|
52
|
-
raw: command,
|
|
53
|
-
hex: hexString,
|
|
54
|
-
})
|
|
55
|
-
break
|
|
56
|
-
}
|
|
57
|
-
})
|
|
58
|
-
}
|
|
59
|
-
}
|