ls -la /dev/serial/by-id/
lrwxrwxrwx 1 root root 13 Feb 3 02:09 usb-1a86_USB2.0-Serial-if00-port0 -> …/…/ttyUSB0
ls -l /dev
crw-rw---- 1 root dialout 188, 0 Feb 3 10:07 ttyUSB0
i add the openhab user to the tty group with the same result.
One Question:
In which file must i put the parameters:
-Dgnu.io.rxtx.SerialPorts=/dev/ttyUSB0
-Djava.library.path=/usr/lib/jni (/usr/lib/jni does not exist on my system)
I removed the parameters from /etc/default/openhab
and get this error:
10:25:00.185 [ERROR] [.maxcul.internal.MaxCulBinding:292 ] - Cannot open CUL device
org.openhab.io.transport.cul.CULDeviceException: gnu.io.UnsupportedCommOperationException: Invalid Parameter
at org.openhab.io.transport.cul.internal.CULSerialHandlerImpl.openHardware(CULSerialHandlerImpl.java:273) ~[na:na]
at org.openhab.io.transport.cul.internal.AbstractCULHandler.open(AbstractCULHandler.java:154) ~[na:na]
at org.openhab.io.transport.cul.CULManager.createNewHandler(CULManager.java:170) ~[bundlefile:na]
at org.openhab.io.transport.cul.CULManager.getOpenCULHandler(CULManager.java:89) ~[bundlefile:na]
at org.openhab.binding.maxcul.internal.MaxCulBinding.setupDevice(MaxCulBinding.java:286) [bundlefile:na]
at org.openhab.binding.maxcul.internal.MaxCulBinding.updated(MaxCulBinding.java:267) [bundlefile:na]
at org.eclipse.equinox.internal.cm.ManagedServiceTracker$1.run(ManagedServiceTracker.java:183) [org.eclipse.equinox.cm_1.0.400.v20120522-1841.jar:na]
at org.eclipse.equinox.internal.cm.SerializedTaskQueue$1.run(SerializedTaskQueue.java:36) [org.eclipse.equinox.cm_1.0.400.v20120522-1841.jar:na]
Caused by: gnu.io.UnsupportedCommOperationException: Invalid Parameter
at gnu.io.RXTXPort.setSerialPortParams(RXTXPort.java:212) ~[na:na]
at org.openhab.io.transport.cul.internal.CULSerialHandlerImpl.openHardware(CULSerialHandlerImpl.java:258) ~[na:na]
… 7 common frames omitted
Looks like baudrate is a known defect in 1.8. Which is unfortunate, as I’m getting quite a few dropped packets / non responses, and wanted to try a lower baudrate to see if that improved things. Either way, it works well enough with the baudrate config removed.
I’m keen to test this, if only because my system relies heavily on maxcul, so I’d like to know it’s keeping working.
Having said this, looks like baud rate only controls the connection to the dongle, not from the dongle upstream to the valves, which is where I think I’m losing connectivity (and looks like the default is 9200 anyway, so I can’t go slower).
Two questions:
Is there any other setting in the code that impacts packet loss as it sends to the valves? Or is that just something I live with because it’s how the devices work?
What’s my best way to go about testing this new version? I’m running 1.8 from the debian repository, but it looks like the cul jar has changed from a binding to a transport? Can I just drop the changed jars in and expect it to work, or do I need to upgrade my whole openhab to the snapshot version?
I tried these JARs from the cloudbees build
org.openhab.binding.maxcul-1.9.0-SNAPSHOT.jar
org.openhab.io.transport.cul-1.9.0-SNAPSHOT.jar
and got the following error.
So it’s basically telling me that the cul transport module can’t open the serial port because it is already using it ? huh?
2016-04-21 18:06:45.783 [DEBUG] [.maxcul.internal.MaxCulBinding] - Activating MaxCul binding
2016-04-21 18:06:45.788 [DEBUG] [.maxcul.internal.MaxCulBinding] - MaxCUL Reading config
2016-04-21 18:06:45.804 [INFO ] [t.c.i.s.CULSerialConfigFactory] - Update config, parity = NONE (0)
2016-04-21 18:06:45.807 [DEBUG] [.o.i.t.cul.internal.CULManager] - Trying to open device serial:/dev/ttyACM0 in mode MAX
2016-04-21 18:06:45.808 [DEBUG] [.o.i.t.cul.internal.CULManager] - Searching class for device type serial
2016-04-21 18:06:45.834 [DEBUG] [i.t.c.i.s.CULSerialHandlerImpl] - Opening serial CUL connection for /dev/ttyACM0
2016-04-21 18:06:45.838 [ERROR] [.o.i.t.cul.CULLifecycleManager] - Can't open CUL
org.openhab.io.transport.cul.CULDeviceException: The port /dev/ttyACM0 is currenty used by org.openhab.io.transport.cul.internal.serial.CULSerialHandlerImpl
at org.openhab.io.transport.cul.internal.serial.CULSerialHandlerImpl.openHardware(CULSerialHandlerImpl.java:80) ~[bundlefile:na]
at org.openhab.io.transport.cul.internal.AbstractCULHandler.open(AbstractCULHandler.java:139) ~[bundlefile:na]
at org.openhab.io.transport.cul.internal.CULManager.createNewHandler(CULManager.java:149) ~[bundlefile:na]
at org.openhab.io.transport.cul.internal.CULManager.getOpenCULHandler(CULManager.java:84) ~[bundlefile:na]
at org.openhab.io.transport.cul.CULLifecycleManager.open(CULLifecycleManager.java:77) [bundlefile:na]
at org.openhab.io.transport.cul.CULLifecycleManager.config(CULLifecycleManager.java:66) [bundlefile:na]
at org.openhab.binding.maxcul.internal.MaxCulBinding.updated(MaxCulBinding.java:265) [bundlefile:na]
at org.eclipse.equinox.internal.cm.ManagedServiceTracker$1.run(ManagedServiceTracker.java:183) [org.eclipse.equinox.cm_1.0.400.v20120522-1841.jar:na]
at org.eclipse.equinox.internal.cm.SerializedTaskQueue$1.run(SerializedTaskQueue.java:36) [org.eclipse.equinox.cm_1.0.400.v20120522-1841.jar:na]