Have you defined any items (e.g. Switch) that are bound to the Enocean binding?
Also, make sure that the user openhab has access to the serial port:
Check the device: ls -al /dev/ttyS0. It should owned by root and group dialout.
Then: usermod -a -G dialout openhab (and restart OH2). Maybe this is done by default in openHABian… I am not sure…
thank you …
I did not yet bound the Switch to the binding. I think, first I have to check the Enocean connectivity. And then I want get information about the Enocean ID’s.
the ls -al shows:
crw-rw---- 1 root dialout 4, 64 Feb 10 20:42 /dev/ttyS0
I also checked the ownership off the tty. Cause, I used the openHABian the installation was fine.
If I use my rocker then the yellow led in the USB300 went on and off. But after a while this stops. Strange …
I will post this here, in case anyone might make the same mistake.
openhab.log
2017-03-18 23:04:50.938 [ERROR] [org.apache.felix.configadmin ] - [org.osgi.service.event.EventHandler, org.osgi.service.cm.ManagedService, id=268, bundle=180/mvn:org.openhab.binding/org.openhab.binding.enocean/1.9.0]: Updating pr
operty serialPort of configuration org.openhab.enocean caused a problem: Serial port 'serialPort=/dev/ttyUSB0' could not be opened. Available ports are:
/dev/ttyUSB0
org.osgi.service.cm.ConfigurationException: serialPort : Serial port 'serialPort=/dev/ttyUSB0' could not be opened. Available ports are:
/dev/ttyUSB0
at org.openhab.binding.enocean.internal.bus.EnoceanBinding.updated(EnoceanBinding.java:159)[180:org.openhab.binding.enocean:1.9.0]
at org.apache.felix.cm.impl.helper.ManagedServiceTracker.updated(ManagedServiceTracker.java:189)[3:org.apache.felix.configadmin:1.8.12]
at org.apache.felix.cm.impl.helper.ManagedServiceTracker.updateService(ManagedServiceTracker.java:152)[3:org.apache.felix.configadmin:1.8.12]
at org.apache.felix.cm.impl.helper.ManagedServiceTracker.provideConfiguration(ManagedServiceTracker.java:85)[3:org.apache.felix.configadmin:1.8.12]
at org.apache.felix.cm.impl.ConfigurationManager$ManagedServiceUpdate.provide(ConfigurationManager.java:1461)[3:org.apache.felix.configadmin:1.8.12]
at org.apache.felix.cm.impl.ConfigurationManager$ManagedServiceUpdate.run(ConfigurationManager.java:1417)[3:org.apache.felix.configadmin:1.8.12]
at org.apache.felix.cm.impl.UpdateThread.run0(UpdateThread.java:141)[3:org.apache.felix.configadmin:1.8.12]
at org.apache.felix.cm.impl.UpdateThread.run(UpdateThread.java:109)[3:org.apache.felix.configadmin:1.8.12]
at java.lang.Thread.run(Thread.java:745)[:1.8.0_121]
I just freshly installed openhabian on my Pi3 and set up enocean. However, the logs show an error where I don’t know how to deal with.
openhab> log:set DEBUG org.openhab.binding.enocean
openhab> log:tail org.openhab.binding.enocean
13:59:24.738 [ERROR] [org.openhab.binding.enocean ] - [org.openhab.binding.enocean.binding(191)] The deactivate method has thrown an exception
java.lang.NullPointerException
at org.opencean.core.EnoceanSerialConnector.disconnect(EnoceanSerialConnector.java:71)
at org.openhab.binding.enocean.internal.bus.EnoceanBinding.deactivate(EnoceanBinding.java:95)
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)[32:org.apache.felix.scr:2.0.6]
at org.apache.felix.scr.impl.inject.BaseMethod.access$500(BaseMethod.java:39)[32:org.apache.felix.scr:2.0.6]
at org.apache.felix.scr.impl.inject.BaseMethod$Resolved.invoke(BaseMethod.java:617)[32:org.apache.felix.scr:2.0.6]
at org.apache.felix.scr.impl.inject.BaseMethod.invoke(BaseMethod.java:501)[32:org.apache.felix.scr:2.0.6]
at org.apache.felix.scr.impl.inject.ActivateMethod.invoke(ActivateMethod.java:302)[32:org.apache.felix.scr:2.0.6]
at org.apache.felix.scr.impl.inject.ActivateMethod.invoke(ActivateMethod.java:294)[32:org.apache.felix.scr:2.0.6]
at org.apache.felix.scr.impl.manager.SingleComponentManager.disposeImplementationObject(SingleComponentManager.java:343)[32:org.apache.felix.scr:2.0.6]
at org.apache.felix.scr.impl.manager.SingleComponentManager.deleteComponent(SingleComponentManager.java:152)[32:org.apache.felix.scr:2.0.6]
at org.apache.felix.scr.impl.manager.AbstractComponentManager.doDeactivate(AbstractComponentManager.java:813)[32:org.apache.felix.scr:2.0.6]
at org.apache.felix.scr.impl.manager.AbstractComponentManager.deactivateInternal(AbstractComponentManager.java:787)[32:org.apache.felix.scr:2.0.6]
at org.apache.felix.scr.impl.manager.AbstractComponentManager.dispose(AbstractComponentManager.java:579)[32:org.apache.felix.scr:2.0.6]
at org.apache.felix.scr.impl.manager.ConfigurableComponentHolder.disposeComponents(ConfigurableComponentHolder.java:706)[32:org.apache.felix.scr:2.0.6]
at org.apache.felix.scr.impl.BundleComponentActivator.dispose(BundleComponentActivator.java:523)[32:org.apache.felix.scr:2.0.6]
at org.apache.felix.scr.impl.Activator.disposeComponents(Activator.java:452)[32:org.apache.felix.scr:2.0.6]
at org.apache.felix.scr.impl.Activator.access$300(Activator.java:54)[32:org.apache.felix.scr:2.0.6]
at org.apache.felix.scr.impl.Activator$ScrExtension.destroy(Activator.java:306)[32:org.apache.felix.scr:2.0.6]
at org.apache.felix.utils.extender.AbstractExtender$2.run(AbstractExtender.java:290)[32:org.apache.felix.scr:2.0.6]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)[:1.8.0_121]
at java.util.concurrent.FutureTask.run(FutureTask.java:266)[:1.8.0_121]
at org.apache.felix.utils.extender.AbstractExtender.destroyExtension(AbstractExtender.java:312)[32:org.apache.felix.scr:2.0.6]
at org.apache.felix.utils.extender.AbstractExtender.bundleChanged(AbstractExtender.java:186)[32:org.apache.felix.scr:2.0.6]
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.doStop(Module.java:624)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
at org.eclipse.osgi.container.Module.stop(Module.java:488)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
at org.eclipse.osgi.internal.framework.EquinoxBundle.stop(EquinoxBundle.java:419)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
at org.apache.karaf.bundle.command.Stop.executeOnBundle(Stop.java:38)[38:org.apache.karaf.bundle.core:4.0.8]
at org.apache.karaf.bundle.command.BundlesCommand.doExecute(BundlesCommand.java:64)[38:org.apache.karaf.bundle.core:4.0.8]
at org.apache.karaf.bundle.command.BundlesCommand.execute(BundlesCommand.java:54)[38:org.apache.karaf.bundle.core:4.0.8]
at org.apache.karaf.shell.impl.action.command.ActionCommand.execute(ActionCommand.java:83)[55:org.apache.karaf.shell.core:4.0.8]
at org.apache.karaf.shell.impl.console.osgi.secured.SecuredCommand.execute(SecuredCommand.java:67)[55:org.apache.karaf.shell.core:4.0.8]
at org.apache.karaf.shell.impl.console.osgi.secured.SecuredCommand.execute(SecuredCommand.java:87)[55:org.apache.karaf.shell.core:4.0.8]
at org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:480)[55:org.apache.karaf.shell.core:4.0.8]
at org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:406)[55:org.apache.karaf.shell.core:4.0.8]
at org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108)[55:org.apache.karaf.shell.core:4.0.8]
at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:182)[55:org.apache.karaf.shell.core:4.0.8]
at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:119)[55:org.apache.karaf.shell.core:4.0.8]
at org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessionImpl.java:94)[55:org.apache.karaf.shell.core:4.0.8]
at org.apache.karaf.shell.impl.console.ConsoleSessionImpl.run(ConsoleSessionImpl.java:274)[55:org.apache.karaf.shell.core:4.0.8]
at java.lang.Thread.run(Thread.java:745)[:1.8.0_121]
13:59:28.888 [INFO ] [.enocean.internal.bus.EnoceanBinding] - Connecting to Enocean [serialPort='/dev/ttyUSB0' ].
I run OpenHab 2 on a RasspberryPi 3 with openHABian and the USB300 Stick. If I press on my rocker-switch a new entry has been created in the log file:
/var/log/openhab2
I Installed the EnOceanSpy to see more details about the OnOcean communication. But nothing happened if I used
./EnOceanSpy /dev/ttyUSB0
and clicking the rocker switch.
Also the txt.log is empty after useing:
the txt.log
Then I used the EnOcean DolphinView via Windows but the stick appears with an Error if I press the connect button. (Pressing the Firmware Download button the Communication failed (init device fail)
Maybe the USB300 Stick brocken?