0.5.0: riordino come l'app ufficiale (home, Dati, Impianto)

- home: temperatura esterna e in casa/assente in alto, messaggio di stato,
  scheda impianto con temperatura stanza e acqua calda; comandi sotto
- pagina Dati: calore prodotto, elettricita' usata, COP acqua calda e
  riscaldamento, risparmio, CO2 evitata, Smart Tariff Control (mese per mese)
- pagina Impianto: stato, termostato a parete, versioni software, errori
- bridge 0.4.0: rotta /stats (servizio statistiche del cloud) e blocco
  dispositivo in /summary (ID breve, versioni, termostato)
- C++: parseStats, formatNumber, formatMoney, monthLabel (separatore e
  valuta secondo la lingua); 61/61 verifiche del nucleo
- anteprime aggiornate (dati, impianto) in inglese e italiano
This commit is contained in:
2026-10-10 08:59:03 +02:00
parent ec7333a185
commit 4f279a18b0
30 changed files with 2355 additions and 353 deletions
+49 -25
View File
@@ -9,12 +9,21 @@ status, domestic hot water, and the house target temperature per zone.
## What it does
- **Home**: house temperature and room temperature at the top, target with a
5–30 °C slider (0.5 °C steps) and a confirmation before the command is sent;
domestic hot water (current, target, boost) in its own section below; plant
status at the bottom (outdoor and indoor temperature, operating mode,
away/night/manual mode, inline heater, number of zones, errors, time of the
last reading)
- **Home**, organised like the official Aira app: outdoor temperature and
*at home / away* at the top, a plain-language status line ("Relax: the heat
pump is running smoothly"), then the **plant card** with the two readings that
matter (room temperature and domestic hot water, each with its target).
Tapping the card opens the plant page. Below that the controls: house target
with a 5–30 °C slider (0.5 °C steps) and a confirmation before the command
leaves, domestic hot water target (45–60 °C) and the boost buttons
- **Data** page: heat produced, electricity used, efficiency (COP) for hot water
and heating, savings on the bill, CO₂ avoided and the Smart Tariff Control
saving, month by month. These are the numbers Aira computes in the cloud,
exactly as in the official app's *Data* tab
- **Plant** page: status (connection, mode, away/night/forced heating, outdoor
and indoor temperature, zones, last reading), accessories (the wall thermostat
with temperature, humidity, signal, battery), software versions and the error
count
- **Other commands** page: away mode, night mode for one hour, force heating,
heating function on/off, legionella cycle, DHW heating on/off and a plant
check — with the current state at the top, so nothing is pressed blindly
@@ -30,9 +39,13 @@ status, domestic hot water, and the house target temperature per zone.
Layout previews (rendered with the real values the plant returned, **not**
screenshots — see *Status*):
| Home | Other commands | Settings | Cover |
|---|---|---|---|
| ![home](docs/anteprima/dashboard.png) | ![commands](docs/anteprima/comandi.png) | ![settings](docs/anteprima/impostazioni.png) | ![cover](docs/anteprima/copertina.png) |
| Home | Data | Plant |
|---|---|---|
| ![home](docs/anteprima/dashboard.png) | ![data](docs/anteprima/dati.png) | ![plant](docs/anteprima/impianto.png) |
| Other commands | Settings | Cover |
|---|---|---|
| ![commands](docs/anteprima/comandi.png) | ![settings](docs/anteprima/impostazioni.png) | ![cover](docs/anteprima/copertina.png) |
## Why there is a bridge
@@ -104,26 +117,31 @@ cd tests && mkdir -p build && cd build
~/Qt/5.15.2/gcc_64/bin/qmake ../core_test.pro && make && ./core_test
```
Covers the pure logic (`src/airajson.cpp`): address normalisation, summary
parsing, mode labels, command payloads, error messages.
Covers the pure logic (`src/airajson.cpp`): address normalisation, summary and
statistics parsing, mode labels, command payloads, error messages, and the
number/currency/month formatting used by the Data page.
**The Silica UI can only be verified on a device.**
## Status
Verified so far:
- **39/39** core checks (`tests/core_test.cpp`), compiled with no warnings
- **27/27** bridge checks, offline (`bridge/test_bridge_commands.py`) —
including that a zone command always carries every zone, and that absurd
values are refused (40 °C, zone 3, text)
- **99/99** strings translated in the Italian catalogue, checked by loading the
compiled `.qm` in the test the same way `main.cpp` does: source English in,
Italian out, and back to English when the catalogue is removed
- numbers formatted through `QLocale`, so the decimal separator follows the
language (verified for both)
- **61/61** core checks (`tests/core_test.cpp`), compiled with no warnings
- **48/48** bridge checks, offline (`bridge/test_bridge_commands.py`) —
including that a zone command always carries every zone, that absurd values
are refused (40 °C, zone 3, text), and the Wh→kWh / money conversions of the
statistics
- **170/170** strings translated in the Italian catalogue, checked by loading
the compiled `.qm` in the test the same way `main.cpp` does: source English
in, Italian out, and back to English when the catalogue is removed
- numbers, amounts and month names formatted through `QLocale`, so the decimal
separator and the currency position follow the language (verified for both)
- `qmllint` clean on every QML file. Note it validates syntax only: without the
Silica module an invalid Silica property passes silently
- read-only queries against one real Aira Home unit, through the bridge
- read-only queries against one real Aira Home unit, through the bridge —
including the cloud statistics, which match what the official app shows for
the same period (heat produced 70.8 kWh, electricity 29.3 kWh, hot-water COP
4.42, Smart Tariff Control saving €2.71)
- the bridge runs as a systemd user unit and comes back by itself after a kill
Not verified: **the app has not been built or run on a phone yet** — the first
@@ -144,8 +162,11 @@ Caveats:
- tested against **one** unit so far (firmware: outdoor unit 1.30.0, system
6.10.0, climate control 3.9.12); other units and other countries may expose
different fields
- cooling is reachable from the bridge but has no UI yet; schedules/curves and
firmware info are not implemented
- cooling is reachable from the bridge but has no UI yet; schedules/curves are
not implemented, and firmware versions are shown read-only
- the Data page depends on Aira's own statistics service: on a very new
installation some months have no data yet (the app then writes *no data*
instead of a number)
- only a whitelist of commands is exposed: factory reset, firmware updates,
reboots and Wi-Fi provisioning are deliberately unreachable
- no command is ever sent to the plant by the tests
@@ -171,10 +192,13 @@ src/settings.{h,cpp} QSettings in AppConfigLocation (SailJail sandbox)
src/translator.{h,cpp} UI language: system locale, English fallback, reload
src/main.cpp context properties: appSettings, api, translator
qml/harbour-aira.qml ApplicationWindow + cover
qml/pages/MainPage.qml dashboard and water/heating commands
qml/pages/MainPage.qml home: status, plant card, heating and water
qml/pages/DataPage.qml energy, efficiency and savings
qml/pages/PlantPage.qml status, accessories, versions, errors
qml/pages/CommandsPage.qml the other commands, current state on top
qml/pages/SettingsPage.qml
qml/components/InfoRow.qml
qml/components/InfoRow.qml label on the left, value on the right
qml/components/ValueRow.qml title + subtitle left, big value right
qml/components/ActionButton.qml command button, optional confirmation
tests/core_test.cpp core checks (headless)
bridge/ local HTTP bridge -> see bridge/README.md