telegraf icon indicating copy to clipboard operation
telegraf copied to clipboard

[inputs.modbus] Modbus UDP Feature Resquest

Open theruskian opened this issue 3 years ago • 3 comments

Feature Request

Add the ability to use Modbus/TCP over a UDP transport.

Proposal:

Add the ability to poll Modbus/TCP slaves over UDP controller = "udp://localhost:502"

Current behavior:

controller = "tcp://localhost:502" modbus plugin establishes a TCP connection to the modbus slaves and polls registers

Desired behavior:

controller = "udp://localhost:502" modbus plugin send modbus request over UDP to poll registers

Use case:

Modbus slaves that support UDP would benefit from the reduced overhead especially when telegraf isn't the only master polling the device for data. The same RTUoverTCP and ASCIIoverTCP options could remain.

theruskian avatar Feb 16 '22 20:02 theruskian

Telegraf uses this modbus go library to establish connections. I would suggest filing a feature request upstream to request this feature and then Telegraf could make use of it.

Until the upstream support is in place, I think we are better off closing this issue for now.

Thanks

powersj avatar Feb 16 '22 20:02 powersj

@powersj Hi Joshua,

I believe the upstream support is now available. Would it be possible to re-open this request?

https://github.com/grid-x/modbus/issues/50#issuecomment-1485305707 Solved by https://github.com/grid-x/modbus/pull/85

theruskian avatar Jun 29 '24 03:06 theruskian

Would it be possible to re-open this request?

Done - are you planning to put up a PR?

powersj avatar Jul 01 '24 14:07 powersj