[SOLVED] Modbus connection error

Hi, I would use some help to get my Modbus connection running.

I use this no-name RS485 adapter in OH side:


and I’m trying to connect to MelcoBEMS Mini (A1M) (slave ID1) to access data in my Air-to-Water Mitsubishi Ecodan Heatpump.

OH has permission to use USB0 where my RS485 adapter is connected:

[10:08:12] openhabian@openHABianPi:/dev$ ls -la |grep USB
crw-rw----  1 root dialout 188,   0 Feb  4 09:56 ttyUSB0

but I get the following error:

2019-02-04 10:43:36.681 [ERROR] [et.wimpi.modbus.net.SerialConnection] - open port failed: gnu.io.PortInUseException: Modbus Serial Master

2019-02-04 10:43:36.686 [ERROR] [ing.ModbusSlaveConnectionFactoryImpl] - connect try 1/1 error: open port failed: Modbus Serial Master. Connection SerialConnection@1b5794f[portName=/dev/ttyUSB0,port=<null>]. Endpoint ModbusSerialSlaveEndpoint@11c75b4[portName=/dev/ttyUSB0]

2019-02-04 10:43:36.692 [ERROR] [ing.ModbusSlaveConnectionFactoryImpl] - re-connect reached max tries 1, throwing last error: open port failed: Modbus Serial Master. Connection SerialConnection@1b5794f[portName=/dev/ttyUSB0,port=<null>]. Endpoint ModbusSerialSlaveEndpoint@11c75b4[portName=/dev/ttyUSB0]

2019-02-04 10:43:36.697 [ERROR] [ing.ModbusSlaveConnectionFactoryImpl] - Error connecting connection SerialConnection@1b5794f[portName=/dev/ttyUSB0,port=<null>] for endpoint ModbusSerialSlaveEndpoint@11c75b4[portName=/dev/ttyUSB0]: open port failed: Modbus Serial Master

2019-02-04 10:43:36.704 [WARN ] [rt.modbus.internal.ModbusManagerImpl] - Could not connect to endpoint ModbusSerialSlaveEndpoint@11c75b4[portName=/dev/ttyUSB0] -- aborting request ModbusPollerThingHandlerImpl.ModbusPollerReadRequest@ea46e1[slaveId=1,functionCode=READ_MULTIPLE_REGISTERS,start=9,length=1,maxTries=3] [operation ID ecf07e1b-e94e-4312-b822-296a5fa67874]

==> /var/log/openhab2/events.log <==

2019-02-04 10:43:36.713 [hingStatusInfoChangedEvent] - 'modbus:poller:2690ca15' changed from ONLINE to OFFLINE (COMMUNICATION_ERROR): Error with read: org.openhab.io.transport.modbus.ModbusConnectionException: Error connecting to endpoint ModbusSerialSlaveEndpoint@11c75b4[portName=/dev/ttyUSB0]

This is how I have configured Things:


Is it a permissions problem or configuration error?

OK, I got some hex running. Now I need to figure out how to access individual data correctly.