Errors talking to serial port

181 views
Skip to first unread message

Kirk McCann

unread,
Apr 5, 2014, 12:13:38 PM4/5/14
to ope...@googlegroups.com
I'm getting this error when trying to read data from a usb serial device. 

15:18:25.607 DEBUG o.o.b.s.internal.SerialBinding[:114] - Serial Binding Port:/dev/ttyUSB0
15:18:44.734 ERROR o.o.m.i.i.GenericItemProvider[:343] - Binding configuration of type 'serial' of item ‘serialdevice‘ could not be parsed correctly.
org.openhab.model.item.binding.BindingConfigParseException: Could not open serial port /dev/ttyUSB0: gnu.io.CommPortIdentifier.open(Ljava/lang/String;I)Lgnu/io/CommPort;
    at org.openhab.binding.serial.internal.SerialBinding.processBindingConfiguration(SerialBinding.java:126)
    at org.openhab.model.item.internal.GenericItemProvider.internalDispatchBindings(GenericItemProvider.java:341)
    at org.openhab.model.item.internal.GenericItemProvider.internalDispatchBindings(GenericItemProvider.java:317)
    at org.openhab.model.item.internal.GenericItemProvider.processBindingConfigsFromModel(GenericItemProvider.java:171)
    at org.openhab.model.item.internal.GenericItemProvider.modelChanged(GenericItemProvider.java:379)
    at org.openhab.model.core.internal.ModelRepositoryImpl.notifyListeners(ModelRepositoryImpl.java:158)
    at org.openhab.model.core.internal.ModelRepositoryImpl.addOrRefreshModel(ModelRepositoryImpl.java:84)
    at org.openhab.model.core.internal.folder.FolderObserver.checkFolder(FolderObserver.java:142)
    at org.openhab.model.core.internal.folder.FolderObserver.run(FolderObserver.java:99)

demo.item file entry:
String serialdevice             "serialdevice"    (gGF)    { serial="/dev/ttyUSB0"}

The device:
crw-rw-rw- 1 root dialout 188, 0 Apr  5 07:07 /dev/ttyUSB0

This is running on ubuntu 13.10.

Any thoughts?

Thanks,
Kirk

Kirk McCann

unread,
Apr 7, 2014, 9:14:56 AM4/7/14
to ope...@googlegroups.com
Any ideas?  I'm kind of stumped.  I wrote a simple java file and was able to get the data I was looking for however when using the serial binding I get this error.  The only thing I changed in the binding was the speed because my device only works at 115200.

-Kirk

cau...@gmail.com

unread,
Jun 30, 2014, 6:52:56 AM6/30/14
to ope...@googlegroups.com
I had the same problem and launching the OpenHab server with `sudo` did the trick! The /var/lock/ directory has root perms and the lock file couldn't be created...

El dilluns 7 d’abril de 2014 15:14:56 UTC+2, Kirk McCann va escriure:
Reply all
Reply to author
Forward
0 new messages