Use Modbus Float64 as Number in OpenHab
Published by cybso on
The Alfens Wallboxes uses Modbus registers of data type FLOAT64 which are not known to OpenHab (for example registers 374-378 which contains the "Total Energy Delivered").
But using Groovy scripting there's a VERY simple way to handle that with a Thing to Item transformation. Choose "Signed Int64" as data type, link the item to "Value as Number" and use the following expression as "Thing to Item" transformation with "SCRIPT Groovy" profile:
|Double.longBitsToDouble(input as long)
Optionally, devide the result by 1000.0 to comvert Wh to kWh.