thingsboard / thingsboard-gateway

Open-source IoT Gateway - integrates devices connected to legacy and third-party systems with ThingsBoard IoT Platform using Modbus, CAN bus, BACnet, BLE, OPC-UA, MQTT, ODBC and REST protocols
https://thingsboard.io/docs/iot-gateway/what-is-iot-gateway/
Apache License 2.0
1.76k stars 846 forks source link

[HELP] Problem when trying to get data from a float32 with the modbus connector #1453

Open JoseHoz opened 4 months ago

JoseHoz commented 4 months ago

We are trying to make a proof of concept of how the thingsboard edge works together with the IOT gateway to be able to get the information from some powermeters via modbus directly.

We are able to connect via modbus to the device and read the data, but for some reason the value returned is not what it should show us. From Kepserver we see that this powermeter gives a voltage value (for example 200.60V) but when we get the value from the connector we get values of this format: 0.00000000000000000000000000000000000000007346867718608583

we have "played" with the "byteOrder" and the "wordOrder" , doing all the possible configurations but without success. Attached is the file we use to configure the device. modbus_powermeter.txt

Our powermeter manual tells us that the value to be read for the voltage value is a float32 type, but we can't see where we are going wrong.

Can anyone who has been in the same situation help us?

Thanks in advance

**Connector name [ MODBUS Connector]

Versions: