I’m new to openHAB2 but the fantastic community and all the tutorials helped me to set up a working system with FM20, Homematic and Modbus.
On the MODBS side I’m working with BARIX devices (R6 and X8). The X8 ist an I/O Modbus converter. I’m only using the 8 inputs of the module. The state of the inputs is stored in the read only register 1 (input state bit 0…7).
The modbus binding tutorial does not say anything about reading single bits. My X8 devices in the modbus.cfg are defined as valuetype=int8. Further down in the tutorial i found the following sentence: “valuetypes smaller than one register (less than 16 bits) actually read the whole register, and finally extract single bit from the result.”
This seems logical to me but I have no clue how to extract the single bits from my register. Or sould I set the valuetype to ‘bit’ and define a new item for every input my my X8 module and set the start parameter accordingly?
I hope someone understands, what I’m trying to write
modbus:tcp.X8.type=input // probably - as you mentioned read-only
modbus.tcp.X8.start=1 // or whatever
modbus.tcp.X8.length=1 // means read one 16-bit register
modbus.tcp.X8.valuetype=bit // treat register as bits
The RS-485 receive and transmit LEDs of the X8 I/O converter do not show ANY activity (I’m using a busware RUX device)
Do you have any idea, why the polling service (of a fresh out of the box openHAB2 installation) does not work?
My other MODBUS devices (coils) who don’t need polling are working fine and I see BUS activity everytime I switch a coil. So the cabling seems to be right.
the loggers do not show any errors even in DEBUG level - actually the stay empty!
I just tried the Radzio! Modbus Master Simulator and everything works perfect! The BUS activity LEDs are blinking, the BUS is polled and everything works without any problems.
Some logic error in your configuration perhaps. Is there a ‘polling service started’ log at boot time? There should be.
Bear in mind an out of the box OH2 install will have an elderly Modbus binding, that won’t support several odd things. I’m not sure about that :150 parameter for example, or bit datatype. Consider an update to 1.10
I have the same issue with latest modbus bindings (2.4)
My device has 12 DO that all DOs are controlling in one holding register, each bit is dedicated for one of DOs.
Based on the documentations, some codes like this can read individual bit from register:
Thing data input1502bit0 [ readStart="1502.0", readValueType="bit" ]
But how to write?
Any helps is appreciated.