telegraf: inputs.modbus falsely reports duplicate field
Relevant telegraf.conf
## Define a request sent to the device
[[inputs.modbus.request]]
slave_id = 9
byte_order = "ABCD"
register = "holding"
fields = [
{ address=32000, measurement="Bitfield", name="State1", type="UINT16" },
{ address=32002, measurement="Bitfield", name="State2", type="UINT16" },
{ address=32003, measurement="Bitfield", name="State3", type="UINT32" },
{ address=32008, measurement="Bitfield", name="Alarm1", type="UINT16" },
{ address=32009, measurement="Bitfield", name="Alarm2", type="UINT16" },
{ address=32010, measurement="Bitfield", name="Alarm3", type="UINT16" },
{ address=32016, measurement="Voltage", name="PV1", type="INT16", scale=0.1, output="FLOAT64" },
{ address=32017, measurement="Current", name="PV1", type="INT16", scale=0.01, output="FLOAT64" },
{ address=32018, measurement="Voltage", name="PV2", type="INT16", scale=0.1, output="FLOAT64" },
{ address=32019, measurement="Current", name="PV2", type="INT16", scale=0.01, output="FLOAT64" },
{ address=32020, measurement="Voltage", name="PV3", type="INT16", scale=0.1, output="FLOAT64" },
{ address=32021, measurement="Current", name="PV3", type="INT16", scale=0.01, output="FLOAT64" },
{ address=32022, measurement="Voltage", name="PV4", type="INT16", scale=0.1, output="FLOAT64" },
{ address=32023, measurement="Current", name="PV4", type="INT16", scale=0.01, output="FLOAT64" },
{ address=32064, measurement="Power", name="DC", type="INT32", output="FLOAT64" },
{ address=32080, measurement="Power", name="AC", type="INT32", output="FLOAT64" },
{ address=32086, measurement="Power", name="Efficiency", type="UINT16", scale=0.01, output="FLOAT64" },
{ address=32087, measurement="Temp", name="Internal", type="INT16", scale=0.1, output="FLOAT64" },
{ address=32088, measurement="Resistance", name="Insulation", type="UINT16", scale=0.001, output="FLOAT64" },
{ address=32089, measurement="Status", name="Device", type="UINT16" },
]
[inputs.modbus.request.tags]
resource = "30KTL"
Logs from Telegraf
2022-10-24T15:50:16+02:00 E! [telegraf] Error running agent: could not initialize input inputs.modbus: configuraton invalid: field "PV1" duplicated in measurement "Current" (slave 9/"holding")
System info
Telegraf 1.24.2, Debian 11
Docker
No response
Steps to reproduce
- try to start telegraf with the shown inputs.modbus config
Expected behavior
Telegraf should start with no error as the field PV1 is not duplicate in measurement Current
Actual behavior
Error thrown (see log)
Additional info
I triple checked the config and Iām 99.9% sure the config is correct and PV1 is not multiple
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 18 (8 by maintainers)
Commits related to this issue
- Add test-case for issue #12091 — committed to srebhan/telegraf by srebhan 2 years ago
Uuppps, sorry. I thought its up to me to close it š