homebridge-slwf-01pro 0.3.3 → 0.4.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.
- package/CHANGELOG.md +39 -0
- package/config-sample.json +2 -2
- package/config.schema.json +10 -8
- package/index.js +4 -4
- package/lib/DeviceAccessory.js +4 -4
- package/lib/esphome.js +1 -1
- package/package.json +8 -9
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,45 @@ This package is a maintained fork of [`homebridge-esphome-ac`](https://github.co
|
|
|
7
7
|
|
|
8
8
|
---
|
|
9
9
|
|
|
10
|
+
## [0.4.0] — 2026-05-06
|
|
11
|
+
|
|
12
|
+
Naming cleanup. User-visible "ESPHome AC" / "ESPHomeAC" branding is now consistently **SLWF-01Pro**; technical references to the underlying ESPHome protocol (native API, mDNS service, Climate entity type) remain accurate where they describe the wire format the plugin speaks.
|
|
13
|
+
|
|
14
|
+
### Breaking
|
|
15
|
+
|
|
16
|
+
- **No config breakage.** Platform identifier (`SLWFOnePro`) and npm name (`homebridge-slwf-01pro`) are unchanged from 0.3.x. Existing configs and HomeKit pairings continue to work.
|
|
17
|
+
- Internal class `ESPHomeAC` in `index.js` renamed to `SLWFOnePro`. Visible only in stack traces.
|
|
18
|
+
|
|
19
|
+
### Changed
|
|
20
|
+
|
|
21
|
+
- **`package.json` `displayName`** simplified from "Homebridge SLWF-01Pro / ESPHome AC" to **"Homebridge SLWF-01Pro"**. Cleaner in the Homebridge UI plugin browser and matches the npm package name.
|
|
22
|
+
- **`package.json` `description`** rewritten to lead with SLWF-01Pro and the SMLIGHT brand; ESPHome native API mentioned as the underlying protocol, not the headline product.
|
|
23
|
+
- **`package.json` `keywords`** pruned: dropped `homebridge-esphome`, `homebridge-esphome-ac`, `esphome-ac` (upstream-related, not relevant for this fork's npm discoverability); kept `slwf`, `slwf-01pro`, `smlight`, AC-brand names; added `air-conditioner`.
|
|
24
|
+
- **`config.schema.json`** copy refreshed:
|
|
25
|
+
- `headerDisplay` linked to the SMLIGHT product page; dropped "ESPHome `Climate` entities" framing in favour of "SLWF-01Pro Wi-Fi AC dongle"
|
|
26
|
+
- `footerDisplay` mentions ESPHome native API as the underlying protocol (correct framing for users who want to use the plugin with non-SLWF ESPHome devices)
|
|
27
|
+
- `debug.description` simplified: "device state-change chatter" instead of "ESPHome state-change chatter"
|
|
28
|
+
- `autoDiscover.title` changed to "Auto-discover SLWF-01Pro devices via mDNS"; description still references the actual `_esphomelib._tcp` mDNS service since that's the literal technical fact
|
|
29
|
+
- `port` and `encryptionKey` titles simplified ("Native API port", "API encryption key (base64)")
|
|
30
|
+
- Per-device toggles unchanged
|
|
31
|
+
- **Log strings**:
|
|
32
|
+
- "Creating new ESPHome AC accessory" → "Creating new SLWF-01Pro accessory"
|
|
33
|
+
- "ESPHome device …reconnected" → "Device …reconnected"
|
|
34
|
+
- "No ESPHome devices configured…" → "No SLWF-01Pro / ESPHome devices configured…"
|
|
35
|
+
- "Browsing mDNS for ESPHome devices" / "Discovered N ESPHome devices" — kept (factually accurate; the mDNS service is `_esphomelib._tcp`).
|
|
36
|
+
- **Accessory metadata** (Apple Home → ⓘ on each AC):
|
|
37
|
+
- Manufacturer fallback: `'ESPHome'` → `'SMLIGHT'` (only used when the device doesn't report its own manufacturer; SMLIGHT is the actual hardware vendor)
|
|
38
|
+
- Model fallback: `'ESPHome AC'` → `'SLWF-01Pro'`
|
|
39
|
+
- Real `deviceInfo.manufacturer` / `deviceInfo.model` from ESPHome still take precedence — these are only fallbacks when the device YAML doesn't provide them.
|
|
40
|
+
- **`config-sample.json`** `name` field updated from `"ESPHomeAC"` to `"SLWF-01Pro"`.
|
|
41
|
+
|
|
42
|
+
### Internal
|
|
43
|
+
|
|
44
|
+
- All `[ESPHomeAC]` log prefixes will become `[SLWF-01Pro]` (or whatever you set in the `name` config field) once your `config.json`'s `name` is updated. Existing `name: "ESPHomeAC"` configs continue to work — the prefix just keeps the legacy value until you change it.
|
|
45
|
+
- 120 unit tests still pass.
|
|
46
|
+
|
|
47
|
+
---
|
|
48
|
+
|
|
10
49
|
## [0.3.3] — 2026-05-06
|
|
11
50
|
|
|
12
51
|
Fix the "config validation failed, you can still save your changes" warning shown by the Homebridge UI when editing the plugin's settings.
|
package/config-sample.json
CHANGED
|
@@ -6,11 +6,11 @@
|
|
|
6
6
|
"pin": "031-45-154"
|
|
7
7
|
},
|
|
8
8
|
|
|
9
|
-
"description": "Sample config for
|
|
9
|
+
"description": "Sample config for homebridge-slwf-01pro. Pick auto-discovery, manual devices, or both.",
|
|
10
10
|
"platforms": [
|
|
11
11
|
{
|
|
12
12
|
"platform": "SLWFOnePro",
|
|
13
|
-
"name": "
|
|
13
|
+
"name": "SLWF-01Pro",
|
|
14
14
|
"debug": false,
|
|
15
15
|
"autoDiscover": true,
|
|
16
16
|
"discoveryTimeout": 5,
|
package/config.schema.json
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
"pluginAlias": "SLWFOnePro",
|
|
3
3
|
"pluginType": "platform",
|
|
4
4
|
"singular": true,
|
|
5
|
-
"headerDisplay": "Homebridge plugin for the **SMLIGHT SLWF-01Pro** Wi-Fi dongle
|
|
6
|
-
"footerDisplay": "Maintained
|
|
5
|
+
"headerDisplay": "Homebridge plugin for the **[SMLIGHT SLWF-01Pro](https://smartlight.me/smart-home-devices/wifi-devices/wifi-dongle-air-conditioners-midea-idea-electrolux-for-home-assistant)** Wi-Fi AC dongle. Supports mDNS auto-discovery on the local network and multi-entity bundling (humidity / outdoor temperature / power sensors, Beeper / Display switches, DRY / FAN_ONLY mode tiles).",
|
|
6
|
+
"footerDisplay": "Maintained by [@nookied](https://github.com/nookied/homebridge-SLWF-01Pro). Speaks the [ESPHome native API](https://esphome.io/components/api.html), so any ESPHome Climate device on the local network is also supported.",
|
|
7
7
|
"schema": {
|
|
8
8
|
"type": "object",
|
|
9
9
|
"properties": {
|
|
@@ -14,13 +14,13 @@
|
|
|
14
14
|
},
|
|
15
15
|
"debug": {
|
|
16
16
|
"title": "Enable Debug Logs",
|
|
17
|
-
"description": "Surface
|
|
17
|
+
"description": "Surface device state-change chatter to the main log (otherwise sent to log.debug).",
|
|
18
18
|
"type": "boolean",
|
|
19
19
|
"default": false
|
|
20
20
|
},
|
|
21
21
|
"autoDiscover": {
|
|
22
|
-
"title": "Auto-discover
|
|
23
|
-
"description": "Browses
|
|
22
|
+
"title": "Auto-discover SLWF-01Pro devices via mDNS",
|
|
23
|
+
"description": "Browses the local network for ESPHome `_esphomelib._tcp` services and adds any device that exposes a Climate entity. Only works for unencrypted devices. Manually configured devices in the list below take precedence and are required for any device with the ESPHome API encryption key set.",
|
|
24
24
|
"type": "boolean",
|
|
25
25
|
"default": false
|
|
26
26
|
},
|
|
@@ -85,14 +85,16 @@
|
|
|
85
85
|
"minLength": 1
|
|
86
86
|
},
|
|
87
87
|
"port": {
|
|
88
|
-
"title": "
|
|
88
|
+
"title": "Native API port",
|
|
89
|
+
"description": "ESPHome's native API port. Default 6053; rarely needs changing.",
|
|
89
90
|
"type": "integer",
|
|
90
91
|
"default": 6053,
|
|
91
92
|
"minimum": 1,
|
|
92
93
|
"maximum": 65535
|
|
93
94
|
},
|
|
94
95
|
"encryptionKey": {
|
|
95
|
-
"title": "
|
|
96
|
+
"title": "API encryption key (base64)",
|
|
97
|
+
"description": "If your device's ESPHome YAML has `api.encryption.key:` set, paste the same base64 key here. Leave empty if encryption isn't enabled.",
|
|
96
98
|
"type": "string"
|
|
97
99
|
},
|
|
98
100
|
"disableHumiditySensor": {
|
|
@@ -164,7 +166,7 @@
|
|
|
164
166
|
"key": "devices",
|
|
165
167
|
"type": "array",
|
|
166
168
|
"title": "Manual device list",
|
|
167
|
-
"description": "Optional. Required for
|
|
169
|
+
"description": "Optional. Required for any device with the ESPHome API encryption key set (mDNS doesn't broadcast it, so auto-discovery alone won't work for those). Per-device toggles override the globals.",
|
|
168
170
|
"orderable": false,
|
|
169
171
|
"buttonText": "Add Device",
|
|
170
172
|
"expandable": true,
|
package/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
const
|
|
1
|
+
const Esphome = require('./lib/esphome');
|
|
2
2
|
|
|
3
3
|
const PLUGIN_NAME = 'homebridge-slwf-01pro';
|
|
4
4
|
const PLATFORM_NAME = 'SLWFOnePro';
|
|
5
5
|
const ACCESSORY_SCHEMA_VERSION = 2;
|
|
6
6
|
|
|
7
|
-
class
|
|
7
|
+
class SLWFOnePro {
|
|
8
8
|
constructor(log, config, api) {
|
|
9
9
|
this.api = api;
|
|
10
10
|
this.log = log;
|
|
@@ -36,7 +36,7 @@ class ESPHomeAC {
|
|
|
36
36
|
};
|
|
37
37
|
|
|
38
38
|
this.api.on('didFinishLaunching', () => {
|
|
39
|
-
Promise.resolve(
|
|
39
|
+
Promise.resolve(Esphome.init.call(this)).catch(err => {
|
|
40
40
|
this.log.error(`Plugin initialization failed: ${err.message || err}`);
|
|
41
41
|
});
|
|
42
42
|
});
|
|
@@ -55,5 +55,5 @@ class ESPHomeAC {
|
|
|
55
55
|
}
|
|
56
56
|
|
|
57
57
|
module.exports = (api) => {
|
|
58
|
-
api.registerPlatform(PLUGIN_NAME, PLATFORM_NAME,
|
|
58
|
+
api.registerPlatform(PLUGIN_NAME, PLATFORM_NAME, SLWFOnePro, true);
|
|
59
59
|
};
|
package/lib/DeviceAccessory.js
CHANGED
|
@@ -93,8 +93,8 @@ class DeviceAccessory {
|
|
|
93
93
|
}
|
|
94
94
|
this.host = device.host;
|
|
95
95
|
this.serial = this.deviceInfo.macAddress || this.id;
|
|
96
|
-
this.manufacturer = this.deviceInfo.manufacturer || '
|
|
97
|
-
this.model = this.deviceInfo.model || climate.name || '
|
|
96
|
+
this.manufacturer = this.deviceInfo.manufacturer || 'SMLIGHT';
|
|
97
|
+
this.model = this.deviceInfo.model || climate.name || 'SLWF-01Pro';
|
|
98
98
|
this.firmwareRevision = sanitizeFirmwareRevision(this.deviceInfo.esphomeVersion);
|
|
99
99
|
|
|
100
100
|
this.state = climate.state || {};
|
|
@@ -109,7 +109,7 @@ class DeviceAccessory {
|
|
|
109
109
|
this.accessory = platform.accessories.find(acc => acc.UUID === this.UUID);
|
|
110
110
|
|
|
111
111
|
if (!this.accessory) {
|
|
112
|
-
this.log(`Creating new
|
|
112
|
+
this.log(`Creating new SLWF-01Pro accessory: "${this.name}"`);
|
|
113
113
|
this.accessory = new this.api.platformAccessory(this.name, this.UUID);
|
|
114
114
|
this.accessory.context.schemaVersion = ACCESSORY_SCHEMA_VERSION;
|
|
115
115
|
this.accessory.context.deviceId = this.id;
|
|
@@ -118,7 +118,7 @@ class DeviceAccessory {
|
|
|
118
118
|
platform.accessories.push(this.accessory);
|
|
119
119
|
this.api.registerPlatformAccessories(platform.PLUGIN_NAME, platform.PLATFORM_NAME, [this.accessory]);
|
|
120
120
|
} else {
|
|
121
|
-
this.log(`
|
|
121
|
+
this.log(`Device "${this.name}" reconnected.`);
|
|
122
122
|
this.accessory.context.schemaVersion = ACCESSORY_SCHEMA_VERSION;
|
|
123
123
|
this.accessory.context.host = this.host;
|
|
124
124
|
if (PRIMARY_MODES.includes(this.state.mode)) {
|
package/lib/esphome.js
CHANGED
|
@@ -112,7 +112,7 @@ async function init() {
|
|
|
112
112
|
|
|
113
113
|
if (allDevices.length === 0) {
|
|
114
114
|
if (manualDevices.length === 0 && (!platform.autoDiscover || discoverySucceeded)) {
|
|
115
|
-
platform.log('No ESPHome devices configured and none discovered. Plugin will idle.');
|
|
115
|
+
platform.log('No SLWF-01Pro / ESPHome devices configured and none discovered. Plugin will idle.');
|
|
116
116
|
pruneOrphanedAccessories(platform, []);
|
|
117
117
|
} else {
|
|
118
118
|
platform.log.error('Auto-discovery returned no devices and no manual devices configured — keeping cached accessories. Will retry on next restart.');
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "homebridge-slwf-01pro",
|
|
3
|
-
"description": "Homebridge plugin for the SMLIGHT SLWF-01Pro Wi-Fi dongle
|
|
4
|
-
"version": "0.
|
|
3
|
+
"description": "Homebridge plugin for the SMLIGHT SLWF-01Pro Wi-Fi AC dongle. Auto-discovery, multi-entity bundling, and full Midea-protocol support over the ESPHome native API.",
|
|
4
|
+
"version": "0.4.0",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "git+https://github.com/nookied/homebridge-SLWF-01Pro.git"
|
|
@@ -9,20 +9,19 @@
|
|
|
9
9
|
"homepage": "https://github.com/nookied/homebridge-SLWF-01Pro#readme",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"preferGlobal": true,
|
|
12
|
-
"displayName": "Homebridge SLWF-01Pro
|
|
12
|
+
"displayName": "Homebridge SLWF-01Pro",
|
|
13
13
|
"keywords": [
|
|
14
14
|
"homebridge-plugin",
|
|
15
|
-
"homebridge-esphome",
|
|
16
|
-
"homebridge-esphome-ac",
|
|
17
|
-
"esphome",
|
|
18
|
-
"esphome-ac",
|
|
19
|
-
"climate",
|
|
20
15
|
"slwf",
|
|
21
16
|
"slwf-01pro",
|
|
17
|
+
"smlight",
|
|
22
18
|
"midea",
|
|
23
19
|
"electrolux",
|
|
24
20
|
"beko",
|
|
25
|
-
"neoclima"
|
|
21
|
+
"neoclima",
|
|
22
|
+
"air-conditioner",
|
|
23
|
+
"climate",
|
|
24
|
+
"esphome"
|
|
26
25
|
],
|
|
27
26
|
"bugs": {
|
|
28
27
|
"url": "https://github.com/nookied/homebridge-SLWF-01Pro/issues"
|