v0.5.0
This commit is contained in:
+31
-53
@@ -1,67 +1,45 @@
|
||||
# GREE Controller v0.4.5 - build and validation report
|
||||
|
||||
## v0.4.5 compile fix
|
||||
|
||||
- Fixed Rust borrow-checker error `E0502` in `GreeProtocol::poll`.
|
||||
- The bound device key is now cloned into an owned `String` before mutating the `Device` with `apply_status`.
|
||||
- Subsequent full/core/`OutEnvTem` status requests borrow that owned key, so no immutable borrow of `device.key` survives across the mutable device update.
|
||||
|
||||
# GREE Controller v0.5.0 - build and validation report
|
||||
|
||||
## Scope
|
||||
|
||||
Version 0.4.4 fixes empty/under-populated history views and expands climate telemetry across GREE devices, zones and Home Assistant sensors. It also adds URL-addressable UI pages, History sub-pages, a saved/shareable custom chart composer, redesigned toasts and optimistic Quick Thermostat controls that no longer clear the active preset.
|
||||
Version 0.5.0 focuses on dashboard thermostat control, metric retention/archiving, quieter GREE commands, diagnostics, configuration backup and a machine-readable automation plan shared by the Web UI and Home Assistant.
|
||||
|
||||
## History and chart changes
|
||||
## Implemented changes
|
||||
|
||||
- `readings` remains the independent history source for every GREE device, whether or not the device belongs to a zone.
|
||||
- Added bucketed device-history queries for indoor temperature, available GREE `OutEnvTem`, target and power.
|
||||
- Added `ha_readings` for configured HA room/outdoor sensors.
|
||||
- Existing `zone_readings` remains the rich thermostat timeline with GREE temperature, HA room temperature, control temperature, target, actual device setpoint, outdoor temperature, power, mode, fan, demand, source and preset.
|
||||
- `/api/history?scope=overview` returns device, zone and HA streams together plus row counts.
|
||||
- If a zone has no `zone_readings` yet, the API reconstructs a compatibility timeline from its existing device `readings` instead of returning an empty chart.
|
||||
- Older rich zone samples can be exposed as compatibility HA history when the dedicated HA table has not accumulated samples yet.
|
||||
- GREE polling now probes `OutEnvTem` separately after a core-property fallback so models that expose outdoor temperature can contribute that series without making the main poll fail.
|
||||
- History UI is split into Overview, Zones, GREE devices, HA sensors and Custom chart sub-pages.
|
||||
- Overview includes common charts for all GREE indoor temperatures, available outdoor temperatures and all zone control temperatures.
|
||||
- The custom chart composer can mix GREE device, zone and HA sensor series, save chart definitions in browser storage and serialize them into a shareable URL.
|
||||
|
||||
## Browser navigation and feedback
|
||||
|
||||
- Main application views use stable paths such as `/dashboard`, `/devices`, `/zones`, `/schedules`, `/automations`, `/settings` and `/events`.
|
||||
- History uses `/history/overview`, `/history/zones`, `/history/devices`, `/history/sensors` and `/history/custom`.
|
||||
- Browser Back/Forward and direct page refresh are handled by History API routing plus the server-side index fallback.
|
||||
- Toasts are now stacked, theme-aware success/error cards with close controls and progress indicators.
|
||||
|
||||
## Quick Thermostat fix
|
||||
|
||||
- `+/-` updates the displayed target immediately and batches rapid taps with a short debounce.
|
||||
- Stale HTTP responses cannot overwrite a newer tap.
|
||||
- Added `manual_setpoint` separately from `manual_preset`.
|
||||
- A temperature nudge no longer changes Auto/Comfort/Sleep/Away to `custom` or clears the active preset.
|
||||
- Manual temperature correction still expires at the next schedule boundary.
|
||||
|
||||
## SQLite / compatibility
|
||||
|
||||
- Added `ha_readings` and indexes through idempotent `CREATE TABLE IF NOT EXISTS` schema initialization.
|
||||
- All SQL remains centralized in `src/queries.rs`.
|
||||
- Existing `readings`, devices, zones, schedules, automations and settings are preserved.
|
||||
- No database reset is required.
|
||||
- Quick Thermostat cards on the dashboard can enable/disable a zone directly; the edit dialog is no longer required for this action.
|
||||
- SQLite history housekeeping is tiered to chart resolution: full recent data, 10-minute buckets after 24 hours and 30-minute buckets after 7 days.
|
||||
- Optional long-term InfluxDB archive supports both InfluxDB 1.x (database/basic auth) and 2.x (org/bucket/token), from persisted settings or environment variables.
|
||||
- New samples are written to SQLite and InfluxDB in parallel when the archive is enabled.
|
||||
- Maintenance backfills compacted legacy SQLite samples older than the configured Influx handoff age. A local row is deleted only after the Influx batch succeeds; archive failures keep the SQLite copy.
|
||||
- History requests crossing the handoff age merge old InfluxDB data with recent SQLite data and fall back to SQLite when the archive query fails.
|
||||
- Device commands are reduced to fields that actually changed. Optional GREE buzzer suppression uses `Buzzer_ON_OFF`/`BuzzerCtrl`; incompatible devices automatically fall back to normal frames and are remembered for the running process.
|
||||
- Toast progress indicators have horizontal inset so they stay inside rounded toast corners.
|
||||
- Settings can be exported/imported as JSON. Metrics, event logs and generated API-token records are preserved during import. Exported configuration contains configured secrets and must be protected.
|
||||
- Optional on-screen debug overlay is available on every Web UI route, can be changed through `/api/debug`, shows controller events plus live HTTP method/path/status timing and can include sanitized decrypted GREE request/response payloads.
|
||||
- `/api/control-plan` exposes house state, current zone decisions, schedules, upcoming transitions and automation rules/time events.
|
||||
- The dashboard renders the control plan as blocks with current targets/demand and upcoming actions.
|
||||
- Home Assistant integration now also exposes whole-house/per-zone plan sensors, writable per-zone target-temperature `number` entities and per-zone enable `switch` entities via the restricted integration API.
|
||||
|
||||
## Validation performed in packaging environment
|
||||
|
||||
- JavaScript syntax: `node --check web/app.js`.
|
||||
- JSON validation for EN/PL language packs, PWA manifest and HA manifest.
|
||||
- Shell syntax validation for every `scripts/*.sh` file.
|
||||
- Python syntax validation for helper scripts.
|
||||
- SQLite execution tests for the schema, device bucket queries, zone bucket queries, HA bucket queries and history counts.
|
||||
- EN/PL translation-key parity check.
|
||||
- Verified project SQL statements remain centralized in `src/queries.rs`.
|
||||
- Verified no Node/npm/Tailwind runtime or build dependency exists.
|
||||
- ZIP integrity and SHA-256 manifest verification.
|
||||
- `node --check web/app.js`.
|
||||
- Python syntax validation for the Home Assistant integration and helper scripts.
|
||||
- Shell syntax validation for all `scripts/*.sh` files.
|
||||
- JSON validation for EN/PL language packs, PWA manifest, Home Assistant manifest and HA translations.
|
||||
- EN/PL UI translation-key parity and literal UI translation-reference validation.
|
||||
- SQLite schema execution plus tiered compaction tests.
|
||||
- SQLite archive-selection query tests for device, zone and Home Assistant histories.
|
||||
- Configuration-clear behavior verified to preserve metric history, event logs and API tokens.
|
||||
- Version consistency checked for Cargo package, Cargo lock root package, README and Home Assistant manifest.
|
||||
- Archive ZIP integrity and SHA-256 manifest are verified during final packaging.
|
||||
|
||||
A Rust toolchain is not installed in the packaging environment. The authoritative Rust compile/tests are therefore intentionally performed on the target LXC by `scripts/update.sh` before it replaces the running binary:
|
||||
## Rust compiler note
|
||||
|
||||
The packaging environment does not contain `rustc`, `cargo` or `rustfmt`, so a Rust compile cannot be executed here. Regression tests were added for unchanged-command filtering and history compaction; the target LXC update/install scripts remain the authoritative compile gate and run:
|
||||
|
||||
```bash
|
||||
cargo test --all-targets
|
||||
cargo build --release
|
||||
```
|
||||
|
||||
The update script must complete those commands before replacing the running binary.
|
||||
|
||||
Reference in New Issue
Block a user