i’m in OpenHab 3 (latest Stable) and managed to get the ModBus Binding talking to my Wallbox (Car Charger).
I have one item which holds the limit of current for the charging port.
The Item recieves a value of 110 for 11 Ampere (so needs to be transformed by dividing it by 10 to get the correct value). This works as planned.
But now i want to set the item value to a new current to have the modbus binding sending it back to the wallbox to set a new maximum current value.
If i want to set the maximum current to lets say 32 Amps i need to send a value of 320 to the wallbox via modbus.
I’ve added a slider widget to the ui and attached it to the item holding the current amps value. The Slider shows the human readable amps reported by the wallbox via modbus (and so the value of the item).
I now tried to set the Write Transform of that item as follows:
JS:(|input * 10)
but this doesn’t seem to work. The value sent to the wallbox is still “32” and not “320”. I’ve thought the connected slider would send a value of 32, the Write Transform Rule would multiply it by 10 and send this tot the modbus?
Is there something wrong with the Write Transform Rule? If i slide to “18”, the wallbox seems to recieve “20” and sets the current for the outlet to 2 Ampere.