Skip to content

feat(modbus): show the pump mode as off/auto/manual in tedge-dot - #13

Merged
reubenmiller merged 1 commit into
mainfrom
feat/pump-mode-enum-map
Oct 6, 2026
Merged

reubenmiller merged 1 commit into
mainfrom
feat/pump-mode-enum-map

Conversation

@reubenmiller

Copy link
Copy Markdown
Contributor

Summary

The mode point in the tedge-dot point library (apps/modbus-server/points.d/modbus/zephyr-modbus-pump.toml) now uses tedge-dot's value map. It turns the holding register's 0/1/2 into off/auto/manual.

  • Samples and the zephyr_modbus_pump_control_parameters twin carry the name instead of the number.
  • tedge-dot describe --format c8y-dtm generates mode as a string enum, so the Parameters tab shows a dropdown.
  • Writes take the name.
  • min/max are removed from meta.parameter. The map already limits the values, and on a string enum they only ended up as meaningless minimum/maximum in the DTM schema.

Needs a tedge-dot with value maps (0.0.11 or later).

Testing

On the rpi5 gateway (tedge-dot 0.0.11) with the S3 Modbus board:

  • All 15 points read with quality: good. mode reads as "manual" (raw 0002).
  • parameter_update with {"mode": "manual"} completes successful.
  • I regenerated the DTM definition and re-registered it on thin-edge-io.eu-latest. Both pump child devices' twins hold string modes that match it.

🤖 Generated with Claude Code

The tedge-dot point library maps the mode holding register to its names
with tedge-dot's value map, so samples, the twin and the generated DTM
definition carry "off", "auto" or "manual" instead of 0..2, and the
Parameters tab offers a dropdown. Writes take the name. The min/max
bounds are dropped: the map bounds the values, and on a string enum they
only leaked into the DTM schema.

Needs a tedge-dot with value maps (0.0.11 or later).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@reubenmiller
reubenmiller merged commit 8f6d954 into main Oct 6, 2026
21 checks passed
@reubenmiller
reubenmiller deleted the feat/pump-mode-enum-map branch October 6, 2026 20:59
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