Skip to content

Fix plantmode write no-op on Elco Aerotop device classified as GALEVO instead of bsb#184

Open
albertorosso wants to merge 1 commit into
fustom:mainfrom
albertorosso:main
Open

Fix plantmode write no-op on Elco Aerotop device classified as GALEVO instead of bsb#184
albertorosso wants to merge 1 commit into
fustom:mainfrom
albertorosso:main

Conversation

@albertorosso

@albertorosso albertorosso commented Jul 12, 2026

Copy link
Copy Markdown

(partially generated with claude AI)

Some devices classified by the cloud as SystemType.GALEVO (observed on an Elco Aerotop heat pump with a BSB controller) accept plant mode writes via the REST v2 endpoint (POST /api/v2/remote/dataItems/{gw}/set) and receive {"success": true}, but the command has no real effect on the physical device.

The official web client (remocon-net.remotethermo.com), for this same gateway, never uses the REST v2 write path at all — it uses a legacy ASP.NET MVC-style endpoint:

POST /R2/PlantHome/GetData/{gatewayId}?umsys={umsys}   (read)
POST /R2/PlantHome/SetData/{gatewayId}?umsys={umsys}   (write)

```confirmed via HAR capture of a successful "set to OFF" action (response changedItems shows PlantMode → 5.0).
This may be related to #299 and #424 (on the other repository) which describe similar symptoms on Elco/Ariston heat pump devices.

**Root cause**
The device's cloud-reported system_type is GALEVO, so AristonGalevoDevice (not AristonBsbDevice) is instantiated, and its async_set_plant_mode uses the modern REST v2 write path — which the cloud silently accepts but does not propagate to this device's physical unit. Reads work fine on REST v2; only writes are affected.

**Fix**

- Added legacy_r2_client.py: an isolated client for the legacy /R2/ read/write path (separate session/auth from the main AristonAPI, since auth mechanisms differ - session cookies vs bearer token).

- AristonGalevoDevice.async_set_plant_mode now verifies the write by re-reading state (async_update_state) shortly after the REST v2 write; if the value didn't actually change, it falls back automatically to the legacy client.

- Added ariston_api.py public username/password properties so the legacy client can reuse the already-configured credentials without extra user configuration.

- Bundled default_viewmodel_template.json: the site does not expose a clean read endpoint for the full viewModel object required by the legacy write (it's built client-side in JS from the initial page render). This is a pragmatic starting point captured from a real working request, with device-specific fields (gatewayId) overwritten dynamically at call time. 

- Known limitation: this template may not generalize cleanly to all GALEVO/BSB device variants - a more general future fix could parse the live viewModel from the initial /R2/Plant/Index page HTML instead of relying on a static bundled capture.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant