Logback.xml ignored on modbus

Hi,

I try to get the modbus binding running with OH2b4. I use a Arduino Mini as slave with ID=1, Connection speed 9600. I did lot of hardware debuging and finally, the RS485 is stable, Arduino is sending back the information as requested on the 2 hardware lines. I got errors in openhab.log like:

2016-10-29 15:03:10.218 [ERROR] [t.wimpi.modbus.io.ModbusRTUTransport] - failed to read: Error reading response (EOF)
2016-10-29 15:03:10.221 [ERROR] [pi.modbus.io.ModbusSerialTransaction] - execute try 3/3 error: I/O exception - failed to read. Request: net.wimpi.modbus.msg.ReadMultipleRegistersRequest@163dbd (unit id 1 & transaction 619). Serial parameters: SerialParameters@1798e14[portName=/dev/ttyUSB0,baudRate=9600,flowControlIn=none,flowControlOut=none,databits=8,stopbits=1,parity=none,encoding=rtu,echo=false,receiveTimeoutMillis=50]
2016-10-29 15:03:10.223 [ERROR] [pi.modbus.io.ModbusSerialTransaction] - execute reached max tries 3, throwing last error: I/O exception - failed to read. Request: net.wimpi.modbus.msg.ReadMultipleRegistersRequest@163dbd. Serial parameters: SerialParameters@1798e14[portName=/dev/ttyUSB0,baudRate=9600,flowControlIn=none,flowControlOut=none,databits=8,stopbits=1,parity=none,encoding=rtu,echo=false,receiveTimeoutMillis=50]
2016-10-29 15:03:10.226 [ERROR] [.binding.modbus.internal.ModbusSlave] - ModbusSlave (slave1): Error getting modbus data for request net.wimpi.modbus.msg.ReadMultipleRegistersRequest@163dbd. Error: I/O exception - failed to read. Endpoint ModbusSerialSlaveEndpoint@141f51a[portName=/dev/ttyUSB0]. Connection: SerialConnection@1a312b7[portName=/dev/ttyUSB0,port=/dev/ttyUSB0]

Then, I tried to get DEBUG data from the modbus binding with using /opt/openhab/conf/logback.xml 0777 root:root. OH running as root (sorry!).

<logger name="org.openhab.binding.modbus" level="DEBUG" />
<logger name="net.wimpi.modbus" level="TRACE" />

I wrote same code to logback_debug.xml starting OH with start_debug.sh on the shell. Nothing changed in the log file. I could not see the insite DEBUG data of the modbus binding 1.9.0.

Here my modbus.cfg entries:


poll=6000
serial.slave1.connection=/dev/ttyUSB0:9600:8:none:1:rtu:35:50:none:none
serial.slave1.id=1
serial.slave1.start=0
serial.slave1.length=5
serial.slave1.type=holding
serial.slave1.valuetype=int16

Any help is welcome!

You should note that openHAB 2 is not using logback, so it is no wonder that logback config is not taken into account :slight_smile:
See here for more details.

Thanks Kai.

That was in the end easy:

http://docs.openhab.org/administration/logging.html