v0.3.6
This commit is contained in:
+21
-33
@@ -1,57 +1,45 @@
|
||||
# GREE Controller v0.3.5 - build and validation report
|
||||
# GREE Controller v0.3.6 - build and validation report
|
||||
|
||||
## Scope
|
||||
|
||||
Version 0.3.5 focuses on mixed-generation GREE networks and mobile day-to-day control.
|
||||
Version 0.3.6 fixes real-device binding failures observed on a mixed five-unit GREE network in a multi-NIC LXC.
|
||||
|
||||
### GREE protocol fixes
|
||||
### Protocol fixes
|
||||
|
||||
- corrected the standard AES-128-ECB generic key,
|
||||
- corrected the standard AES-128-GCM generic key,
|
||||
- GCM now uses the fixed 12-byte nonce and `qualcomm-test` AAD used by EWPE/GREE Wi-Fi modules,
|
||||
- discovery detects GCM by the response `tag` and decrypts it with the GCM generic key,
|
||||
- discovery supports Auto/V1/V2 filtering and 1-10 repeated scan passes,
|
||||
- protocol packets use `cid="app"`, `i=1` for bind and `i=0` for status/commands,
|
||||
- Celsius commands follow the standard command payload and use whole-degree `SetTem`; `TemRec` is not misused as a Celsius half-degree flag,
|
||||
- bind refreshes the device with a direct scan and falls back between ECB/GCM,
|
||||
- discovery attempts an immediate bind and persists the successful protocol/key,
|
||||
- status falls back to a smaller core property list if a model rejects the extended list,
|
||||
- command failure triggers one fresh-bind retry before returning an error,
|
||||
- polling also performs a one-time rebind/retry before increasing the communication failure counter.
|
||||
- GREE AES-GCM decoding now accepts non-canonical Base64 trailing bits and optional padding. This matches the forgiving decoding behavior used by established Python GREE implementations and fixes `Invalid last symbol ... offset 21` errors from real Wi-Fi modules.
|
||||
- GCM decrypted payloads discard `0xff` filler bytes used by some modules.
|
||||
- ECB decoding keeps normal PKCS#7 validation but has a compatibility fallback that trims decrypted data at the last JSON `}` when a legacy module returns non-standard padding.
|
||||
- Bind waits ignore late discovery packets instead of accidentally treating a `dev` packet as the bind result.
|
||||
- Before each bind, the controller refreshes the short GREE bind window with a subnet broadcast scan when the device is on a directly connected IPv4 network. The same UDP socket is then used immediately for the bind request.
|
||||
- ECB/GCM fallback remains enabled and successful binding persists the detected protocol and device key.
|
||||
|
||||
### Availability behavior
|
||||
### Multi-NIC behavior
|
||||
|
||||
- one UDP timeout no longer immediately marks a device offline,
|
||||
- a device is marked offline after 3 consecutive communication failures,
|
||||
- successful bind/poll/command resets the failure counter.
|
||||
|
||||
### Web UI
|
||||
|
||||
- newly discovered units open a friendly-name step, and they can also be renamed later from the Devices view,
|
||||
- unnamed units receive a model/MAC-based fallback name instead of `Klimatyzator GREE`,
|
||||
- discovery dialog exposes Auto/V1/V2, scan passes and total scan time,
|
||||
- zone cards have direct +/- 0.5 C controller setpoint controls; physical GREE setpoints are normalized to whole Celsius degrees,
|
||||
- zone cards have direct Heat/Cool buttons without opening the edit dialog.
|
||||
- If `GREE_CONTROLLER_GREE_INTERFACE` is configured, all GREE UDP sockets are bound to the current IPv4 address of that interface.
|
||||
- If no GREE interface is configured, the controller now automatically selects the local IPv4 address whose subnet contains the target GREE device. For the reported LXC this resolves `10.87.65.x` traffic to the `10.87.65.27/25` interface instead of leaving the socket bound to `0.0.0.0`.
|
||||
- The automatically selected subnet broadcast is also used to refresh the bind window (for example `10.87.65.127:7000`).
|
||||
|
||||
## Validation performed
|
||||
|
||||
| Check | Result |
|
||||
|---|---|
|
||||
| JavaScript syntax (`node --check web/app.js`) | PASS |
|
||||
| JSON parsing for EN/PL language packs | PASS |
|
||||
| EN/PL JSON parsing | PASS |
|
||||
| Shell syntax (`bash -n scripts/*.sh`) | PASS |
|
||||
| Python syntax for scripts and HA integration | PASS |
|
||||
| SQL remains centralized in `src/queries.rs` | PASS |
|
||||
| No operator `.sh`/`.py` scripts in the project root | PASS |
|
||||
| Package naming remains `gree_controller` / `GREE_CONTROLLER_*` | PASS |
|
||||
| ZIP integrity | performed during release packaging |
|
||||
|
||||
A full `./scripts/dev.sh --check` was attempted in the packaging environment, but Rust is not preinstalled and DNS access to `sh.rustup.rs` is blocked there. Final Rust type-check, tests and release build are therefore performed by `scripts/update.sh` or `scripts/install.sh` inside the target LXC.
|
||||
The packaging environment does not contain the Rust toolchain, so the final Rust type-check, tests and optimized build are intentionally performed by `scripts/update.sh` on the target LXC before the installed binary is replaced.
|
||||
|
||||
Recommended LXC update:
|
||||
## Recommended LXC test
|
||||
|
||||
```bash
|
||||
sudo ./scripts/update.sh
|
||||
./scripts/service.sh health
|
||||
journalctl -u gree-controller -n 150 --no-pager
|
||||
sudo ./scripts/configure-gree-network.sh eth1
|
||||
journalctl -u gree-controller -f
|
||||
```
|
||||
|
||||
For the reported mixed-model network, start discovery with **Auto (V1 + V2)**, 3 passes and 6000 ms. If fewer units appear, run V1-only and V2-only scans separately and inspect the service log.
|
||||
Expected request logs should show a concrete local address such as `10.87.65.27:<port>` rather than `0.0.0.0:<port>`.
|
||||
|
||||
Reference in New Issue
Block a user