tjhowse / modbus4mqtt

Modbus TCP <-> MQTT glue. YAML configuration. Robust.
Other
78 stars 34 forks source link

Cannot convert signed 32 bit values #27

Closed icypete closed 3 years ago

icypete commented 3 years ago

Some addresses like Energy Meter Power (address 5083-5084) are signed 32 bit values. There doesn't seem to be a way to read these values (type: int32 did not work). Also, the code looks to read all values as uint16 first and then try and convert them to an actual type so maybe 32 values can't be converted at the moment.

icypete commented 3 years ago

oh, just saw that in modbus4mqtt.py there is to following line in validate_registers so I assume int32 is not supported yet. HAppy to help code this is needed.

    valid_types = ['uint16', 'int16']
tjhowse commented 3 years ago

That would be a great feature to have! I've got an issue outstanding for multi-word register support here: #6 Let's centralise the discussion there.

icypete commented 3 years ago

Opps, sorry, neglected to check the open issues.

On Wed, 13 Jan 2021, 8:50 am Travis Howse, notifications@github.com wrote:

That would be a great feature to have! I've got an issue outstanding for multi-word register support here: #6 https://github.com/tjhowse/modbus4mqtt/issues/6 Let's centralise the discussion there.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/tjhowse/modbus4mqtt/issues/27#issuecomment-759087181, or unsubscribe https://github.com/notifications/unsubscribe-auth/ASFAZOYB3LJ2OHPJ6G5IVSTSZTG3NANCNFSM4V7YASLA .