Repository navigation
feat(modbus): show the pump mode as off/auto/manual in tedge-dot - #13
Merged
Merged
Conversation
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]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The
modepoint in the tedge-dot point library (apps/modbus-server/points.d/modbus/zephyr-modbus-pump.toml) now uses tedge-dot's valuemap. It turns the holding register's 0/1/2 intooff/auto/manual.zephyr_modbus_pump_control_parameterstwin carry the name instead of the number.tedge-dot describe --format c8y-dtmgeneratesmodeas a string enum, so the Parameters tab shows a dropdown.min/maxare removed frommeta.parameter. The map already limits the values, and on a string enum they only ended up as meaninglessminimum/maximumin 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:
quality: good.modereads as"manual"(raw0002).parameter_updatewith{"mode": "manual"}completessuccessful.🤖 Generated with Claude Code