Hello,
i have a relay board that i comunicate via Modbus TCP protocol. All the tests from Modbus Poll works as expexted though in OH i am not able to send correct value for the particular register. For retrieving register value seems to be ok because i get 0 or 1 from the register but for sending i need to transform value to Hex. if i need to switch on I have to send 0x0100, to switch off 0x0200.
I tried writing my own transform script, but that does not seem to do the trick.
My configuration:
Thing data thermorelay1 [ readStart=“0”, readValueType=“int16”, writeStart=“0”, writeValueType=“uint16”, writeType=“holding”, writeTransform=“JS(hexvalue.js)”]
this is my item:
Number thermoRelay1 “Termo pavara (miegamasis)” (gHeating) { channel=“modbus:data:thermorelaymainbridge:localbridge:thermorelay1:number” }