Skip to content

feat(inputs.modbus): Add workaround for devices with smaller batch size#18871

Merged
skartikey merged 5 commits into
influxdata:masterfrom
srebhan:modbus_issue_16873
May 15, 2026
Merged

feat(inputs.modbus): Add workaround for devices with smaller batch size#18871
skartikey merged 5 commits into
influxdata:masterfrom
srebhan:modbus_issue_16873

Conversation

@srebhan
Copy link
Copy Markdown
Member

@srebhan srebhan commented May 8, 2026

Summary

This PR allows to define a workaround with maximum batch sizes other than the ones defined in the Modbus specification (125 for holding and input registers and 2000 for coil and discrete inputs registers). This is necessary as some (out-of-spec) devices require smaller sizes.

Checklist

Related issues

resolves #16873

@telegraf-tiger telegraf-tiger Bot added area/modbus feat Improvement on an existing feature such as adding a new setting/mode to an existing plugin plugin/input 1. Request for new input plugins 2. Issues/PRs that are related to input plugins labels May 8, 2026
@srebhan srebhan added the ready for final review This pull request has been reviewed and/or tested by multiple users and is ready for a final review. label May 11, 2026
Copy link
Copy Markdown
Contributor

@skartikey skartikey left a comment

Choose a reason for hiding this comment

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

@srebhan Thanks! Please take a look at the comments.

Comment thread plugins/inputs/modbus/README.md Outdated
Comment thread plugins/inputs/modbus/sample_general_end.conf Outdated
Comment thread plugins/inputs/modbus/request.go
Comment thread plugins/inputs/modbus/configuration_metric_test.go Outdated
Comment thread plugins/inputs/modbus/modbus.go
srebhan and others added 3 commits May 11, 2026 20:59
Co-authored-by: skartikey <s.kartikey@gmail.com>
Co-authored-by: skartikey <s.kartikey@gmail.com>
@srebhan srebhan requested a review from skartikey May 11, 2026 19:07
@telegraf-tiger
Copy link
Copy Markdown
Contributor

Copy link
Copy Markdown
Contributor

@skartikey skartikey left a comment

Choose a reason for hiding this comment

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

@srebhan Thanks!

@skartikey skartikey merged commit ae5fae9 into influxdata:master May 15, 2026
27 checks passed
@github-actions github-actions Bot added this to the v1.39.0 milestone May 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/modbus feat Improvement on an existing feature such as adding a new setting/mode to an existing plugin plugin/input 1. Request for new input plugins 2. Issues/PRs that are related to input plugins ready for final review This pull request has been reviewed and/or tested by multiple users and is ready for a final review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

inputs.modbus plugin supports custom maxBatchSize

2 participants