Maxcul doesn't start for me with 1.7.1

It looks like the group you need to have your user in is “dialout”, have you tried granting that permission to your user?

Paul

From: Arne Stenmanns <bot@community.openhab.orgmailto:bot@community.openhab.org>
Reply-To: openHAB Community <replies+bbab8a47150db00f8bbf3b42bfc8fe00@community.openhab.orgmailto:replies+bbab8a47150db00f8bbf3b42bfc8fe00@community.openhab.org>
Date: Wednesday, 3 February 2016 at 10:28 PM
To: Paul Lambert <paul@planar.id.aumailto:paul@planar.id.au>
Subject: [openHAB] [Add-ons/Bindings] Maxcul doesn’t start for me with 1.7.1

[https://community.openhab.org/letter_avatar_proxy/v2/letter/m/fbc32d/45.png] MotShttps://community.openhab.org/users/mots Arne Stenmannshttps://community.openhab.org/users/mots
February 3

Thank you for the fast response.

The device is exist on /dev/ttyUSB0:

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

Thank you

Visit Topichttps://community.openhab.org/t/maxcul-doesnt-start-for-me-with-1-7-1/4030/20 or reply to this email to respond.

Yes the openhab and the pi user are in dialout group

It’s now Invalid Parameter Error

I have a similar error, when I delete the baudrate config it runs. I’m now trying to work out why baudrate isn’t working as a parameter.

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.

Please download, install and use the new CUL bundles updated here:

They can be downloaded from here:

https://openhab.ci.cloudbees.com/job/openHAB1-Addons/lastSuccessfulBuild/artifact/bundles/

@tarioch also updated the wiki pages recently. Many thanks to him for his efforts.

Please provide feedback on successes/failures. Thank you!

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:

  1. 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?
  2. 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?

This could be a question for @tarioch. Are any differences in required JARs from previous documented in the wiki?

The new JARs should work under the 1.8 version of the openHAB runtime. Just remove the 1.8 JARs and put the 1.9.0-SNAPSHOT JARs in the addons folder.

The change from binding to transport happened before, I just updated the documentation to reflect this as well.

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]

How does your config look like?