I’m using OpenHab 2.0 and i have a thermostat which is communicating over Modbus TCP/IP protocol.
For modbus temperature like 20 degrees celsius is written like 200 and we need to multiply or divide temperature by 10.
In documentation i saw that openhab supports modbus transformation so i did one using JavaScript but it’s not working.
Item
Number zelena_temperatura_modbus "Number [%.1f]" <temperature> {modbus=">[slave1:0:transformation=JS(multiply10.js)],<[slave1:0:transformation=JS(divide10.js)]"}
When i run log:tail command i can see this error.
Binding configuration of type 'modbus' of item 'zelena_temperatura_modbus' could not be parsed correctly.
org.eclipse.smarthome.model.item.BindingConfigParseException: Invalid number of registers in item configuration
Does it ‘work’ without the transformations? What does modbus.cfg look like for slave1? Are you using modbus binding version 1.10 (not standard in OH2.0)?