Skip to content

Releases: Pulpyyyy/ESPSomfy-RTS-enhanced

v3.5.0

Choose a tag to compare

@Pulpyyyy Pulpyyyy released this 11 Oct 09:22

Device health and reliable backups

New

  • Connectivity diagnostic binary sensor per device. on while the
    websocket is connected and the HTTP API answers a light probe
    (GET /rooms, 5 s timeout, every 60 s; /discovery on firmware without
    /rooms). It turns off as soon as either fails, and the entity itself
    stays available. Attributes: last_probe_ok, websocket_connected,
    ws_reconnects. Only transitions are logged (one WARNING when the device
    goes offline, one INFO when it comes back). No external Ping entry is
    needed any more to condition an automation on the device being reachable.
  • Last backup diagnostic timestamp sensor, with a backup_count
    attribute. It is derived from the backup files already on disk, so nothing
    extra is written to the device or the host.
  • Number of backups to keep option (1 to 50). Existing entries keep 5.

Changed

  • espsomfy_rts_enhanced.backup (and the Backup button) now fails with an
    error
    when the backup could not be written, or immediately, without any
    request, when the Connectivity sensor is off. Automation traces show the
    failure instead of a success.
  • Old backups are rotated only after a new one has been written.
  • The Backup button no longer turns unavailable when the websocket drops:
    Home Assistant skips unavailable entities in service calls, which turned a
    backup of an offline device into a silent no-op.

Fixed

  • Shade covers failed to be created after the firmware-room area seeding
    added since v3.4.0 ('ESPSomfyController' object has no attribute 'room_name'). This never shipped in a release.

No existing entity id or unique id changes; the new entities are additive.
See docs/Services.md
for a nightly backup automation conditioned on the Connectivity sensor.

v3.4.0

Choose a tag to compare

@Pulpyyyy Pulpyyyy released this 26 Jul 10:08

external-attrs contract — the end of multi-shade attribute ping-pong

Completes the ÷2 double-write fix from v3.3.x and removes the display freeze
that happened while several shades were moving at once.

  • Extra attributes injected by a third-party component (cover-extender, for
    instance) now travel through a shared contract
    (hass.data['cover_external_attrs']) instead of a cross state rewrite.
    No more attribute round-trips multiplying state_changed events.
  • Dynamic reader handshake: the third-party component deposits its extras,
    the cover entity soft-merges them and rewrites itself once, on a dispatcher
    signal.
  • Works with the third-party component absent — the read is soft and has no
    impact.
  • Still one entity per shade.

Tests: the pytest suite passes, including the end-to-end run against a real
Home Assistant.

v3.3.1

Choose a tag to compare

@Pulpyyyy Pulpyyyy released this 25 Jul 21:50

Fixes

  • Cover: state was written twice per shade update; it is now written once, halving state-machine churn during shade movements.
  • Version display: the device sw_version shown in Home Assistant was stuck at v3.1.0 (const.py had been left behind by the 3.2.0/3.3.0 bumps); it now matches the release.

Tests

  • Regression guard: entry setup must create the cover entities.

v3.3.0

Choose a tag to compare

@Pulpyyyy Pulpyyyy released this 25 Jul 17:38

ESPSomfy-RTS Enhanced v3.3.0

Critical fix: covers were not being created (all shades restored as unavailable).

The setup no longer relied on /discovery to carry the shade/group list — which a firmware in full-auth mode omits without a token. Setup now explicitly loads shades and groups after login, so every cover entity is created again.

Coordinated with firmware v3.3.0.

v3.2.0

Choose a tag to compare

@Pulpyyyy Pulpyyyy released this 25 Jul 13:44

ESPSomfy-RTS Enhanced v3.2.0

Coordinated with firmware v3.2.0.

Fixes

  • Garage door offers Open/Close/Stop before the first state update
  • groupRemoved now removes the group's entities and device
  • Accept both shades and linkedShades in group state
  • Config backups written with private permissions (0600), raw bytes, outside www/
  • Full config-flow error handling for offline devices (real aiohttp exceptions)
  • Robust state parsing (sentinels, non-dict payloads, missing fields)
  • Honest verify_ssl, dead code removed, dependency bounds

Notes

  • Requires firmware that authenticates by PIN if the device is in full-auth mode
  • First automated pytest suite runs in CI

v3.1.0

Choose a tag to compare

@Pulpyyyy Pulpyyyy released this 23 Jul 20:07

Structural overhaul (tested against a real device)

  • Websocket rewritten with native aiohttp: no more websocket-client thread or threading.Timer — a single asyncio task in the HA event loop, 20 s heartbeat, capped-backoff reconnection. The websocket-client dependency is removed. Tested against a real device: connection, event parsing, event filter, error path (closed port), clean shutdown during backoff, reconnection.
  • entry.runtime_data replaces hass.data[DOMAIN] (modern HA pattern, typed ESPSomfyConfigEntry alias).
  • EntityDescription subclasses are frozen kw_only dataclasses (future-proof against the FrozenOrThawed deprecation).
  • Cleanups: redundant should_poll property overrides removed, missing await on reconnection in set_host, Any annotations.

Documentation

  • The services documentation now lives in docs/Services.md; dead wiki links in the READMEs are fixed.

v3.0.2

Choose a tag to compare

@Pulpyyyy Pulpyyyy released this 23 Jul 19:48

Fixes

  • IP address sensor: the historical ip_addresss typo is fixed to ip_address. The existing entity is migrated automatically at startup (unique_id updated in the entity registry) — no entity_id change, no orphaned entity.
  • Firmware release notes: when fetching from GitHub fails, the integration no longer displays a hardcoded error string as the release notes; it logs the error and HA falls back to the release link. Explicit aiohttp timeout.

v3.0.1

Choose a tag to compare

@Pulpyyyy Pulpyyyy released this 23 Jul 19:39

Fixes (full component audit)

  • Reboot button: a wrong version comparison made it disappear with firmware >= 3.0.0.
  • Backup rotation: targeted a non-existent directory (ESPSomfyRTS_espsomfy_<id>) so it never ran. Fixed (keeps the 5 most recent files), runs outside the event loop, failures are logged.
  • Authentication: the apikey header is now sent on every REST command (shadeCommand, groupCommand, tiltCommand, shades, groups) — fixes 401 errors on devices with restricted permissions.
  • Button availability: buttons never went unavailable when the ESP disconnected.
  • Setup: platforms are loaded after a successful login (no more double loading on retry); the websocket reconnect timer is cancelled on unload (leak fixed).
  • Config flow: crash on some login errors fixed; non-existent wrong_host error key replaced with invalid_host.
  • Update entity: SPECIFIC_VERSION is now honored; misplaced parenthesis in switch.py; kwargs were passed incorrectly to CoverGroup.

New

  • Reauth flow: if the device rejects the stored credentials, HA now prompts for new ones (en/fr/de/es).
  • Automatic reload after changing the host or credentials in the options flow.
  • Toggle shade types (one-button garage doors, gates): dynamic OPEN/CLOSE/STOP buttons based on the current movement (the function existed upstream but was never wired up).

Cleanup

Dead code was checked against the rstrouse upstream before removal (unfinished restore action, ensure_*_configured, unused constants); aiofiles pinned; empty homekit block removed.

v3.0.0

Choose a tag to compare

@Pulpyyyy Pulpyyyy released this 19 Jul 09:22

Fixes

  • Backup 401 fixed: the integration now logs in to the ESPSomfy-RTS device during setup, so the API key is set and authenticated REST calls (backup) work.
  • Backup failures are now logged with the HTTP status and response instead of failing silently.

Changes

  • Repository links (manifest, README) now point to Pulpyyyy/ESPSomfy-RTS-enhanced.
  • Manual dispatch enabled for the hassfest workflow.