feat: support simple cmd payload without register info#48
Merged
reubenmiller merged 1 commit intothin-edge:mainfrom Oct 30, 2025
Merged
feat: support simple cmd payload without register info#48reubenmiller merged 1 commit intothin-edge:mainfrom
reubenmiller merged 1 commit intothin-edge:mainfrom
Conversation
Robot Results
Passed Tests
|
90b62ad to
6f03a24
Compare
6f03a24 to
a0fac3e
Compare
| target_device = { | ||
| "protocol": "TCP", | ||
| "ip": ip, | ||
| "ip": ip_address or "127.0.0.1", |
Contributor
There was a problem hiding this comment.
This isn't directly related to your change (as you just moved the existing logic), but this line is redundant, as the ip_address will never be false because this block is anyway behind an if statement (e.g. if ip_address)
Contributor
There was a problem hiding this comment.
But that's fine, we can leave it as is for now.
reubenmiller
approved these changes
Oct 30, 2025
Contributor
reubenmiller
left a comment
There was a problem hiding this comment.
Approved. Nice extension, and great to see systems tests
Supports simple cmd payload without register info; made register address 6 and 7 writabl; fixed writing float issue; rename legacy with explicit
a0fac3e to
43ee193
Compare
reubenmiller
approved these changes
Oct 30, 2025
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.
Now the set_register and set_coil support two kinds of payload, one legacy c8y operation payload with full register info that saved by c8y cloud Fieldbus; one new simple operation payload that only includes registerid/coilid and value.
To be able to handle the new simple payload, the device identity will be extracted from the te topic. devices.toml now has 'name' field for register and coil to help locate the corresponding register or coil.
Now the plugin can also write float value to a register but only with the simple payload.
Added some tests into the tests/modbus_reader/operations.robot, it's working fine locally.