homebridge-ac-freedom 2.3.2 → 2.3.3
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 +5 -0
- package/README.md +93 -38
- package/package.json +1 -1
- package/src/platform.js +17 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 2.3.3
|
|
4
|
+
|
|
5
|
+
- **Hybrid offline startup** — if cloud is unavailable at Homebridge startup and the device has a local IP + MAC configured, the device now starts in local-only mode instead of failing. Full hybrid mode resumes automatically on the next restart when internet is available.
|
|
6
|
+
- **Hybrid endpoint fallback** — if a configured `endpointId` is not found in the cloud device list (e.g. after a cloud outage), the device also falls back to local-only mode when IP + MAC are set.
|
|
7
|
+
|
|
3
8
|
## 2.3.2
|
|
4
9
|
|
|
5
10
|
- **Fix AUTO mode byte overflow** — local protocol uses 3-bit mode field; AUTO is now correctly encoded as 0 (not 8, which silently truncated to 0 in the wrong byte position)
|
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
# Homebridge AC Freedom
|
|
8
8
|
|
|
9
|
-
A [Homebridge](https://homebridge.io) plugin for controlling **AUX-based air conditioners** via **Apple HomeKit**. Works with any AC that uses the **AC Freedom** app. Supports **
|
|
9
|
+
A [Homebridge](https://homebridge.io) plugin for controlling **AUX-based air conditioners** via **Apple HomeKit**. Works with any AC that uses the **AC Freedom** app. Supports **Hybrid** (AUX Cloud + optional local Broadlink UDP) and **Local** (Broadlink UDP only) connection modes — no extra hub required.
|
|
10
10
|
|
|
11
11
|
[](https://github.com/homebridge/homebridge/wiki/Verified-Plugins)
|
|
12
12
|
[](https://www.npmjs.com/package/homebridge-ac-freedom)
|
|
@@ -31,10 +31,11 @@ A [Homebridge](https://homebridge.io) plugin for controlling **AUX-based air con
|
|
|
31
31
|
- Self Clean
|
|
32
32
|
- Comfortable Wind
|
|
33
33
|
- **Display** switch — LED display on/off
|
|
34
|
-
- **Auto-reset** — fan and sleep reset to default when AC turns on or
|
|
35
|
-
- **
|
|
36
|
-
- **Local** — Direct Broadlink UDP, no internet required
|
|
34
|
+
- **Auto-reset** — fan and sleep reset to default when AC turns on/off or mode changes
|
|
35
|
+
- **Hybrid** — single cloud login at platform level; optional IP + MAC per device for local Broadlink UDP (local preferred, cloud fallback)
|
|
36
|
+
- **Local** — Direct Broadlink UDP only, no internet required
|
|
37
37
|
- **Multi-device** — configure as many ACs as needed
|
|
38
|
+
- **Custom config UI** — built-in Homebridge UI with Fetch Devices button
|
|
38
39
|
- Homebridge v1 & v2 compatible
|
|
39
40
|
|
|
40
41
|
---
|
|
@@ -56,7 +57,7 @@ Any air conditioner compatible with the **AC Freedom** app is supported:
|
|
|
56
57
|
- [Homebridge](https://homebridge.io) v1.6.0 or later (v2 supported)
|
|
57
58
|
- Node.js v18.0.0 or later
|
|
58
59
|
- An AUX-compatible AC with Wi-Fi (Broadlink module)
|
|
59
|
-
- **
|
|
60
|
+
- **Hybrid:** AC Freedom app account (email registration)
|
|
60
61
|
- **Local:** AC's IP and MAC address on your local network
|
|
61
62
|
|
|
62
63
|
---
|
|
@@ -68,6 +69,7 @@ Any air conditioner compatible with the **AC Freedom** app is supported:
|
|
|
68
69
|
1. Open the Homebridge UI → **Plugins**
|
|
69
70
|
2. Search for `homebridge-ac-freedom`
|
|
70
71
|
3. Click **Install**
|
|
72
|
+
4. Open plugin settings, enter your cloud credentials and press **Fetch** to auto-discover your devices
|
|
71
73
|
|
|
72
74
|
**Via terminal:**
|
|
73
75
|
|
|
@@ -77,9 +79,50 @@ npm install -g homebridge-ac-freedom
|
|
|
77
79
|
|
|
78
80
|
---
|
|
79
81
|
|
|
82
|
+
## Connection Modes
|
|
83
|
+
|
|
84
|
+
### Hybrid (recommended)
|
|
85
|
+
|
|
86
|
+
Cloud credentials are configured **once at platform level**. All your devices are auto-discovered via the cloud. Optionally add an IP + MAC per device for direct local Broadlink UDP control — local is used when available and automatically falls back to cloud.
|
|
87
|
+
|
|
88
|
+
### Local Only
|
|
89
|
+
|
|
90
|
+
Direct Broadlink UDP communication only. No cloud account needed, but Homebridge must be on the same network as the AC.
|
|
91
|
+
|
|
92
|
+
---
|
|
93
|
+
|
|
80
94
|
## Configuration
|
|
81
95
|
|
|
82
|
-
|
|
96
|
+
The easiest way to configure is through the **Homebridge UI** — enter your credentials and press **Fetch** to auto-populate your devices.
|
|
97
|
+
|
|
98
|
+
For manual JSON configuration:
|
|
99
|
+
|
|
100
|
+
### Hybrid Mode
|
|
101
|
+
|
|
102
|
+
```json
|
|
103
|
+
{
|
|
104
|
+
"platforms": [
|
|
105
|
+
{
|
|
106
|
+
"platform": "AcFreedom",
|
|
107
|
+
"name": "AC Freedom",
|
|
108
|
+
"cloud": {
|
|
109
|
+
"email": "your-email@example.com",
|
|
110
|
+
"password": "your-password",
|
|
111
|
+
"region": "eu"
|
|
112
|
+
},
|
|
113
|
+
"devices": [
|
|
114
|
+
{
|
|
115
|
+
"name": "Living Room AC",
|
|
116
|
+
"connection": "hybrid",
|
|
117
|
+
"endpointId": "your-device-endpoint-id"
|
|
118
|
+
}
|
|
119
|
+
]
|
|
120
|
+
}
|
|
121
|
+
]
|
|
122
|
+
}
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
### Hybrid Mode with Local Override
|
|
83
126
|
|
|
84
127
|
```json
|
|
85
128
|
{
|
|
@@ -87,14 +130,19 @@ npm install -g homebridge-ac-freedom
|
|
|
87
130
|
{
|
|
88
131
|
"platform": "AcFreedom",
|
|
89
132
|
"name": "AC Freedom",
|
|
133
|
+
"cloud": {
|
|
134
|
+
"email": "your-email@example.com",
|
|
135
|
+
"password": "your-password",
|
|
136
|
+
"region": "eu"
|
|
137
|
+
},
|
|
90
138
|
"devices": [
|
|
91
139
|
{
|
|
92
140
|
"name": "Living Room AC",
|
|
93
|
-
"connection": "
|
|
94
|
-
"
|
|
95
|
-
|
|
96
|
-
"
|
|
97
|
-
"
|
|
141
|
+
"connection": "hybrid",
|
|
142
|
+
"endpointId": "your-device-endpoint-id",
|
|
143
|
+
"local": {
|
|
144
|
+
"ip": "192.168.1.100",
|
|
145
|
+
"mac": "AA:BB:CC:DD:EE:FF"
|
|
98
146
|
}
|
|
99
147
|
}
|
|
100
148
|
]
|
|
@@ -103,7 +151,7 @@ npm install -g homebridge-ac-freedom
|
|
|
103
151
|
}
|
|
104
152
|
```
|
|
105
153
|
|
|
106
|
-
### Local Mode
|
|
154
|
+
### Local Only Mode
|
|
107
155
|
|
|
108
156
|
```json
|
|
109
157
|
{
|
|
@@ -130,42 +178,46 @@ npm install -g homebridge-ac-freedom
|
|
|
130
178
|
|
|
131
179
|
## Configuration Options
|
|
132
180
|
|
|
133
|
-
###
|
|
134
|
-
|
|
135
|
-
| Option | Type | Required | Default | Description |
|
|
136
|
-
|--------|------|----------|---------|-------------|
|
|
137
|
-
| `name` | string | Yes | — | Device name in HomeKit |
|
|
138
|
-
| `connection` | string | Yes | `"cloud"` | Connection mode: `cloud` or `local` |
|
|
139
|
-
| `pollInterval` | integer | No | `30` | Polling interval in seconds (5–300) |
|
|
140
|
-
| `tempStep` | number | No | `0.5` | Temperature step: `0.5` or `1` |
|
|
181
|
+
### Platform-level Cloud Credentials (`cloud` object)
|
|
141
182
|
|
|
142
|
-
|
|
183
|
+
Required for Hybrid mode. Configured once, shared by all hybrid devices.
|
|
143
184
|
|
|
144
185
|
| Option | Type | Required | Default | Description |
|
|
145
186
|
|--------|------|----------|---------|-------------|
|
|
146
187
|
| `email` | string | Yes | — | AC Freedom app email |
|
|
147
188
|
| `password` | string | Yes | — | AC Freedom app password |
|
|
148
189
|
| `region` | string | No | `"eu"` | Server region: `eu`, `usa`, `cn`, `rus` |
|
|
149
|
-
| `deviceId` | string | No | — | Specific device ID (leave empty to auto-detect) |
|
|
150
190
|
|
|
151
|
-
###
|
|
191
|
+
### Device Options
|
|
152
192
|
|
|
153
193
|
| Option | Type | Required | Default | Description |
|
|
154
194
|
|--------|------|----------|---------|-------------|
|
|
155
|
-
| `
|
|
156
|
-
| `
|
|
195
|
+
| `name` | string | Yes | — | Device name in HomeKit |
|
|
196
|
+
| `connection` | string | No | `"hybrid"` | `"hybrid"` or `"local"` |
|
|
197
|
+
| `endpointId` | string | No | — | Cloud device ID (auto-detected if empty) |
|
|
198
|
+
| `pollInterval` | integer | No | `30` | Polling interval in seconds (5–300) |
|
|
199
|
+
| `tempStep` | number | No | `0.5` | Temperature step: `0.5` or `1` |
|
|
200
|
+
|
|
201
|
+
### Local Settings (`local` object, per device)
|
|
202
|
+
|
|
203
|
+
| Option | Type | Required | Description |
|
|
204
|
+
|--------|------|----------|-------------|
|
|
205
|
+
| `ip` | string | Yes | AC unit's local IP address |
|
|
206
|
+
| `mac` | string | Yes | AC unit's MAC address (`AA:BB:CC:DD:EE:FF`) |
|
|
157
207
|
|
|
158
208
|
### Feature Switches
|
|
159
209
|
|
|
160
210
|
| Option | Type | Default | Description |
|
|
161
211
|
|--------|------|---------|-------------|
|
|
162
|
-
| `presets.sleep` | boolean | `true` | Sleep Mode switch |
|
|
163
|
-
| `presets.health` | boolean | `true` | Health / Ionizer switch |
|
|
164
|
-
| `presets.eco` | boolean | `true` | Eco / Mildew Prevention switch |
|
|
165
|
-
| `presets.clean` | boolean | `true` | Self Clean switch |
|
|
166
|
-
| `showComfWind` | boolean | `true` | Comfortable Wind switch |
|
|
167
|
-
| `showDisplay` | boolean | `true` | Display (LED) switch |
|
|
168
212
|
| `showFan` | boolean | `true` | Fan speed slider |
|
|
213
|
+
| `presets.sleep` | boolean | `true` | Sleep Mode switch |
|
|
214
|
+
| `presets.health` | boolean | `false` | Health / Ionizer switch |
|
|
215
|
+
| `presets.eco` | boolean | `false` | Eco / Mildew Prevention switch |
|
|
216
|
+
| `presets.clean` | boolean | `false` | Self Clean switch |
|
|
217
|
+
| `showComfWind` | boolean | `false` | Comfortable Wind switch |
|
|
218
|
+
| `showDisplay` | boolean | `false` | Display (LED) switch |
|
|
219
|
+
|
|
220
|
+
> **Tip:** For a clean HomeKit appearance, enable **Fan** and only one preset mode — **Sleep** is the recommended choice.
|
|
169
221
|
|
|
170
222
|
---
|
|
171
223
|
|
|
@@ -183,14 +235,17 @@ All linked services appear as tiles inside the climate card.
|
|
|
183
235
|
|
|
184
236
|
---
|
|
185
237
|
|
|
186
|
-
##
|
|
238
|
+
## Hybrid vs Local
|
|
187
239
|
|
|
188
|
-
| |
|
|
240
|
+
| | Hybrid | Local Only |
|
|
189
241
|
|---|---|---|
|
|
190
|
-
| Internet required |
|
|
191
|
-
| Setup | Easy
|
|
192
|
-
| Response time | ~1–2 s | ~0.5 s |
|
|
242
|
+
| Internet required | For setup only¹ | No |
|
|
243
|
+
| Setup | Easy — Fetch button auto-fills | Moderate (IP + MAC required) |
|
|
244
|
+
| Response time | ~1–2 s (cloud) / ~0.5 s (local) | ~0.5 s |
|
|
193
245
|
| Works remotely | Yes | No |
|
|
246
|
+
| Local fallback | Yes (when IP + MAC configured) | — |
|
|
247
|
+
|
|
248
|
+
> ¹ **Hybrid + IP/MAC:** if internet is unavailable at startup, the device starts in local-only mode automatically. Full hybrid resumes on the next restart when internet is available.
|
|
194
249
|
|
|
195
250
|
---
|
|
196
251
|
|
|
@@ -203,8 +258,8 @@ All linked services appear as tiles inside the climate card.
|
|
|
203
258
|
- Logging into the AC Freedom app may invalidate the plugin session — restart Homebridge after using the app
|
|
204
259
|
|
|
205
260
|
**Device not found**
|
|
206
|
-
-
|
|
207
|
-
-
|
|
261
|
+
- Leave `endpointId` empty for auto-detection (first discovered device is used)
|
|
262
|
+
- Use the **Fetch** button in the Homebridge UI to discover and auto-fill your device IDs
|
|
208
263
|
|
|
209
264
|
**"Server busy" errors**
|
|
210
265
|
- These are transient and automatically suppressed
|
package/package.json
CHANGED
package/src/platform.js
CHANGED
|
@@ -141,8 +141,16 @@ class AcFreedomPlatform {
|
|
|
141
141
|
}
|
|
142
142
|
|
|
143
143
|
if (!sharedCloud) {
|
|
144
|
+
// Cloud unavailable — fall back to local if IP+MAC is configured
|
|
145
|
+
if (deviceConfig.local?.ip && deviceConfig.local?.mac) {
|
|
146
|
+
this.log.warn(
|
|
147
|
+
'Hybrid device %s: cloud unavailable — starting in local-only mode at %s',
|
|
148
|
+
deviceConfig.name, deviceConfig.local.ip,
|
|
149
|
+
);
|
|
150
|
+
return this.setupLocalDevice(deviceConfig);
|
|
151
|
+
}
|
|
144
152
|
this.log.error(
|
|
145
|
-
'Hybrid device %s:
|
|
153
|
+
'Hybrid device %s: cloud unavailable and no local IP/MAC configured',
|
|
146
154
|
deviceConfig.name,
|
|
147
155
|
);
|
|
148
156
|
return null;
|
|
@@ -154,6 +162,14 @@ class AcFreedomPlatform {
|
|
|
154
162
|
if (endpointId) {
|
|
155
163
|
cloudDevice = sharedCloud.devices.find(d => d.endpointId === endpointId);
|
|
156
164
|
if (!cloudDevice) {
|
|
165
|
+
// endpointId not found in cloud — fall back to local if available
|
|
166
|
+
if (deviceConfig.local?.ip && deviceConfig.local?.mac) {
|
|
167
|
+
this.log.warn(
|
|
168
|
+
'Hybrid device %s: endpointId "%s" not found in cloud — starting in local-only mode',
|
|
169
|
+
deviceConfig.name, endpointId,
|
|
170
|
+
);
|
|
171
|
+
return this.setupLocalDevice(deviceConfig);
|
|
172
|
+
}
|
|
157
173
|
this.log.error(
|
|
158
174
|
'Hybrid device %s: endpointId "%s" not found among cloud devices',
|
|
159
175
|
deviceConfig.name, endpointId,
|