Skip to content

Coordinator and runtime updates

Tom-Bom-badil edited this page Sep 15, 2026 · 1 revision

Once a TROVIS config entry has been set up, normal operation is intentionally simple: one coordinator refreshes the shared controller state and all entities use that result.

This page is the single reference for polling, availability, communication errors and runtime recovery.


⏱️ Polling and the coordinator

The Home Assistant integration uses one DataUpdateCoordinator per TROVIS config entry.

The current integration polls the controller at a fixed interval of 60 seconds.

The coordinator:

  1. calls the shared Trovis557x instance,
  2. lets the library perform the planned grouped reads,
  3. publishes the refreshed device state to all entity platforms.

Entities do not poll independently.

DataUpdateCoordinator
        │
        ▼
Trovis557x.async_update()
        │
        ▼
library components / grouped reads
        │
        ▼
ModbusUnit
        │
        ▼
connection

This keeps controller I/O serialized and predictable.




🚨 Communication errors and recovery

Transport and protocol errors are represented through the modbus-connection exception hierarchy.

At the Home Assistant boundary, normal communication failures are converted to UpdateFailed.

Conceptually:

try:
    await device.async_update()
except ModbusError as err:
    raise UpdateFailed(...) from err

The result is normal Home Assistant coordinator behavior:

  • the update fails,
  • affected entities become unavailable,
  • the config entry remains loaded,
  • a later coordinator refresh tries communication again.

The integration does not reload the complete config entry for every temporary Modbus failure.

This is intentional. A transient socket loss should not recreate the full controller model, device tree, and entity platforms.

The connection is closed when the config entry is actually unloaded.




🔁 Why the config entry is not reloaded on every error

Temporary transport errors are normal runtime failures.

The coordinator reports a failed refresh and lets the existing connection try again on a later update. Reloading the complete config entry for every dropped socket would unnecessarily recreate the controller model, device tree and entity platforms.

A config-entry reload is therefore a lifecycle action, not the normal reconnect strategy.


🧩 Entity availability

Entities do not communicate with the TROVIS independently. They consume the state refreshed by the shared coordinator.

That means a communication problem affects the shared controller update rather than causing individual entities to open their own Modbus connections.

Entity creation and identity rules are documented in Devices-and-entities.


📚 Related pages

german Wiki - Start english


english Bauanleitungen

Schritt 1 - Kabel

Schritt 2 - Adapter

Schritt 3 - Schnittstelle

Schritt 4 - Regler

Schritt 5 - Erster Test

🔥 Update: Weitere Adapter


english Home Assistant Integration

🚀 Getting started

🔌 Using the integration

🧑‍💻 Technical reference

🔢 Related projects


english SmartHomeNG Plugin


german2 Anhang: Info-Sammlung

Clone this wiki locally