for here:
modbus:tcp.slave1.connection=10.1.1.184
modbus:tcp.slave1.length=21
modbus:slave1.valuetype=bit
modbus:tcp.slave1.type=coil
convert to:
Bridge modbus:tcp:ADAM6050_01 [ host="10.1.1.184", port=502, id=1 ]
{
// These correspond to input register numbers 00001 - 00012
// documentation not clear for me, if I use discrete if always start by 0
// and discrete means read only
Bridge poller coilsClears [ start=0, length=21, refresh=500, type="coil" ]
{
Thing data cl00 [ readStart="0", readValueType="bit", writeStart="0", writeValueType="bit", writeType="coil" ]
Thing data cl01 [ readStart="1", readValueType="bit" , writeStart="1", writeValueType="bit", writeType="coil" ]
}
}
Switch ADAM6050_01_CL00 "light-1 [%s]" { channel="modbus:data:ADAM6050_01:coilsClears:cl00:switch" }
Switch ADAM6050_01_CL01 "light-2 [%s]" { channel="modbus:data:ADAM6050_01:coilsClears:cl01:switch" }