v0.13.0
This commit is contained in:
+16
-5
@@ -1,6 +1,6 @@
|
||||
# GREE Controller API reference
|
||||
|
||||
HTTP and WebSocket API for GREE Controller **0.12.1**.
|
||||
HTTP and WebSocket API for GREE Controller **0.13.0**.
|
||||
|
||||
[← Main documentation](../README.md)
|
||||
|
||||
@@ -206,6 +206,7 @@ Common statuses:
|
||||
| GET | `/api/access-tokens` | List generated HA tokens without secrets. |
|
||||
| POST | `/api/access-tokens` | Create restricted HA token. |
|
||||
| DELETE | `/api/access-tokens/{id}` | Revoke token. |
|
||||
| GET | `/api/integrations/home-assistant/snapshot` | Restricted devices + groups + control-plan snapshot in one request. |
|
||||
| GET | `/api/integrations/home-assistant/devices` | Restricted device list. |
|
||||
| POST | `/api/integrations/home-assistant/devices/{id}/command` | Restricted direct device command. |
|
||||
| GET | `/api/integrations/home-assistant/control-plan` | Restricted control plan. |
|
||||
@@ -230,7 +231,7 @@ Response:
|
||||
{
|
||||
"status": "ok",
|
||||
"name": "gree-controller",
|
||||
"version": "0.12.1",
|
||||
"version": "0.13.0",
|
||||
"uptime_seconds": 1234,
|
||||
"control_ready": true,
|
||||
"time": "2026-08-30T06:54:00Z"
|
||||
@@ -253,8 +254,10 @@ Returns the initial Web UI snapshot:
|
||||
"access_tokens": [],
|
||||
"house": {"mode": "cool"},
|
||||
"outdoor_temperature": null,
|
||||
"control_plan": {"generated_at": "2026-09-04T08:00:00Z", "zones": [], "rules": []},
|
||||
"control_plan_revision": 42,
|
||||
"system": {
|
||||
"version": "0.12.1",
|
||||
"version": "0.13.0",
|
||||
"uptime_seconds": 1234,
|
||||
"auth_required": false,
|
||||
"control_ready": true,
|
||||
@@ -941,7 +944,8 @@ When InfluxDB is enabled, older history can be read from Influx and merged with
|
||||
|
||||
### `GET /api/control-plan`
|
||||
|
||||
Returns the resolved machine-readable thermostat plan:
|
||||
Returns the latest materialized machine-readable thermostat plan. The response shape is unchanged; the bundled Web UI receives plan updates primarily through WebSocket and uses this endpoint for fallback/resynchronization.
|
||||
|
||||
|
||||
Top-level fields:
|
||||
|
||||
@@ -1330,6 +1334,10 @@ Returns `Device[]`.
|
||||
|
||||
Accepts `DeviceCommand`. A direct command is rejected if the device belongs to a disabled thermostat zone; re-enable the zone for normal HA/controller ownership or use the administrator technical device endpoint deliberately.
|
||||
|
||||
### `GET /api/integrations/home-assistant/snapshot`
|
||||
|
||||
Returns `devices`, `groups`, `control_plan` and `control_plan_revision` in one restricted request. The bundled Home Assistant coordinator uses this endpoint to reduce its normal refresh from three HTTP requests to one. The existing restricted devices/groups/control-plan endpoints remain available.
|
||||
|
||||
### `GET /api/integrations/home-assistant/control-plan`
|
||||
|
||||
Same payload as administrator `GET /api/control-plan`.
|
||||
@@ -1401,12 +1409,13 @@ Every server event uses:
|
||||
}
|
||||
```
|
||||
|
||||
The first frame is always `bootstrap` with the same payload as `GET /api/bootstrap`, unless bootstrap generation itself fails.
|
||||
The first frame is always `bootstrap` with the same payload as `GET /api/bootstrap`, including `control_plan` and `control_plan_revision`, unless bootstrap generation itself fails. If the generic event queue is overrun, the server sends another full `bootstrap` to resynchronize the client instead of silently continuing with missed state.
|
||||
|
||||
Common live events include:
|
||||
|
||||
```text
|
||||
bootstrap
|
||||
control_plan.updated
|
||||
device.created
|
||||
device.updated
|
||||
device.deleted
|
||||
@@ -1439,6 +1448,8 @@ gree.frame
|
||||
log.created
|
||||
```
|
||||
|
||||
`control_plan.updated` uses `data.revision` plus `data.plan`. Revisions increase only when the materialized plan changes semantically; `generated_at` alone does not create a new revision.
|
||||
|
||||
Additional engine/integration events may be introduced without changing the envelope.
|
||||
|
||||
`api.request` data:
|
||||
|
||||
Reference in New Issue
Block a user