Hi there, sorry if this is a bit of a noob question
I have a problem getting the new modbus modules to work on my OH2 install (RPI3)
I believe I have the correct modules installed
I can not find any documentation on how the new modules are to be configured, and have guessed the best I can. this is my first time with any version of OH so I may be missing something. I do however have plenty of experience with using Node-Red with Modbus and have it polling the same device without any issues. (I do realize it is an Alpha Feature for OH2 but folks are saying is basically works, I have also spend a long time reading through other posts to try to find answers before posting this request but to no avail, I like where this is going as a product and really would like to be able to start a few how toâs for it on my channel.
Here is my log excerpt to show the error
2017-10-01 17:58:07.325 [INFO ] [.dashboard.internal.DashboardService] - Started dashboard at http://192.168.1.146:8080
2017-10-01 17:58:07.341 [INFO ] [.dashboard.internal.DashboardService] - Started dashboard at https://192.168.1.146:8443
2017-10-01 17:58:07.524 [WARN ] [thome.core.internal.I18nProviderImpl] - Region (Canada) is invalid. Skip it.
java.util.IllformedLocaleException: Ill-formed region: Canada [at index 0]
_ at java.util.Locale$Builder.setRegion(Locale.java:2495)[:1.8.0_121]_
_ at org.eclipse.smarthome.core.internal.I18nProviderImpl.modified(I18nProviderImpl.java:115)_
_ at org.eclipse.smarthome.core.internal.I18nProviderImpl.activate(I18nProviderImpl.java:66)_
_ at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[:1.8.0_121]_
_ at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)[:1.8.0_121]_
_ at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[:1.8.0_121]_
_ at java.lang.reflect.Method.invoke(Method.java:498)[:1.8.0_121]_
_ at org.apache.felix.scr.impl.inject.BaseMethod.invokeMethod(BaseMethod.java:224)_
_ at org.apache.felix.scr.impl.inject.BaseMethod.access$500(BaseMethod.java:39)_
_ at org.apache.felix.scr.impl.inject.BaseMethod$Resolved.invoke(BaseMethod.java:617)_
_ at org.apache.felix.scr.impl.inject.BaseMethod.invoke(BaseMethod.java:501)_
_ at org.apache.felix.scr.impl.inject.ActivateMethod.invoke(ActivateMethod.java:302)_
_ at org.apache.felix.scr.impl.inject.ActivateMethod.invoke(ActivateMethod.java:294)_
_ at org.apache.felix.scr.impl.manager.SingleComponentManager.createImplementationObject(SingleComponentManager.java:297)[31:org.apache.felix.scr:2.0.6]_
_ at org.apache.felix.scr.impl.manager.SingleComponentManager.createComponent(SingleComponentManager.java:108)[31:org.apache.felix.scr:2.0.6]_
_ at org.apache.felix.scr.impl.manager.SingleComponentManager.getService(SingleComponentManager.java:906)[31:org.apache.felix.scr:2.0.6]_
_ at org.apache.felix.scr.impl.manager.SingleComponentManager.getServiceInternal(SingleComponentManager.java:879)[31:org.apache.felix.scr:2.0.6]_
_ at org.apache.felix.scr.impl.manager.SingleComponentManager.getService(SingleComponentManager.java:823)[31:org.apache.felix.scr:2.0.6]_
_ at org.eclipse.osgi.internal.serviceregistry.ServiceFactoryUse$1.run(ServiceFactoryUse.java:212)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]_
_ at java.security.AccessController.doPrivileged(Native Method)[:1.8.0_121]_
_ at org.eclipse.osgi.internal.serviceregistry.ServiceFactoryUse.factoryGetService(ServiceFactoryUse.java:210)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]_
_ at org.eclipse.osgi.internal.serviceregistry.ServiceFactoryUse.getService(ServiceFactoryUse.java:111)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]_
_ at org.eclipse.osgi.internal.serviceregistry.ServiceConsumer$2.getService(ServiceConsumer.java:45)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]_
_ at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.getService(ServiceRegistrationImpl.java:496)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]_
_ at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.getService(ServiceRegistry.java:461)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]_
_ at org.eclipse.osgi.internal.framework.BundleContextImpl.getService(BundleContextImpl.java:619)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]_
_ at com.eclipsesource.jaxrs.publisher.internal.ResourceTracker.addingService(ResourceTracker.java:39)[9:com.eclipsesource.jaxrs.publisher:5.3.1.201602281253]_
_ at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:941)[org.osgi.core-6.0.0.jar:]_
_ at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:870)[org.osgi.core-6.0.0.jar:]_
_ at org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:256)[org.osgi.core-6.0.0.jar:]_
_ at org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:229)[org.osgi.core-6.0.0.jar:]_
_ at org.osgi.util.tracker.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:901)[org.osgi.core-6.0.0.jar:]_
_ at org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.serviceChanged(FilteredServiceListener.java:109)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]_
_ at org.eclipse.osgi.internal.framework.BundleContextImpl.dispatchEvent(BundleContextImpl.java:914)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]_
_ at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]_
_ at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]_
_ at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEventPrivileged(ServiceRegistry.java:862)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]_
_ at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEvent(ServiceRegistry.java:801)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]_
_ at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.register(ServiceRegistrationImpl.java:127)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]_
_ at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.registerService(ServiceRegistry.java:225)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]_
_ at org.eclipse.osgi.internal.framework.BundleContextImpl.registerService(BundleContextImpl.java:464)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]_
_ at org.apache.felix.scr.impl.manager.AbstractComponentManager$3.register(AbstractComponentManager.java:886)[31:org.apache.felix.scr:2.0.6]_
_ at org.apache.felix.scr.impl.manager.AbstractComponentManager$3.register(AbstractComponentManager.java:873)[31:org.apache.felix.scr:2.0.6]_
_ at org.apache.felix.scr.impl.manager.RegistrationManager.changeRegistration(RegistrationManager.java:132)[31:org.apache.felix.scr:2.0.6]_
_ at org.apache.felix.scr.impl.manager.AbstractComponentManager.registerService(AbstractComponentManager.java:940)[31:org.apache.felix.scr:2.0.6]_
_ at org.apache.felix.scr.impl.manager.AbstractComponentManager.activateInternal(AbstractComponentManager.java:740)[31:org.apache.felix.scr:2.0.6]_
_ at org.apache.felix.scr.impl.manager.AbstractComponentManager.enableInternal(AbstractComponentManager.java:674)[31:org.apache.felix.scr:2.0.6]_
_ at org.apache.felix.scr.impl.manager.AbstractComponentManager.enable(AbstractComponentManager.java:429)[31:org.apache.felix.scr:2.0.6]_
_ at org.apache.felix.scr.impl.manager.ConfigurableComponentHolder.enableComponents(ConfigurableComponentHolder.java:657)[31:org.apache.felix.scr:2.0.6]_
_ at org.apache.felix.scr.impl.BundleComponentActivator.initialEnable(BundleComponentActivator.java:341)[31:org.apache.felix.scr:2.0.6]_
_ at org.apache.felix.scr.impl.Activator.loadComponents(Activator.java:403)[31:org.apache.felix.scr:2.0.6]_
_ at org.apache.felix.scr.impl.Activator.access$200(Activator.java:54)[31:org.apache.felix.scr:2.0.6]_
_ at org.apache.felix.scr.impl.Activator$ScrExtension.start(Activator.java:278)[31:org.apache.felix.scr:2.0.6]_
_ at org.apache.felix.utils.extender.AbstractExtender.createExtension(AbstractExtender.java:259)[31:org.apache.felix.scr:2.0.6]_
_ at org.apache.felix.utils.extender.AbstractExtender.modifiedBundle(AbstractExtender.java:232)[31:org.apache.felix.scr:2.0.6]_
_ at org.osgi.util.tracker.BundleTracker$Tracked.customizerModified(BundleTracker.java:482)[org.osgi.core-6.0.0.jar:]_
_ at org.osgi.util.tracker.BundleTracker$Tracked.customizerModified(BundleTracker.java:415)[org.osgi.core-6.0.0.jar:]_
_ at org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:232)[org.osgi.core-6.0.0.jar:]_
_ at org.osgi.util.tracker.BundleTracker$Tracked.bundleChanged(BundleTracker.java:444)[org.osgi.core-6.0.0.jar:]_
_ at org.eclipse.osgi.internal.framework.BundleContextImpl.dispatchEvent(BundleContextImpl.java:902)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]_
_ at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]_
_ at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]_
_ at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEventPrivileged(EquinoxEventPublisher.java:165)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]_
_ at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEvent(EquinoxEventPublisher.java:75)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]_
_ at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEvent(EquinoxEventPublisher.java:67)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]_
_ at org.eclipse.osgi.internal.framework.EquinoxContainerAdaptor.publishModuleEvent(EquinoxContainerAdaptor.java:102)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]_
_ at org.eclipse.osgi.container.Module.publishEvent(Module.java:466)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]_
_ at org.eclipse.osgi.container.Module.start(Module.java:457)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]_
_ at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1582)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]_
_ at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1562)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]_
_ at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1533)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]_
_ at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1476)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]_
_ at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]_
_ at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]_
_ at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]_
2017-10-01 17:58:10.996 [INFO ] [e.io.rest.internal.filter.CorsFilter] - enabled CORS for REST API.
2017-10-01 17:58:16.250 [WARN ] [el.core.internal.ModelRepositoryImpl] - Configuration model âdefault.itemsâ has errors, therefore ignoring it: [1,1]: missing EOF at '#'
2017-10-01 17:58:21.574 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'demo.sitemapâ
2017-10-01 17:58:21.635 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'xxdefault.sitemapâ
2017-10-01 17:58:21.678 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'lab.sitemapâ
2017-10-01 17:58:24.620 [INFO ] [basic.internal.servlet.WebAppServlet] - Started Basic UI at /basicui/app
2017-10-01 17:58:24.732 [INFO ] [arthome.ui.paper.internal.PaperUIApp] - Started Paper UI at /paperui
2017-10-01 17:58:24.816 [INFO ] [panel.internal.HABPanelDashboardTile] - Started HABPanel at /habpanel
2017-10-01 17:58:25.530 [INFO ] [ui.habmin.internal.servlet.HABminApp] - Started HABmin servlet at /habmin
2017-10-01 17:58:25.892 [INFO ] [assic.internal.servlet.WebAppServlet] - Started Classic UI at /classicui/app
2017-10-01 17:58:26.211 [INFO ] [ding.piface.internal.PifaceActivator] - Piface binding has been started.
2017-10-01 17:58:26.536 [WARN ] [sql.internal.MysqlPersistenceService] - The SQL database URL is missing - please configure the sql:url parameter in openhab.cfg
2017-10-01 17:58:26.756 [INFO ] [rt.modbus.internal.ModbusManagerImpl] - Modbus manager activated
2017-10-01 17:58:26.776 [INFO ] [modbus.internal.ModbusHandlerFactory] - Setting manager: org.openhab.io.transport.modbus.internal.ModbusManagerImpl@d770b5
2017-10-01 17:58:27.227 [ERROR] [wimpi.modbus.io.ModbusTCPTransaction] - execute try 1/3 error: I/O exception - failed to read⊠Request: net.wimpi.modbus.msg.ReadMultipleRegistersRequest@1dd1379 (unit id 1 & transaction 1). Address: /192.168.1.157:502
2017-10-01 17:58:27.307 [ERROR] [wimpi.modbus.io.ModbusTCPTransaction] - execute try 2/3 error: I/O exception - failed to read⊠Request: net.wimpi.modbus.msg.ReadMultipleRegistersRequest@1dd1379 (unit id 1 & transaction 2). Address: /192.168.1.157:502
2017-10-01 17:58:27.391 [ERROR] [wimpi.modbus.io.ModbusTCPTransaction] - execute try 3/3 error: I/O exception - failed to read⊠Request: net.wimpi.modbus.msg.ReadMultipleRegistersRequest@1dd1379 (unit id 1 & transaction 3). Address: /192.168.1.157:502
2017-10-01 17:58:27.394 [ERROR] [wimpi.modbus.io.ModbusTCPTransaction] - execute reached max tries 3, throwing last error: I/O exception - failed to read⊠Request: net.wimpi.modbus.msg.ReadMultipleRegistersRequest@1dd1379 (unit id 1 & transaction 3). Address: /192.168.1.157:502
2017-10-01 17:58:27.426 [ERROR] [rt.modbus.internal.ModbusManagerImpl] - Error when executing read request (ModbusPollerThingHandlerImpl.ModbusPollerReadRequest@efce2b[slaveId=1,functionCode=READ_MULTIPLE_REGISTERS,start=16,length=2]): net.wimpi.modbus.ModbusIOException Executing transaction failed (tried 3 times)
2017-10-01 17:58:27.496 [ERROR] [odbus.handler.ModbusDataThingHandler] - Thing modbus:data:1eb052bc âAX8â had error on read: net.wimpi.modbus.ModbusIOException Executing transaction failed (tried 3 times). Stack trace follows for unexpected errors.
net.wimpi.modbus.ModbusIOException: Executing transaction failed (tried 3 times)
_ at net.wimpi.modbus.io.ModbusTCPTransaction.execute(ModbusTCPTransaction.java:220)[222:org.openhab.io.transport.modbus:2.2.0.201709291832]_
_ at org.openhab.io.transport.modbus.internal.ModbusManagerImpl.executeOneTimePoll(ModbusManagerImpl.java:493)[222:org.openhab.io.transport.modbus:2.2.0.201709291832]_
_ at org.openhab.io.transport.modbus.internal.ModbusManagerImpl.lambda$19(ModbusManagerImpl.java:545)[222:org.openhab.io.transport.modbus:2.2.0.201709291832]_
_ at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)[:1.8.0_121]_
_ at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)[:1.8.0_121]_
_ at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)[:1.8.0_121]_
_ at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)[:1.8.0_121]_
_ at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[:1.8.0_121]_
_ at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[:1.8.0_121]_
_ at java.lang.Thread.run(Thread.java:745)[:1.8.0_121]_
And the Event log for the same period
2017-10-01 17:58:22.149 [ItemChannelLinkAddedEvent ] - Link âAX8_Temp-modbus:readwrite:d8648559:numberâ has been added.
2017-10-01 17:58:22.170 [ItemChannelLinkAddedEvent ] - Link âTests-modbus:read:2851bf8c:numberâ has been added.
2017-10-01 17:58:22.177 [ItemChannelLinkAddedEvent ] - Link âAX8_InternalTemp-modbus:data:1eb052bc:numberâ has been added.
2017-10-01 17:58:22.277 [ThingAddedEvent ] - Thing âmodbus:data:1eb052bcâ has been added.
2017-10-01 17:58:22.290 [ThingAddedEvent ] - Thing âmodbus:tcp:ce9bb45aâ has been added.
2017-10-01 17:58:22.292 [ThingAddedEvent ] - Thing âmodbus:poller:2889750câ has been added.
2017-10-01 17:58:26.814 [hingStatusInfoChangedEvent] - âmodbus:data:1eb052bcâ changed from UNINITIALIZED to UNINITIALIZED (BRIDGE_UNINITIALIZED)
2017-10-01 17:58:26.895 [hingStatusInfoChangedEvent] - âmodbus:tcp:ce9bb45aâ changed from UNINITIALIZED to INITIALIZING
2017-10-01 17:58:26.902 [hingStatusInfoChangedEvent] - âmodbus:tcp:ce9bb45aâ changed from INITIALIZING to UNKNOWN
2017-10-01 17:58:26.973 [hingStatusInfoChangedEvent] - âmodbus:tcp:ce9bb45aâ changed from UNKNOWN to ONLINE
2017-10-01 17:58:27.025 [hingStatusInfoChangedEvent] - âmodbus:poller:2889750câ changed from UNINITIALIZED to INITIALIZING
2017-10-01 17:58:27.071 [hingStatusInfoChangedEvent] - âmodbus:poller:2889750câ changed from INITIALIZING to ONLINE
2017-10-01 17:58:27.144 [hingStatusInfoChangedEvent] - âmodbus:data:1eb052bcâ changed from UNINITIALIZED (BRIDGE_UNINITIALIZED) to INITIALIZING
2017-10-01 17:58:27.232 [hingStatusInfoChangedEvent] - âmodbus:data:1eb052bcâ changed from INITIALIZING to ONLINE
2017-10-01 17:58:27.509 [hingStatusInfoChangedEvent] - âmodbus:data:1eb052bcâ changed from ONLINE to OFFLINE (COMMUNICATION_ERROR): Error with read: net.wimpi.modbus.ModbusIOException: Executing transaction failed (tried 3 times)
The IP is correct, same for socket etc. I am trying in this case to read a Holding register index 16 but any will do for now.
Here are the Things defined (a few minutes after a reboot)
Here is each definition
TCP
Poller:
Data:
Does the new modules require any manual input to the file default.items ?
Number AX8_Temp âAX8 Temperature [%d]â { modbus=âAX8:16â}
are entries required in modbus.config ?
I can get Modbus/TCP connection, , the poller shows online, but the data even when I can get it online will still not retrieve data. I know the device is ok as I have it running every few seconds through node red with the same parameters.
I am planning (Or was) to video a how to for Openhab for my YouTube channel :- thebreadboard where I post many industrial and home control related videos, I was hoping to be able to start with openHAB so your help getting this to work would be appreciated
Regards
Peter Oakes