(14.03.2023, 06:18)admin Wrote: holdingregisters = registers, you need to use inputregisters instead.
mb.setfloat16precision(2) sets how float16 is converted to integer. By default it's 2 decimals (0.01 precision). Change 2 to 0 to convert to integer without any decimals.
I tried to change "registers" to "inputegisters", but it still doesn't work. I disabled and then re-enabled the resident script, but the address mapped by "inputegister" still doesn't work.
This is the changed code:
Code:
mb.setmapping({
[7] = {
coils = {
[1] = '0/0/1',
[2] = '0/0/2',
[3] = '0/0/3',
},
registers = {
[1] = '0/1/1',
[2] = '0/1/2',
[3] = '0/1/3',
} ,
inputregisters = {
[1] = '0/1/4',
[2] = '0/1/5',
}
}
})
In addition, I want to implement the knx address' 1/1/1 'to' 1/1/100 'to map the continuous list of registered addresses [0] to [100]. Now I need to write 100 mapping statements to implement it. Is there a fast implementation method?