I’m having problems with serial binding.
I’m using an USB to serial cable on a raspberry pi with openhabian (2.2)
This is how i defined the item:
String XAP800 "XAP800" { serial="/dev/ttyUSB0@34200" }
And this is the message I get:
2018-05-10 08:47:52.109 [ERROR] [el.item.internal.GenericItemProvider] - Binding configuration of type 'serial' of item 'XAP800' could not be parsed correctly.
org.eclipse.smarthome.model.item.BindingConfigParseException: Could not open serial port /dev/ttyUSB0: gnu.io.PortInUseException: openHAB
at org.openhab.core.binding.internal.BindingConfigReaderDelegate.processBindingConfiguration(BindingConfigReaderDelegate.java:51) [210:org.openhab.core.compat1x:2.2.0]
at org.eclipse.smarthome.model.item.internal.GenericItemProvider.internalDispatchBindings(GenericItemProvider.java:341) [135:org.eclipse.smarthome.model.item:0.10.0.b1]
at org.eclipse.smarthome.model.item.internal.GenericItemProvider.internalDispatchBindings(GenericItemProvider.java:310) [135:org.eclipse.smarthome.model.item:0.10.0.b1]
at org.eclipse.smarthome.model.item.internal.GenericItemProvider.processBindingConfigsFromModel(GenericItemProvider.java:195) [135:org.eclipse.smarthome.model.item:0.10.0.b1]
at org.eclipse.smarthome.model.item.internal.GenericItemProvider.modelChanged(GenericItemProvider.java:377) [135:org.eclipse.smarthome.model.item:0.10.0.b1]
at org.eclipse.smarthome.model.core.internal.ModelRepositoryImpl.notifyListeners(ModelRepositoryImpl.java:314) [134:org.eclipse.smarthome.model.core:0.10.0.b1]
at org.eclipse.smarthome.model.core.internal.ModelRepositoryImpl.addOrRefreshModel(ModelRepositoryImpl.java:143) [134:org.eclipse.smarthome.model.core:0.10.0.b1]
at org.eclipse.smarthome.model.core.internal.folder.FolderObserver.checkFile(FolderObserver.java:247) [134:org.eclipse.smarthome.model.core:0.10.0.b1]
at org.eclipse.smarthome.model.core.internal.folder.FolderObserver.processWatchEvent(FolderObserver.java:311) [134:org.eclipse.smarthome.model.core:0.10.0.b1]
at org.eclipse.smarthome.core.service.WatchQueueReader.run(WatchQueueReader.java:209) [109:org.eclipse.smarthome.core:0.10.0.b1]
at java.lang.Thread.run(Thread.java:748) [?:?]
I did put openhab (and openhabian just to be sure) to the dialout group, but I don’t think it’s this kind of problem, as it states that the port is in use by openHAB (?!?)
My lsusb (at the moment the usb<->rs232 cable with the device is the only usb connected)
[08:57:03] openhabian@openHABianPi:~$ lsusb
Bus 001 Device 004: ID 067b:2303 Prolific Technology, Inc. PL2303 Serial Port
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. SMSC9512/9514 Fast Ethernet Adapter
Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp. SMC9514 Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Can anyone help me?