Hello. I am new to openhab/openhab2. I have a plc that controls the heating, ventilation, vertical awnings and some lights. When I tried to set up the binding there are some problems. I have tried some different settings and it seems like openhab gets a connection with the plc but the communication fails due to responses that dont match the request.
See log from openhab:
2018-01-27 17:44:56.920 [INFO ] [panel.internal.HABPanelDashboardTile] - Started HABPanel at /habpanel
2018-01-27 17:44:58.002 [INFO ] [b.core.service.AbstractActiveService] - Modbus Polling Service has been started
2018-01-27 17:44:59.035 [WARN ] [.binding.modbus.internal.ModbusSlave] - ModbusSlave (slave1): Transaction id of the response (4) does not match request net.wimpi.modbus.msg.ReadInputRegistersRequest@475464 id 1. Endpoint ModbusTCPSlaveEndpoint@13dd374[address=192.168.1.178,port=5000]. Connection: TCPMasterConnection@134fd53[socket=Socket[addr=/192.168.1.178,port=5000,localport=52026]]. Ignoring response.
2018-01-27 17:45:12.050 [ERROR] [wimpi.modbus.io.ModbusTCPTransaction] - execute try 1/3 error: I/O exception - failed to read… Request: net.wimpi.modbus.msg.ReadInputRegistersRequest@ace9c8 (unit id 1 & transaction 2). Address: /192.168.1.178:5000
2018-01-27 17:45:13.695 [INFO ] [basic.internal.servlet.WebAppServlet] - Stopped Basic UI
2018-01-27 17:45:20.059 [ERROR] [wimpi.modbus.io.ModbusTCPTransaction] - execute try 2/3 error: I/O exception - failed to read… Request: net.wimpi.modbus.msg.ReadInputRegistersRequest@ace9c8 (unit id 1 & transaction 3). Address: /192.168.1.178:5000
2018-01-27 17:45:24.529 [INFO ] [arthome.ui.paper.internal.PaperUIApp] - Stopped Paper UI
2018-01-27 17:45:24.547 [INFO ] [panel.internal.HABPanelDashboardTile] - Stopped HABPanel
2018-01-27 17:45:24.558 [INFO ] [er.internal.HomeBuilderDashboardTile] - Stopped Home Builder
The modbus.cfg looks like this:
poll=1000
tcp.slave1.connection=192.168.1.178:5000:100:35:35:3:200
tcp.slave1.type=holding
tcp.slave1.id=1
tcp.slave1.start=3075
tcp.slave1.length=1
And when i tried to connect and read the same adress and register with QModMaster it works perfectly. I have also logged the traffic with wireshark in both cases mensioned above and also when the plc software communicates with the plc but I dont really know if it is possible to find some clues in those logs.
I am running openhab2 and the modbus is the latest available in “Bindings”.
Best regards/Patrik