Skip to content

feat: add dimmer board safety package (heatsink NTC + overcurrent + health alarms) - #156

Open
merryspankersltd wants to merge 1 commit into
hacf-fr:mainfrom
merryspankersltd:pr/dimmer-safety
Open

feat: add dimmer board safety package (heatsink NTC + overcurrent + health alarms)#156
merryspankersltd wants to merge 1 commit into
hacf-fr:mainfrom
merryspankersltd:pr/dimmer-safety

Conversation

@merryspankersltd

Copy link
Copy Markdown
Contributor

Summary

Adds a new optional package solar_router/dimmer_safety.yaml providing local safety for the RobotDyn AC Dimmer 40 A "with current sensor" (premium variant: heatsink NTC, 5 V fan, built-in CT):

  • Heatsink temperature limiter (works without WiFi / Home Assistant): hysteresis on safety_limit, fail-safe on sensor failure (NaN)
  • Overcurrent cutout: load current >= threshold sets safety_limit, restart below lower threshold
  • Health alarms (no power cut): Triac Stuck ON / Boiler Not Powered / Current Sensor Failure

The package owns the shared safety_limit global (same as the temperature limiter packages) — only one safety limiter package per configuration.

Files

  • solar_router/dimmer_safety.yaml — the package
  • esp32-dimmer-safety.yaml — full usage example (triac + engine_1dimmer + safety)
  • docs/en/dimmer_safety.md, docs/fr/dimmer_safety.md, mkdocs nav entries

Validation

  • esphome config valid (esp32dev, with substitutions)
  • tools/check_build_coverage.sh OK
  • tools/check_documentation_coverage.sh OK
  • mkdocs build --strict OK

@XavierBerger XavierBerger left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice job thanks for your contribution. I'll be happy to merge it. I did add few comment about your proposal, mainly on doc since I can't really validate the behavior of the code your provide.

Comment thread docs/en/dimmer_safety.md

3. **Health alarms** (informational, no power cut):
- *Triac Stuck ON*: current flowing while the regulator is closed (shorted triac)
- *Boiler Not Powered*: regulator open but no current (dead triac / gate)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Boiler Not Powered: regulator open but no current (dead triac / gate)

This could be normal. No?
When the water is hot enough the thermostat cut the current so even if the regulator is at 100% not current is flowing. Is that case taken in account in you module?

Comment thread docs/en/dimmer_safety.md
@@ -0,0 +1,53 @@
# Dimmer board safety (RobotDyn AC Dimmer 40 A "with current sensor")

This package adds local safety for the **RobotDyn AC Dimmer 40 A "with current sensor"** (premium variant: heatsink NTC + 5 V fan + built-in CT current sensor).

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe a picture of the Dimmer will help the user to understand what is the hardware to use.

Comment thread docs/en/dimmer_safety.md
@@ -0,0 +1,53 @@
# Dimmer board safety (RobotDyn AC Dimmer 40 A "with current sensor")

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1/ The name of this module is not following the convention of naming.

This is a regulator operating a Robodyn 40A module the the name should start with regulator_ fo example : regulator_robodyn_40

2/ As far as I understand, it also had a temperature sensor on heat-sink, isn't it?

Comment thread mkdocs.yml
- Home Assistant: temperature_limiter_home_assistant.md
- DS18B20: temperature_limiter_DS18B20.md
- Dimmer board safety:
- RobotDyn 40 A with current sensor: dimmer_safety.md

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a regulator (including additional safety) so it should be in regulator section

Comment thread docs/en/dimmer_safety.md
| `overcurrent_restart_current` | `8.0` | Overcurrent restart threshold (A RMS) |
| `current_calibration_factor` | `1.0` | CT calibration (A per V on the CUR pin), tune on the bench |

The NTC calibration (`ntc_reference_*`, `ntc_b_coefficient`, `ntc_configuration`) can be adjusted to match the board's divider — see the bench procedure.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see bench procedure

where?

Comment thread docs/fr/dimmer_safety.md
Il fournit trois niveaux de protection :

1. **Limiteur de température du dissipateur** — fonctionne sans WiFi ni Home Assistant :
- dissipateur >= `heatsink_stop_temperature` → `safety_limit = True` (le moteur passe à 0 %)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dissipateur

ici, je parlerais plutôt de température du dissipateur

Comment thread docs/fr/dimmer_safety.md
2. **Coupure surintensité** — courant de charge >= `overcurrent_current` → `safety_limit = True`
- débloqué une fois le courant repassé sous `overcurrent_restart_current`

3. **Alarmes de santé** (informatives, pas de coupure) :

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alarmes de santé

Là, je dirais plutôt Alarme de sécurité ...

If french is not you native language, I could review this part from English. Anyway, this is still a good start. Thanks.

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.

2 participants