influxdata / telegraf

Agent for collecting, processing, aggregating, and writing metrics, logs, and other arbitrary data.
https://influxdata.com/telegraf
MIT License
14.7k stars 5.59k forks source link

Modbus: Unsigned float #15909

Open nischu opened 2 months ago

nischu commented 2 months ago

Use Case

I am using power meters that provide measurement values using a Non-IEEE floating point formats:

Unsigned Measurement (32 bit):

Signed Measurement (32 bit)

I am looking for a way to configure/extend the modbus input plugin to handle these values.

Am I right that currently, only IEEE (signed) float values are supported? Can I just come up with new data_types like UFLOAT32 and MSIGN_FLOAT32 (as the mantissa holds the sign)?

I'd be able to implement it on my own, just checking what a sane convention would be.

Kind regards

nischu

Expected behavior

I would like the Modbus input plugin to generate correct floating point values

Actual behavior

I cannot really specify this custom data type

Additional info

https://cdn.findernet.com/app/uploads/Benutzerhandbuch_Typ_7M38_DE.pdf page 52

srebhan commented 1 month ago

From my perspective we can add these strange types if we do find a clear and unique name for those like Finder_T5_Float32 with good description of the layout and a link to the definition document.

Would you be able and willing to put up a PR?