homebridge-tuya-community 3.3.1 โ 3.3.2
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 +22 -0
- package/config.schema.json +14 -0
- package/index.js +2 -1
- package/lib/CustomMultiLightAccessory.js +2 -1
- package/lib/DehumidifierAccessory.js +2 -0
- package/lib/MultiLightAccessory.js +2 -1
- package/package.json +1 -1
package/Changelog.md
CHANGED
|
@@ -2,6 +2,28 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. This project uses [semantic versioning](https://semver.org/).
|
|
4
4
|
|
|
5
|
+
## 3.3.2 (2026-01-10)
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
- **Custom Serial Number** - New `serialNumber` config option to set a custom serial number for devices in HomeKit
|
|
9
|
+
- **Firmware Version** - New `firmwareVersion` config option to display a custom firmware version in HomeKit
|
|
10
|
+
|
|
11
|
+
These options are available for all device types and will appear in the Home app's accessory details.
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## 3.3.1 (2026-01-09)
|
|
15
|
+
|
|
16
|
+
### ๐ Bug Fixes
|
|
17
|
+
- **Fixed undefined variable `rl`** in cli-decode.js that would crash on invalid input.
|
|
18
|
+
- **Fixed undefined variable `service`** in AirPurifierAccessory.js when `noChildLock` is enabled.
|
|
19
|
+
- **Fixed undefined variable `characteristicRotationSpeed`** in DehumidifierAccessory.js (was referencing wrong variable name).
|
|
20
|
+
- Removed unreachable code after return statements in SimpleFanAccessory.js and SimpleFanLightAccessory.js.
|
|
21
|
+
|
|
22
|
+
### ๐งน Code Quality
|
|
23
|
+
- Added ESLint compliance across entire codebase (52 issues resolved).
|
|
24
|
+
- Improved code quality with explicit handling of intentionally empty catch blocks.
|
|
25
|
+
|
|
26
|
+
|
|
5
27
|
## 3.3.0 (2026-01-09)
|
|
6
28
|
|
|
7
29
|
### Added
|
package/config.schema.json
CHANGED
|
@@ -181,6 +181,20 @@
|
|
|
181
181
|
"functionBody": "return model.devices && model.devices[arrayIndices].type !== 'null';"
|
|
182
182
|
}
|
|
183
183
|
},
|
|
184
|
+
"serialNumber": {
|
|
185
|
+
"type": "string",
|
|
186
|
+
"description": "Custom serial number for this device. If not set, uses last 14 characters of the Tuya ID.",
|
|
187
|
+
"condition": {
|
|
188
|
+
"functionBody": "return model.devices && model.devices[arrayIndices].type !== 'null';"
|
|
189
|
+
}
|
|
190
|
+
},
|
|
191
|
+
"firmwareVersion": {
|
|
192
|
+
"type": "string",
|
|
193
|
+
"description": "Firmware version to display in HomeKit for this device.",
|
|
194
|
+
"condition": {
|
|
195
|
+
"functionBody": "return model.devices && model.devices[arrayIndices].type !== 'null';"
|
|
196
|
+
}
|
|
197
|
+
},
|
|
184
198
|
"voltsId": {
|
|
185
199
|
"type": "integer",
|
|
186
200
|
"placeholder": "9",
|
package/index.js
CHANGED
|
@@ -236,7 +236,8 @@ class TuyaLan {
|
|
|
236
236
|
accessory.getService(Service.AccessoryInformation)
|
|
237
237
|
.setCharacteristic(Characteristic.Manufacturer, deviceConfig.manufacturer || 'Unknown')
|
|
238
238
|
.setCharacteristic(Characteristic.Model, deviceConfig.model || 'Unknown')
|
|
239
|
-
.setCharacteristic(Characteristic.SerialNumber, deviceConfig.id.slice(8))
|
|
239
|
+
.setCharacteristic(Characteristic.SerialNumber, deviceConfig.serialNumber || deviceConfig.id.slice(8))
|
|
240
|
+
.setCharacteristic(Characteristic.FirmwareRevision, deviceConfig.firmwareVersion || '1.0');
|
|
240
241
|
|
|
241
242
|
isCached = false;
|
|
242
243
|
}
|
|
@@ -48,7 +48,8 @@ class CustomMultiLightAccessory {
|
|
|
48
48
|
gangAccessory.getService(Service.AccessoryInformation)
|
|
49
49
|
.setCharacteristic(Characteristic.Manufacturer, device.context.manufacturer || "Unknown")
|
|
50
50
|
.setCharacteristic(Characteristic.Model, device.context.model || "Unknown")
|
|
51
|
-
.setCharacteristic(Characteristic.SerialNumber, device.context.id.slice(8) + '-' + light.dp)
|
|
51
|
+
.setCharacteristic(Characteristic.SerialNumber, (device.context.serialNumber || device.context.id.slice(8)) + '-' + light.dp)
|
|
52
|
+
.setCharacteristic(Characteristic.FirmwareRevision, device.context.firmwareVersion || '1.0');
|
|
52
53
|
}
|
|
53
54
|
|
|
54
55
|
if (gangAccessory.displayName !== gangName) {
|
|
@@ -54,6 +54,8 @@ class DehumidifierAccessory extends BaseAccessory {
|
|
|
54
54
|
const infoService = this.accessory.getService(Service.AccessoryInformation);
|
|
55
55
|
infoService.getCharacteristic(Characteristic.Manufacturer).updateValue(this.device.context.manufacturer);
|
|
56
56
|
infoService.getCharacteristic(Characteristic.Model).updateValue(this.device.context.model);
|
|
57
|
+
infoService.getCharacteristic(Characteristic.SerialNumber).updateValue(this.device.context.serialNumber || this.device.context.id.slice(8));
|
|
58
|
+
infoService.getCharacteristic(Characteristic.FirmwareRevision).updateValue(this.device.context.firmwareVersion || '1.0');
|
|
57
59
|
|
|
58
60
|
const _characteristicTemperature = this.accessory.getService(Service.TemperatureSensor)
|
|
59
61
|
.getCharacteristic(Characteristic.CurrentTemperature)
|
|
@@ -42,7 +42,8 @@ class MultiLightAccessory {
|
|
|
42
42
|
gangAccessory.getService(Service.AccessoryInformation)
|
|
43
43
|
.setCharacteristic(Characteristic.Manufacturer, device.context.manufacturer || "Unknown")
|
|
44
44
|
.setCharacteristic(Characteristic.Model, device.context.model || "Unknown")
|
|
45
|
-
.setCharacteristic(Characteristic.SerialNumber, device.context.id.slice(8) + '-' + i)
|
|
45
|
+
.setCharacteristic(Characteristic.SerialNumber, (device.context.serialNumber || device.context.id.slice(8)) + '-' + i)
|
|
46
|
+
.setCharacteristic(Characteristic.FirmwareRevision, device.context.firmwareVersion || '1.0');
|
|
46
47
|
}
|
|
47
48
|
|
|
48
49
|
if (gangAccessory.displayName !== gangName) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "homebridge-tuya-community",
|
|
3
|
-
"version": "3.3.
|
|
3
|
+
"version": "3.3.2",
|
|
4
4
|
"description": "A Homebridge plugin to control Tuya devices locally. Community maintained version of homebridge-tuya that supports new device types.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|