Here is the script
Code:
require('luamodbus')
mb = luamodbus.tcp()
mb:open('192.168.0.100', 502)
mb:connect()
mb:setslave(1)
res, err = mb:writemultipleregisters(1003, 4)
log(res,err)
mb:close()
Here is the profile
Code:
{
"manufacturer": "Nilan",
"description": "Nilan CTS602",
"mapping": [
{ "name": "Speed setting", "bus_datatype": "uint16", "type": "register", "address": 1003, "writable": 1, "write_multiple": 1}
]
}
The script can write and change the speed value
The profile can then read that the script has changed the value, verified by looking at the ventilation display.
The profile can not be used to write, and if i change the object value, it just jumps back to what it was and nothing happens on the display.
So the script clearly writes and the profile clearly reads.
I have to use multiple registers per the manual to get write permission.
What am i missing here?