Skip to content

fix(ems): improve telemetry, deduplicate commands and fix setpoint quantization - #189

Open
StefanoPierini wants to merge 3 commits into
Alexwijn:releases/thermo-novafrom
StefanoPierini:fix-ems-telemetry-dedup
Open

StefanoPierini wants to merge 3 commits into
Alexwijn:releases/thermo-novafrom
StefanoPierini:fix-ems-telemetry-dedup

Conversation

@StefanoPierini

Copy link
Copy Markdown

Summary of Changes

This PR improves stability and telemetry handling for Energy Management System (EMS/EMS-ESP) boilers:

  1. Deduplicate Outgoing MQTT Commands:

    • Tracks last published values for selflowtemp and burnmaxpower to prevent flooding the EMS-ESP gateway every 5 seconds.
    • Maintains a 30-second safety keepalive heartbeat for active heating flow setpoints.
  2. Do Not Toggle heatingactivated on EMS Boilers:

    • On Buderus/Bosch EMS boilers, heatingactivated controls the master Summer/Winter mode (Heizbetrieb ein/aus).
    • Toggling it on/off on every cycle triggers the boiler's 15-minute Siphon Filling Program (Siphonfüllprogramm, Service Function 2.4F), locking burner power to 14% on subsequent demands (starving DHW/showers).
    • Delegated async_set_heater_state to super, keeping central heating control strictly driven by selflowtemp (>0 for demand, 0 for idle) as native EMS room thermostats do.
  3. Bridge Float Quantization and Integer Rounding:

    • Buderus/Bosch EMS boilers only accept integer flow setpoints (1°C resolution).
    • Rounds outgoing flow setpoints to integers (int(round(value))) and bridges the reported integer back to the internal target when matching, eliminating persistent oscillations and false alarms on control_setpoint_synchro (e.g. 51.9 != 52).
  4. Dynamic DHW Telemetry & DHW Priority:

    • Expanded hot_water_active detection to dynamically detect tapwateractive, dhwcharging, and dhw_charging with robust boolean truthy check.
    • Suppresses heating setpoint overrides during active DHW production to preserve DHW priority.
    • Maps idle flow setpoint (0°C) to MINIMUM_SETPOINT (10.0°C) to prevent false sync alarms during heating idle periods.

…antization

- Deduplicate outgoing MQTT commands (selflowtemp, burnmaxpower) to prevent flooding EMS-ESP every 5 seconds.
- Do not toggle 'heatingactivated' in async_set_heater_state, avoiding unintended boiler Summer/Winter mode transitions that trigger the 15-minute Siphon Filling Program on Buderus/Bosch boilers.
- Map idle flow setpoint (0°C) to MINIMUM_SETPOINT to prevent false positive sync alarms when heating is idle.
- Expand hot_water_active detection to include EMS-ESP telemetry ('tapwateractive', 'dhwcharging', 'dhw_charging') with robust boolean truthy check.
- Suppress heating setpoint overrides during active DHW production to preserve DHW priority.
- Send integer-rounded flow setpoints (matching EMS telegram 1°C resolution) and bridge float quantisation to prevent control_setpoint_synchro false alarms.
- Maintain a 30-second safety keepalive heartbeat for active heating setpoint.
@coderabbitai

coderabbitai Bot commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

🗂️ Base branches to auto review: 1
  • master

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 010ccef2-e585-48fe-91be-9828f6334eb1

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

… timeout

EMS-ESP firmware has a ~4-minute safety timeout on thermostat flow setpoints.
A 60s keepalive interval ensures regular setpoint updates before EMS-ESP
falls back to 0, preventing unintended burner cutoffs and short-cycling.
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