Hi,
i have a rule for my wallbox that sets the maximum current the car can charge with. The Modbus thing of that looks like this:
Bridge modbus:tcp:ebox [ host="192.168.0.99", port=502 ] {
Bridge poller holdingRegisters [ start=1012, length=17, refresh=5000, type="holding" ] {
Thing data maxCurrentP1 [ readStart="1012", readValueType="float32", writeStart="1012", writeValueType="float32", writeType="holding" ]
Thing data maxCurrentP2 [ readStart="1014", readValueType="float32", writeStart="1014", writeValueType="float32", writeType="holding" ]
Thing data maxCurrentP3 [ readStart="1016", readValueType="float32", writeStart="1016", writeValueType="float32", writeType="holding" ]
}
Bridge poller inputRegisters [ start=1006, length=6, type="input", refresh=5500] {
Thing data currentP1 [ readStart="1006", readValueType="float32" ]
Thing data currentP2 [ readStart="1008", readValueType="float32" ]
Thing data currentP3 [ readStart="1010", readValueType="float32" ]
}
}
I want to set maxCurrent for P1-P3 simultaniously. When i try to set them seperately strange things happen, guess due to parallell writing of values. So i want to set them all with one transaction.
I think i saw a property related to that: writeMultipleEvenWithSingleRegisterOrCoil
but iām not sure how to use it.
For example in my rule i want to call this:
maxCurrent.sendCommand(12); // set max current to 12A
If i call
maxCurrentP1.sendCommand(12)
maxCurrentP2.sendCommand(12)
maxCurrentP3.sendCommand(12)
the above mentioned strange things happen, so how can i do it, that i write those 3 registers in one go?
Thanks in advance!
Samuel