Modbus binding unstable

Hello !
I’m testing my tcp modbus binding woth Openhab 1.7.1 running on a windows machine connected via TCP to a PLC Wago 750-842.

Reading digital inputs works fine. When writing digital outputs after some time the PLC got disconnected and can’t reconnect.

This is the openhab.cfg:

modbus:tcp.slave1.poll=5200
modbus:tcp.slave1.connection=192.168.0.10:502
modbus:tcp.slave1.id=1
modbus:tcp.slave1.type=coil
modbus:tcp.slave1.start=512
modbus:tcp.slave1.length=52
modbus:slave1.valuetype=bit

modbus:tcp.slave2.poll=5200
modbus:tcp.slave2.connection=192.168.0.10:502
modbus:tcp.slave2.id=1
modbus:tcp.slave2.type=discrete
modbus:tcp.slave2.start=0
modbus:tcp.slave2.length=36
modbus:slave2.valuetype=bit

Here the .items:

/* Lorenzo Wago Digital Outputs */

Switch MySwitch0 “My Modbus Switch0” (ALL) {modbus=“slave1:0”}
Switch MySwitch1 “My Modbus Switch1” (ALL) {modbus=“slave1:1”}
Switch MySwitch2 “My Modbus Switch2” (ALL) {modbus=“slave1:2”}
Switch MySwitch3 “My Modbus Switch3” (ALL) {modbus=“slave1:3”}

/* Lorenzo Wago Digital Inputs */

Contact Contact0 “Contact0” (All) {modbus=“slave2:0”}
Contact Contact1 “Contact1” (All) {modbus=“slave2:1”}
Contact Contact2 “Contact2” (All) {modbus=“slave2:2”}
Contact Contact3 “Contact3” (All) {modbus=“slave2:3”}

/* Lorenzo Network Health */

Switch MyPLC “MYPLC” (Status, Network) { nh=“192.168.0.10:80” }
Switch MyPLC502 “MYPLC” (Status, Network) { nh=“192.168.0.10:502” }
Switch GOOGLE “MYPLC” (Status, Network) { nh=“www.google.com:80” }

The addon in use is the original “org.openhab.binding.modbus-1.7.1”.

And here the verbose log:

22:20:00.594 [INFO ] [penhab.io.rest.RESTApplication:144 ] - Started REST API at /rest
22:20:00.596 [DEBUG] [o.o.i.s.i.DiscoveryServiceImpl:66 ] - Registering new service _openhab-server._tcp.local. at port 8080
22:20:00.879 [INFO ] [sphere.cpr.AtmosphereFramework:1053 ] - Latest version of Atmosphere’s JavaScript Client 2.2.12
22:20:00.880 [INFO ] [sphere.cpr.AtmosphereFramework:1060 ] -

Atmosphere Framework Updates:
Minor Update available (bugs fixes): 2.2.8

22:20:05.238 [DEBUG] [o.o.i.s.i.DiscoveryServiceImpl:66 ] - Registering new service _openhab-server-ssl._tcp.local. at port 8443
22:20:06.909 [INFO ] [c.internal.ModelRepositoryImpl:80 ] - Loading model ‘demo.sitemap’
22:20:07.268 [INFO ] [c.internal.ModelRepositoryImpl:80 ] - Loading model ‘db4o.persist’
22:20:07.296 [INFO ] [c.internal.ModelRepositoryImpl:80 ] - Loading model ‘exec.persist’
22:20:07.304 [INFO ] [c.internal.ModelRepositoryImpl:80 ] - Loading model ‘logging.persist’
22:20:07.315 [INFO ] [c.internal.ModelRepositoryImpl:80 ] - Loading model ‘rrd4j.persist’
22:20:07.375 [INFO ] [c.internal.ModelRepositoryImpl:80 ] - Loading model ‘demo.script’
22:20:07.490 [INFO ] [c.internal.ModelRepositoryImpl:80 ] - Loading model ‘demo.items’
22:20:07.514 [DEBUG] [i.internal.GenericItemProvider:154 ] - Processing binding configs for items from model ‘demo.items’
22:20:07.517 [DEBUG] [i.internal.GenericItemProvider:133 ] - Read items from model ‘demo.items’
22:20:07.991 [INFO ] [.o.u.w.i.servlet.WebAppServlet:79 ] - Started Classic UI at /openhab.app
22:20:08.265 [DEBUG] [.r.internal.RuleModelActivator:42 ] - Registered ‘rules’ configuration parser
22:20:08.279 [DEBUG] [m.r.internal.engine.RuleEngine:77 ] - Started rule engine
22:20:12.182 [DEBUG] [o.b.m.internal.ModbusActivator:30 ] - Modbus binding has been started.
22:20:12.185 [DEBUG] [i.internal.GenericItemProvider:341 ] - Start processing binding configuration of Item ‘MySwitch0 (Type=SwitchItem, State=Uninitialized)’ with ‘ModbusGenericBindingProvider’ reader.
22:20:12.186 [DEBUG] [i.internal.GenericItemProvider:341 ] - Start processing binding configuration of Item ‘MySwitch1 (Type=SwitchItem, State=Uninitialized)’ with ‘ModbusGenericBindingProvider’ reader.
22:20:12.187 [DEBUG] [i.internal.GenericItemProvider:341 ] - Start processing binding configuration of Item ‘MySwitch2 (Type=SwitchItem, State=Uninitialized)’ with ‘ModbusGenericBindingProvider’ reader.
22:20:12.188 [DEBUG] [i.internal.GenericItemProvider:341 ] - Start processing binding configuration of Item ‘MySwitch3 (Type=SwitchItem, State=Uninitialized)’ with ‘ModbusGenericBindingProvider’ reader.
22:20:12.188 [DEBUG] [i.internal.GenericItemProvider:341 ] - Start processing binding configuration of Item ‘Contact0 (Type=ContactItem, State=Uninitialized)’ with ‘ModbusGenericBindingProvider’ reader.
22:20:12.189 [DEBUG] [i.internal.GenericItemProvider:341 ] - Start processing binding configuration of Item ‘Contact1 (Type=ContactItem, State=Uninitialized)’ with ‘ModbusGenericBindingProvider’ reader.
22:20:12.190 [DEBUG] [i.internal.GenericItemProvider:341 ] - Start processing binding configuration of Item ‘Contact2 (Type=ContactItem, State=Uninitialized)’ with ‘ModbusGenericBindingProvider’ reader.
22:20:12.190 [DEBUG] [i.internal.GenericItemProvider:341 ] - Start processing binding configuration of Item ‘Contact3 (Type=ContactItem, State=Uninitialized)’ with ‘ModbusGenericBindingProvider’ reader.
22:20:12.201 [DEBUG] [.modbus.internal.ModbusBinding:260 ] - given modbus-slave-config-key ‘slave1.valuetype’ does not follow the expected pattern or ‘serial..<connection|id|start|length|type|valuetype|rawdatamultiplier|writemultipleregisters>’
22:20:12.203 [DEBUG] [.modbus.internal.ModbusBinding:260 ] - given modbus-slave-config-key ‘slave2.valuetype’ does not follow the expected pattern or ‘serial..<connection|id|start|length|type|valuetype|rawdatamultiplier|writemultipleregisters>’
22:20:12.208 [DEBUG] [xecPersistenceServiceActivator:33 ] - Exec persistence bundle has been started.
22:20:12.213 [DEBUG] [.modbus.internal.ModbusBinding:282 ] - modbusSlave ‘slave1’ instanciated
22:20:12.214 [DEBUG] [.modbus.internal.ModbusBinding:260 ] - given modbus-slave-config-key ‘tcp.slave1.poll’ does not follow the expected pattern or ‘serial..<connection|id|start|length|type|valuetype|rawdatamultiplier|writemultipleregisters>’
22:20:12.217 [DEBUG] [.modbus.internal.ModbusBinding:282 ] - modbusSlave ‘slave2’ instanciated
22:20:12.218 [DEBUG] [.modbus.internal.ModbusBinding:260 ] - given modbus-slave-config-key ‘tcp.slave2.poll’ does not follow the expected pattern or ‘serial..<connection|id|start|length|type|valuetype|rawdatamultiplier|writemultipleregisters>’
22:20:12.221 [DEBUG] [.p.internal.PersistenceManager:147 ] - Initializing exec persistence service.
22:20:12.222 [DEBUG] [.modbus.internal.ModbusBinding:344 ] - config looked good, proceeding with slave-connections
22:20:12.242 [INFO ] [.service.AbstractActiveService:169 ] - Modbus Polling Service has been started
22:20:12.258 [DEBUG] [.p.internal.PersistenceManager:441 ] - Scheduled strategy exec.everyMinute with cron expression 0 * * * * ?
22:20:12.272 [DEBUG] [.i.LoggingPersistenceActivator:31 ] - Logging persistence bundle has been started.
22:20:12.287 [DEBUG] [.p.internal.PersistenceManager:147 ] - Initializing logging persistence service.
22:20:12.316 [DEBUG] [.b.http.internal.HttpActivator:34 ] - HTTP binding has been started.
22:20:12.338 [INFO ] [.service.AbstractActiveService:169 ] - HTTP Refresh Service has been started
22:20:12.363 [DEBUG] [.rrd4j.internal.RRD4jActivator:31 ] - RRD4j persistence bundle has been started.
22:20:12.381 [DEBUG] [.p.internal.PersistenceManager:147 ] - Initializing rrd4j persistence service.
22:20:12.388 [DEBUG] [.p.rrd4j.internal.RRD4jService:345 ] - using default configuration only
22:20:12.396 [DEBUG] [.p.internal.PersistenceManager:328 ] - Item ‘DemoSwitch’ does not exist.
22:20:12.397 [DEBUG] [.p.internal.PersistenceManager:328 ] - Item ‘NoOfLights’ does not exist.
22:20:12.397 [DEBUG] [.p.internal.PersistenceManager:328 ] - Item ‘Window_GF_Toilet’ does not exist.
22:20:12.398 [DEBUG] [.p.internal.PersistenceManager:341 ] - Item group ‘Heating’ does not exist.
22:20:12.399 [DEBUG] [.p.internal.PersistenceManager:341 ] - Item group ‘Temperature’ does not exist.
22:20:12.400 [DEBUG] [.p.internal.PersistenceManager:341 ] - Item group ‘Weather_Chart’ does not exist.
22:20:12.402 [DEBUG] [.p.internal.PersistenceManager:441 ] - Scheduled strategy rrd4j.everyMinute with cron expression 0 * * * * ?
22:20:12.409 [DEBUG] [p.r.i.charts.RRD4jChartServlet:118 ] - Starting up rrd chart servlet at /rrdchart.png
22:20:12.413 [DEBUG] [.o.b.ntp.internal.NtpActivator:31 ] - NTP binding has been started.
22:20:12.430 [DEBUG] [o.b.n.i.NetworkHealthActivator:31 ] - NetworkHealth binding has been started.
22:20:12.441 [DEBUG] [i.internal.GenericItemProvider:341 ] - Start processing binding configuration of Item ‘MyPLC (Type=SwitchItem, State=Uninitialized)’ with ‘NetworkHealthGenericBindingProvider’ reader.
22:20:12.443 [DEBUG] [i.internal.GenericItemProvider:341 ] - Start processing binding configuration of Item ‘MyPLC502 (Type=SwitchItem, State=Uninitialized)’ with ‘NetworkHealthGenericBindingProvider’ reader.
22:20:12.444 [DEBUG] [i.internal.GenericItemProvider:341 ] - Start processing binding configuration of Item ‘GOOGLE (Type=SwitchItem, State=Uninitialized)’ with ‘NetworkHealthGenericBindingProvider’ reader.
22:20:12.450 [INFO ] [.service.AbstractActiveService:169 ] - NetworkHealth Refresh Service has been started
22:20:12.458 [DEBUG] [o.o.b.n.i.NetworkHealthBinding:85 ] - established connection [host ‘192.168.0.10’ port ‘502’ timeout ‘5000’]
22:20:12.463 [DEBUG] [o.o.b.n.i.NetworkHealthBinding:85 ] - established connection [host ‘192.168.0.10’ port ‘80’ timeout ‘5000’]
22:20:12.499 [DEBUG] [o.o.b.n.i.NetworkHealthBinding:85 ] - established connection [host ‘www.google.com’ port ‘80’ timeout ‘5000’]
22:20:17.577 [INFO ] [c.internal.ModelRepositoryImpl:80 ] - Loading model ‘demo.rules’
22:20:17.919 [DEBUG] [m.r.internal.engine.RuleEngine:305 ] - Executing rule ‘Lorenzo - test contact’
22:20:18.106 [DEBUG] [riptExtensionClassNameProvider:63 ] - Script actions have changed: HTTPActionService, ExecActionService, TransformationActionService, AudioActionService, PingActionService,
22:20:18.311 [INFO ] [g.openhab.model.script.LORENZO:53 ] - LORENZO Contact0 Cambia Stato
22:20:18.951 [DEBUG] [m.r.internal.engine.RuleEngine:305 ] - Executing rule ‘Lorenzo - test contact’
22:20:18.954 [INFO ] [g.openhab.model.script.LORENZO:53 ] - LORENZO Contact0 Cambia Stato
22:20:19.790 [DEBUG] [m.r.internal.engine.RuleEngine:305 ] - Executing rule ‘Lorenzo - test contact’
22:20:19.794 [INFO ] [g.openhab.model.script.LORENZO:53 ] - LORENZO Contact0 Cambia Stato
22:20:24.572 [DEBUG] [m.r.internal.engine.RuleEngine:305 ] - Executing rule ‘Lorenzo - test contact’
22:20:24.579 [INFO ] [g.openhab.model.script.LORENZO:53 ] - LORENZO Contact0 Cambia Stato
22:20:25.605 [DEBUG] [m.r.internal.engine.RuleEngine:305 ] - Executing rule ‘Lorenzo - test contact’
22:20:25.607 [INFO ] [g.openhab.model.script.LORENZO:53 ] - LORENZO Contact0 Cambia Stato
22:20:26.230 [DEBUG] [m.r.internal.engine.RuleEngine:305 ] - Executing rule ‘Lorenzo - test contact’
22:20:26.238 [INFO ] [g.openhab.model.script.LORENZO:53 ] - LORENZO Contact0 Cambia Stato
22:20:27.271 [DEBUG] [m.r.internal.engine.RuleEngine:305 ] - Executing rule ‘Lorenzo - test contact’
22:20:27.277 [INFO ] [g.openhab.model.script.LORENZO:53 ] - LORENZO Contact0 Cambia Stato
22:20:33.892 [DEBUG] [.b.modbus.internal.ModbusSlave:246 ] - ModbusSlave: FC05 ref=515 value=false
22:20:35.107 [DEBUG] [m.r.internal.engine.RuleEngine:305 ] - Executing rule ‘Lorenzo - test switch’
22:20:35.109 [DEBUG] [.b.modbus.internal.ModbusSlave:246 ] - ModbusSlave: FC05 ref=512 value=true
22:20:35.138 [INFO ] [g.openhab.model.script.LORENZO:53 ] - LORENZO: Cambio di Stato di Switch0
22:20:37.326 [DEBUG] [.b.modbus.internal.ModbusSlave:246 ] - ModbusSlave: FC05 ref=513 value=true
22:20:42.042 [DEBUG] [.b.modbus.internal.ModbusSlave:249 ] - ModbusSlave:Error Code = 0
22:20:42.043 [DEBUG] [.b.modbus.internal.ModbusSlave:246 ] - ModbusSlave: FC05 ref=515 value=true
22:20:42.068 [DEBUG] [.b.modbus.internal.ModbusSlave:337 ] - ModbusSlave:Executing transaction failed (tried 3 times)
22:20:42.069 [INFO ] [.b.modbus.internal.ModbusSlave:305 ] - ModbusSlave error getting responce from slave
22:20:42.123 [DEBUG] [.b.modbus.internal.ModbusSlave:249 ] - ModbusSlave:Executing transaction failed (tried 3 times)
22:20:42.130 [DEBUG] [.b.modbus.internal.ModbusSlave:246 ] - ModbusSlave: FC05 ref=514 value=true
22:20:42.797 [DEBUG] [.b.modbus.internal.ModbusSlave:246 ] - ModbusSlave: FC05 ref=514 value=false
22:20:44.249 [DEBUG] [.b.modbus.internal.ModbusSlave:246 ] - ModbusSlave: FC05 ref=515 value=false
22:20:47.785 [DEBUG] [.b.modbus.internal.ModbusSlave:246 ] - ModbusSlave: FC05 ref=513 value=false
22:20:50.427 [DEBUG] [m.r.internal.engine.RuleEngine:305 ] - Executing rule ‘Lorenzo - test switch’
22:20:50.433 [DEBUG] [.b.modbus.internal.ModbusSlave:246 ] - ModbusSlave: FC05 ref=512 value=false
22:20:50.451 [INFO ] [g.openhab.model.script.LORENZO:53 ] - LORENZO: Cambio di Stato di Switch0
22:20:53.980 [DEBUG] [m.r.internal.engine.RuleEngine:305 ] - Executing rule ‘Lorenzo - test switch’
22:20:53.989 [INFO ] [g.openhab.model.script.LORENZO:53 ] - LORENZO: Cambio di Stato di Switch0
22:20:53.989 [DEBUG] [.b.modbus.internal.ModbusSlave:246 ] - ModbusSlave: FC05 ref=512 value=true
22:20:56.532 [DEBUG] [.b.modbus.internal.ModbusSlave:246 ] - ModbusSlave: FC05 ref=513 value=true
22:20:59.059 [DEBUG] [.b.modbus.internal.ModbusSlave:337 ] - ModbusSlave:Error Code = 0
22:20:59.061 [INFO ] [.b.modbus.internal.ModbusSlave:305 ] - ModbusSlave error getting responce from slave
22:20:59.149 [DEBUG] [.b.modbus.internal.ModbusSlave:249 ] - ModbusSlave:Executing transaction failed (tried 3 times)
22:20:59.164 [DEBUG] [.b.modbus.internal.ModbusSlave:246 ] - ModbusSlave: FC05 ref=513 value=true
22:20:59.576 [DEBUG] [.b.modbus.internal.ModbusSlave:246 ] - ModbusSlave: FC05 ref=514 value=true
22:21:00.033 [DEBUG] [.p.internal.PersistenceManager:328 ] - Item ‘DemoSwitch’ does not exist.
22:21:00.035 [DEBUG] [.p.internal.PersistenceManager:328 ] - Item ‘NoOfLights’ does not exist.
22:21:00.036 [DEBUG] [.p.internal.PersistenceManager:328 ] - Item ‘Window_GF_Toilet’ does not exist.
22:21:00.037 [DEBUG] [.p.internal.PersistenceManager:341 ] - Item group ‘Heating’ does not exist.
22:21:00.037 [DEBUG] [.p.internal.PersistenceManager:341 ] - Item group ‘Temperature’ does not exist.
22:21:00.038 [DEBUG] [.p.internal.PersistenceManager:341 ] - Item group ‘Weather_Chart’ does not exist.
22:21:00.813 [DEBUG] [.b.modbus.internal.ModbusSlave:246 ] - ModbusSlave: FC05 ref=514 value=false
22:21:02.931 [DEBUG] [.b.modbus.internal.ModbusSlave:246 ] - ModbusSlave: FC05 ref=514 value=true
22:21:04.972 [DEBUG] [.b.modbus.internal.ModbusSlave:246 ] - ModbusSlave: FC05 ref=514 value=false
22:21:12.506 [DEBUG] [o.o.b.n.i.NetworkHealthBinding:85 ] - established connection [host ‘192.168.0.10’ port ‘502’ timeout ‘5000’]
22:21:12.514 [DEBUG] [o.o.b.n.i.NetworkHealthBinding:85 ] - established connection [host ‘192.168.0.10’ port ‘80’ timeout ‘5000’]
22:21:12.618 [DEBUG] [o.o.b.n.i.NetworkHealthBinding:85 ] - established connection [host ‘www.google.com’ port ‘80’ timeout ‘5000’]
22:21:24.755 [DEBUG] [.b.modbus.internal.ModbusSlave:246 ] - ModbusSlave: FC05 ref=513 value=false
22:21:25.897 [DEBUG] [.b.modbus.internal.ModbusSlave:246 ] - ModbusSlave: FC05 ref=515 value=true
22:21:31.575 [DEBUG] [.b.modbus.internal.ModbusSlave:337 ] - ModbusSlave:Error Code = 0
22:21:31.575 [INFO ] [.b.modbus.internal.ModbusSlave:305 ] - ModbusSlave error getting responce from slave
22:21:39.531 [DEBUG] [.b.modbus.internal.ModbusSlave:246 ] - ModbusSlave: FC05 ref=515 value=false
22:21:40.773 [DEBUG] [m.r.internal.engine.RuleEngine:305 ] - Executing rule ‘Lorenzo - test switch’
22:21:40.775 [DEBUG] [.b.modbus.internal.ModbusSlave:246 ] - ModbusSlave: FC05 ref=512 value=false
22:21:40.775 [INFO ] [g.openhab.model.script.LORENZO:53 ] - LORENZO: Cambio di Stato di Switch0
22:21:42.131 [DEBUG] [.b.modbus.internal.ModbusSlave:246 ] - ModbusSlave: FC05 ref=513 value=true
22:21:46.084 [DEBUG] [.b.modbus.internal.ModbusSlave:337 ] - ModbusSlave:Error Code = 0
22:21:46.085 [INFO ] [.b.modbus.internal.ModbusSlave:305 ] - ModbusSlave error getting responce from slave
22:21:46.154 [DEBUG] [.b.modbus.internal.ModbusSlave:249 ] - ModbusSlave:Executing transaction failed (tried 3 times)
22:21:46.160 [DEBUG] [.b.modbus.internal.ModbusSlave:246 ] - ModbusSlave: FC05 ref=515 value=true
22:21:46.166 [DEBUG] [.b.modbus.internal.ModbusSlave:246 ] - ModbusSlave: FC05 ref=514 value=true
22:21:48.564 [DEBUG] [.b.modbus.internal.ModbusSlave:246 ] - ModbusSlave: FC05 ref=513 value=false
22:21:49.483 [DEBUG] [.b.modbus.internal.ModbusSlave:246 ] - ModbusSlave: FC05 ref=514 value=false
22:21:50.171 [DEBUG] [.b.modbus.internal.ModbusSlave:246 ] - ModbusSlave: FC05 ref=515 value=false
22:21:52.862 [DEBUG] [.b.modbus.internal.ModbusSlave:246 ] - ModbusSlave: FC05 ref=515 value=true
22:21:54.260 [DEBUG] [.b.modbus.internal.ModbusSlave:246 ] - ModbusSlave: FC05 ref=514 value=true
22:21:55.731 [DEBUG] [.b.modbus.internal.ModbusSlave:246 ] - ModbusSlave: FC05 ref=513 value=true
22:21:56.395 [DEBUG] [m.r.internal.engine.RuleEngine:305 ] - Executing rule ‘Lorenzo - test switch’
22:21:56.399 [DEBUG] [.b.modbus.internal.ModbusSlave:246 ] - ModbusSlave: FC05 ref=512 value=true
22:21:56.400 [INFO ] [g.openhab.model.script.LORENZO:53 ] - LORENZO: Cambio di Stato di Switch0
22:22:00.003 [DEBUG] [.p.internal.PersistenceManager:328 ] - Item ‘DemoSwitch’ does not exist.
22:22:00.009 [DEBUG] [.p.internal.PersistenceManager:328 ] - Item ‘NoOfLights’ does not exist.
22:22:00.011 [DEBUG] [.p.internal.PersistenceManager:328 ] - Item ‘Window_GF_Toilet’ does not exist.
22:22:00.015 [DEBUG] [.p.internal.PersistenceManager:341 ] - Item group ‘Heating’ does not exist.
22:22:00.016 [DEBUG] [.p.internal.PersistenceManager:341 ] - Item group ‘Temperature’ does not exist.
22:22:00.018 [DEBUG] [.p.internal.PersistenceManager:341 ] - Item group ‘Weather_Chart’ does not exist.
22:22:00.906 [DEBUG] [m.r.internal.engine.RuleEngine:305 ] - Executing rule ‘Lorenzo - test switch’
22:22:00.910 [DEBUG] [.b.modbus.internal.ModbusSlave:246 ] - ModbusSlave: FC05 ref=512 value=false
22:22:00.912 [INFO ] [g.openhab.model.script.LORENZO:53 ] - LORENZO: Cambio di Stato di Switch0
22:22:03.100 [DEBUG] [.b.modbus.internal.ModbusSlave:246 ] - ModbusSlave: FC05 ref=513 value=false
22:22:05.606 [DEBUG] [.b.modbus.internal.ModbusSlave:337 ] - ModbusSlave:Error Code = 0
22:22:05.606 [INFO ] [.b.modbus.internal.ModbusSlave:305 ] - ModbusSlave error getting responce from slave
22:22:05.657 [DEBUG] [.b.modbus.internal.ModbusSlave:249 ] - ModbusSlave:Executing transaction failed (tried 3 times)
22:22:05.808 [DEBUG] [.b.modbus.internal.ModbusSlave:246 ] - ModbusSlave: FC05 ref=514 value=false
22:22:05.812 [INFO ] [.b.modbus.internal.ModbusSlave:305 ] - ModbusSlave error getting responce from slave
22:22:07.515 [DEBUG] [.b.modbus.internal.ModbusSlave:246 ] - ModbusSlave: FC05 ref=515 value=false
22:22:17.621 [DEBUG] [o.o.b.n.i.NetworkHealthBinding:88 ] - timed out while connecting to host ‘192.168.0.10’ port ‘502’ timeout ‘5000’
22:22:17.626 [DEBUG] [m.r.internal.engine.RuleEngine:305 ] - Executing rule ‘Lorenzo - test connection 502’
22:22:17.627 [DEBUG] [o.o.b.n.i.NetworkHealthBinding:85 ] - established connection [host ‘192.168.0.10’ port ‘80’ timeout ‘5000’]
22:22:17.646 [INFO ] [g.openhab.model.script.LORENZO:53 ] - LORENZO MYPLC502 Cambia Stato
22:22:17.674 [DEBUG] [o.o.b.n.i.NetworkHealthBinding:85 ] - established connection [host ‘www.google.com’ port ‘80’ timeout ‘5000’]
22:22:27.026 [DEBUG] [modbus.internal.ModbusTcpSlave:68 ] - ModbusSlave: Error connecting to master: Connection timed out: connect
22:22:27.027 [INFO ] [.b.modbus.internal.ModbusSlave:262 ] - ModbusSlave not connected
22:22:36.281 [DEBUG] [m.r.internal.engine.RuleEngine:305 ] - Executing rule ‘Lorenzo - test switch’
22:22:36.283 [DEBUG] [.b.modbus.internal.ModbusSlave:246 ] - ModbusSlave: FC05 ref=512 value=true
22:22:36.284 [INFO ] [g.openhab.model.script.LORENZO:53 ] - LORENZO: Cambio di Stato di Switch0
22:22:38.196 [DEBUG] [.b.modbus.internal.ModbusSlave:246 ] - ModbusSlave: FC05 ref=513 value=true
22:22:39.681 [DEBUG] [.b.modbus.internal.ModbusSlave:246 ] - ModbusSlave: FC05 ref=514 value=true
22:22:42.544 [DEBUG] [m.r.internal.engine.RuleEngine:305 ] - Executing rule ‘Lorenzo - test switch’
22:22:42.549 [INFO ] [g.openhab.model.script.LORENZO:53 ] - LORENZO: Cambio di Stato di Switch0
22:22:43.427 [DEBUG] [m.r.internal.engine.RuleEngine:305 ] - Executing rule ‘Lorenzo - test switch’
22:22:43.429 [DEBUG] [.b.modbus.internal.ModbusSlave:246 ] - ModbusSlave: FC05 ref=512 value=true
22:22:43.433 [INFO ] [g.openhab.model.script.LORENZO:53 ] - LORENZO: Cambio di Stato di Switch0
22:22:44.845 [DEBUG] [.b.modbus.internal.ModbusSlave:246 ] - ModbusSlave: FC05 ref=513 value=true
22:22:48.229 [DEBUG] [modbus.internal.ModbusTcpSlave:68 ] - ModbusSlave: Error connecting to master: Connection timed out: connect
22:22:48.230 [INFO ] [.b.modbus.internal.ModbusSlave:262 ] - ModbusSlave not connected
22:22:58.228 [DEBUG] [.b.modbus.internal.ModbusSlave:246 ] - ModbusSlave: FC05 ref=514 value=false
22:23:00.005 [DEBUG] [.p.internal.PersistenceManager:328 ] - Item ‘DemoSwitch’ does not exist.
22:23:00.009 [DEBUG] [.p.internal.PersistenceManager:328 ] - Item ‘NoOfLights’ does not exist.
22:23:00.011 [DEBUG] [.p.internal.PersistenceManager:328 ] - Item ‘Window_GF_Toilet’ does not exist.
22:23:00.012 [DEBUG] [.p.internal.PersistenceManager:341 ] - Item group ‘Heating’ does not exist.
22:23:00.013 [DEBUG] [.p.internal.PersistenceManager:341 ] - Item group ‘Temperature’ does not exist.
22:23:00.014 [DEBUG] [.p.internal.PersistenceManager:341 ] - Item group ‘Weather_Chart’ does not exist.
22:23:22.677 [DEBUG] [o.o.b.n.i.NetworkHealthBinding:88 ] - timed out while connecting to host ‘192.168.0.10’ port ‘502’ timeout ‘5000’
22:23:22.683 [DEBUG] [o.o.b.n.i.NetworkHealthBinding:85 ] - established connection [host ‘192.168.0.10’ port ‘80’ timeout ‘5000’]
22:23:22.730 [DEBUG] [o.o.b.n.i.NetworkHealthBinding:85 ] - established connection [host ‘www.google.com’ port ‘80’ timeout ‘5000’]
22:23:26.303 [DEBUG] [.b.modbus.internal.ModbusSlave:246 ] - ModbusSlave: FC05 ref=513 value=false
22:23:29.426 [DEBUG] [m.r.internal.engine.RuleEngine:305 ] - Executing rule ‘Lorenzo - test switch’
22:23:29.429 [DEBUG] [.b.modbus.internal.ModbusSlave:246 ] - ModbusSlave: FC05 ref=512 value=false
22:23:29.448 [INFO ] [g.openhab.model.script.LORENZO:53 ] - LORENZO: Cambio di Stato di Switch0
22:23:35.668 [DEBUG] [.b.modbus.internal.ModbusSlave:337 ] - ModbusSlave:Error Code = 0
22:23:35.669 [INFO ] [.b.modbus.internal.ModbusSlave:305 ] - ModbusSlave error getting responce from slave
22:23:35.842 [DEBUG] [m.r.internal.engine.RuleEngine:305 ] - Executing rule ‘Lorenzo - test switch’
22:23:35.850 [INFO ] [g.openhab.model.script.LORENZO:53 ] - LORENZO: Cambio di Stato di Switch0
22:23:56.843 [DEBUG] [modbus.internal.ModbusTcpSlave:68 ] - ModbusSlave: Error connecting to master: Connection timed out: connect
22:23:56.846 [INFO ] [.b.modbus.internal.ModbusSlave:239 ] - ModbusSlave not connected
22:23:56.858 [DEBUG] [m.r.internal.engine.RuleEngine:305 ] - Executing rule ‘Lorenzo - test switch’
22:23:56.862 [INFO ] [g.openhab.model.script.LORENZO:53 ] - LORENZO: Cambio di Stato di Switch0
22:24:00.002 [DEBUG] [.p.internal.PersistenceManager:328 ] - Item ‘DemoSwitch’ does not exist.
22:24:00.003 [DEBUG] [.p.internal.PersistenceManager:328 ] - Item ‘NoOfLights’ does not exist.
22:24:00.004 [DEBUG] [.p.internal.PersistenceManager:328 ] - Item ‘Window_GF_Toilet’ does not exist.
22:24:00.004 [DEBUG] [.p.internal.PersistenceManager:341 ] - Item group ‘Heating’ does not exist.
22:24:00.005 [DEBUG] [.p.internal.PersistenceManager:341 ] - Item group ‘Temperature’ does not exist.
22:24:00.005 [DEBUG] [.p.internal.PersistenceManager:341 ] - Item group ‘Weather_Chart’ does not exist.
22:24:17.838 [DEBUG] [modbus.internal.ModbusTcpSlave:68 ] - ModbusSlave: Error connecting to master: Connection timed out: connect
22:24:17.839 [INFO ] [.b.modbus.internal.ModbusSlave:262 ] - ModbusSlave not connected
22:24:27.731 [DEBUG] [o.o.b.n.i.NetworkHealthBinding:88 ] - timed out while connecting to host ‘192.168.0.10’ port ‘502’ timeout ‘5000’
22:24:27.737 [DEBUG] [o.o.b.n.i.NetworkHealthBinding:85 ] - established connection [host ‘192.168.0.10’ port ‘80’ timeout ‘5000’]
22:24:27.784 [DEBUG] [o.o.b.n.i.NetworkHealthBinding:85 ] - established connection [host ‘www.google.com’ port ‘80’ timeout ‘5000’]
22:24:38.840 [DEBUG] [modbus.internal.ModbusTcpSlave:68 ] - ModbusSlave: Error connecting to master: Connection timed out: connect
22:24:38.841 [INFO ] [.b.modbus.internal.ModbusSlave:239 ] - ModbusSlave not connected
22:24:39.046 [DEBUG] [modbus.internal.ModbusTcpSlave:68 ] - ModbusSlave: Error connecting to master: Connection timed out: connect
22:24:39.046 [INFO ] [.b.modbus.internal.ModbusSlave:262 ] - ModbusSlave not connected
22:24:41.059 [DEBUG] [m.r.internal.engine.RuleEngine:305 ] - Executing rule ‘Lorenzo - test switch’
22:24:41.068 [INFO ] [g.openhab.model.script.LORENZO:53 ] - LORENZO: Cambio di Stato di Switch0
22:25:00.001 [DEBUG] [.p.internal.PersistenceManager:328 ] - Item ‘DemoSwitch’ does not exist.
22:25:00.003 [DEBUG] [.p.internal.PersistenceManager:328 ] - Item ‘NoOfLights’ does not exist.
22:25:00.004 [DEBUG] [.p.internal.PersistenceManager:328 ] - Item ‘Window_GF_Toilet’ does not exist.
22:25:00.005 [DEBUG] [.p.internal.PersistenceManager:341 ] - Item group ‘Heating’ does not exist.
22:25:00.006 [DEBUG] [.p.internal.PersistenceManager:341 ] - Item group ‘Temperature’ does not exist.
22:25:00.006 [DEBUG] [.p.internal.PersistenceManager:341 ] - Item group ‘Weather_Chart’ does not exist.
22:25:00.251 [DEBUG] [modbus.internal.ModbusTcpSlave:68 ] - ModbusSlave: Error connecting to master: Connection timed out: connect
22:25:00.252 [INFO ] [.b.modbus.internal.ModbusSlave:262 ] - ModbusSlave not connected
22:25:21.252 [DEBUG] [modbus.internal.ModbusTcpSlave:68 ] - ModbusSlave: Error connecting to master: Connection timed out: connect
22:25:21.254 [INFO ] [.b.modbus.internal.ModbusSlave:239 ] - ModbusSlave not connected
22:25:21.464 [DEBUG] [modbus.internal.ModbusTcpSlave:68 ] - ModbusSlave: Error connecting to master: Connection timed out: connect
22:25:21.465 [INFO ] [.b.modbus.internal.ModbusSlave:262 ] - ModbusSlave not connected
22:25:21.783 [DEBUG] [m.r.internal.engine.RuleEngine:305 ] - Executing rule ‘Lorenzo - test switch’
22:25:21.790 [INFO ] [g.openhab.model.script.LORENZO:53 ] - LORENZO: Cambio di Stato di Switch0
22:25:32.787 [DEBUG] [o.o.b.n.i.NetworkHealthBinding:88 ] - timed out while connecting to host ‘192.168.0.10’ port ‘502’ timeout ‘5000’
22:25:34.830 [INFO ] [penhab.io.rest.RESTApplication:160 ] - Stopped REST API
22:25:34.832 [DEBUG] [o.o.i.s.i.DiscoveryServiceImpl:80 ] - Unregistering service _openhab-server._tcp.local. at port 8080
22:25:36.841 [DEBUG] [o.o.i.s.i.DiscoveryServiceImpl:80 ] - Unregistering service _openhab-server-ssl._tcp.local. at port 8443
22:25:37.791 [DEBUG] [o.o.b.n.i.NetworkHealthBinding:88 ] - timed out while connecting to host ‘192.168.0.10’ port ‘80’ timeout ‘5000’
22:25:37.797 [DEBUG] [m.r.internal.engine.RuleEngine:305 ] - Executing rule ‘Lorenzo - test connection 80’
22:25:37.830 [INFO ] [g.openhab.model.script.LORENZO:53 ] - LORENZO MYPLC port 80 Cambia Stato
22:25:37.834 [DEBUG] [o.o.b.n.i.NetworkHealthBinding:85 ] - established connection [host ‘www.google.com’ port ‘80’ timeout ‘5000’]
22:25:38.857 [INFO ] [.o.u.w.i.servlet.WebAppServlet:90 ] - Stopped Classic UI
22:25:42.457 [DEBUG] [modbus.internal.ModbusTcpSlave:68 ] - ModbusSlave: Error connecting to master: Connection timed out: connect
22:25:42.458 [INFO ] [.b.modbus.internal.ModbusSlave:239 ] - ModbusSlave not connected
22:25:42.670 [DEBUG] [modbus.internal.ModbusTcpSlave:68 ] - ModbusSlave: Error connecting to master: Connection timed out: connect
22:25:42.671 [INFO ] [.b.modbus.internal.ModbusSlave:262 ] - ModbusSlave not connected
22:26:00.001 [DEBUG] [.p.internal.PersistenceManager:328 ] - Item ‘DemoSwitch’ does not exist.
22:26:00.006 [DEBUG] [.p.internal.PersistenceManager:328 ] - Item ‘NoOfLights’ does not exist.
22:26:00.007 [DEBUG] [.p.internal.PersistenceManager:328 ] - Item ‘Window_GF_Toilet’ does not exist.
22:26:00.008 [DEBUG] [.p.internal.PersistenceManager:341 ] - Item group ‘Heating’ does not exist.
22:26:00.009 [DEBUG] [.p.internal.PersistenceManager:341 ] - Item group ‘Temperature’ does not exist.
22:26:00.010 [DEBUG] [.p.internal.PersistenceManager:341 ] - Item group ‘Weather_Chart’ does not exist.
22:26:03.672 [DEBUG] [modbus.internal.ModbusTcpSlave:68 ] - ModbusSlave: Error connecting to master: Connection timed out: connect
22:26:03.673 [INFO ] [.b.modbus.internal.ModbusSlave:239 ] - ModbusSlave not connected
22:26:03.895 [DEBUG] [modbus.internal.ModbusTcpSlave:68 ] - ModbusSlave: Error connecting to master: Connection timed out: connect
22:26:03.896 [INFO ] [.b.modbus.internal.ModbusSlave:262 ] - ModbusSlave not connected
22:26:24.904 [DEBUG] [modbus.internal.ModbusTcpSlave:68 ] - ModbusSlave: Error connecting to master: Connection timed out: connect
22:26:24.906 [INFO ] [.b.modbus.internal.ModbusSlave:239 ] - ModbusSlave not connected
22:26:25.107 [DEBUG] [modbus.internal.ModbusTcpSlave:68 ] - ModbusSlave: Error connecting to master: Connection timed out: connect
22:26:25.108 [INFO ] [.b.modbus.internal.ModbusSlave:262 ] - ModbusSlave not connected
22:26:42.836 [DEBUG] [o.o.b.n.i.NetworkHealthBinding:88 ] - timed out while connecting to host ‘192.168.0.10’ port ‘502’ timeout ‘5000’
22:26:42.842 [DEBUG] [o.o.b.n.i.NetworkHealthBinding:85 ] - established connection [host ‘192.168.0.10’ port ‘80’ timeout ‘5000’]
22:26:42.847 [DEBUG] [m.r.internal.engine.RuleEngine:305 ] - Executing rule ‘Lorenzo - test connection 80’
22:26:42.850 [INFO ] [g.openhab.model.script.LORENZO:53 ] - LORENZO MYPLC port 80 Cambia Stato
22:26:42.929 [DEBUG] [o.o.b.n.i.NetworkHealthBinding:85 ] - established connection [host ‘www.google.com’ port ‘80’ timeout ‘5000’]
22:26:46.115 [DEBUG] [modbus.internal.ModbusTcpSlave:68 ] - ModbusSlave: Error connecting to master: Connection timed out: connect
22:26:46.117 [INFO ] [.b.modbus.internal.ModbusSlave:239 ] - ModbusSlave not connected

Using the “Network Health” Binding I’ve noticed that after some tries of writing on digital outputs the connection on the port 502 of the PLC get lost.

Does anyone have an idea if this can be fixed ?

Many thanks

Lorenzo

Continues in #3802