[solved]Can't open CUL error

Hi,
I did a complete new install of OH2, the system is running good, however I can’t get my CUL-Stick to send via OH.
I have following addons installed according “bundle:list”


191 | Active | 80 | 1.9.0.201608130112 | openHAB CULIntertechno Binding

193 | Active | 80 | 1.9.0.201608130112 | openHAB CUL Transport Bundle
194 | Active | 80 | 2.0.0.201608032032 | openHAB Serial Transport Bundle

Which are the same as in my old installation, in which the CUL-Stick did send.
I’m running OH from user openhab, which is in the "dialout"group. I could send a command using “screen” from user openhab.

What am I missing?

Looking at the log during startup I see the following error:

2016-08-15 12:53:26.702 [INFO ] [ternal.serial.CULSerialConfigFactory] - Update config, baudrate = 38400
2016-08-15 12:53:26.705 [INFO ] [ternal.serial.CULSerialConfigFactory] - Update config, parity = NONE (0)
2016-08-15 12:53:26.887 [ERROR] [io.transport.cul.CULLifecycleManager] - Can’t open CUL
org.openhab.io.transport.cul.CULDeviceException: gnu.io.UnsupportedCommOperationException: Invalid Parameter
at org.openhab.io.transport.cul.internal.serial.CULSerialHandlerImpl.openHardware(CULSerialHandlerImpl.java:104)[193:org.openhab.io.transport.cul:1.9.0.2016081$
at org.openhab.io.transport.cul.internal.AbstractCULHandler.open(AbstractCULHandler.java:139)[193:org.openhab.io.transport.cul:1.9.0.201608130112]
at org.openhab.io.transport.cul.internal.CULManager.createNewHandler(CULManager.java:149)[193:org.openhab.io.transport.cul:1.9.0.201608130112]
at org.openhab.io.transport.cul.internal.CULManager.getOpenCULHandler(CULManager.java:84)[193:org.openhab.io.transport.cul:1.9.0.201608130112]
at org.openhab.io.transport.cul.CULLifecycleManager.open(CULLifecycleManager.java:85)[193:org.openhab.io.transport.cul:1.9.0.201608130112]
at org.openhab.io.transport.cul.CULLifecycleManager.config(CULLifecycleManager.java:74)[193:org.openhab.io.transport.cul:1.9.0.201608130112]
at org.openhab.binding.intertechno.internal.CULIntertechnoBinding.updated(CULIntertechnoBinding.java:147)[191:org.openhab.binding.intertechno:1.9.0.20160813011$
at org.apache.felix.cm.impl.helper.ManagedServiceTracker.updated(ManagedServiceTracker.java:189)[7:org.apache.felix.configadmin:1.8.8]
at org.apache.felix.cm.impl.helper.ManagedServiceTracker.updateService(ManagedServiceTracker.java:152)[7:org.apache.felix.configadmin:1.8.8]
at org.apache.felix.cm.impl.helper.ManagedServiceTracker.provideConfiguration(ManagedServiceTracker.java:85)[7:org.apache.felix.configadmin:1.8.8]
at org.apache.felix.cm.impl.ConfigurationManager$ManagedServiceUpdate.provide(ConfigurationManager.java:1444)[7:org.apache.felix.configadmin:1.8.8]
at org.apache.felix.cm.impl.ConfigurationManager$ManagedServiceUpdate.run(ConfigurationManager.java:1400)[7:org.apache.felix.configadmin:1.8.8]
at org.apache.felix.cm.impl.UpdateThread.run0(UpdateThread.java:143)[7:org.apache.felix.configadmin:1.8.8]
at org.apache.felix.cm.impl.UpdateThread.run(UpdateThread.java:110)[7:org.apache.felix.configadmin:1.8.8]
at java.lang.Thread.run(Thread.java:745)[:1.8.0_101]
Caused by: gnu.io.UnsupportedCommOperationException: Invalid Parameter
at gnu.io.RXTXPort.setSerialPortParams(RXTXPort.java:212)[194:org.openhab.io.transport.serial:2.0.0.201608032032]
at org.openhab.io.transport.cul.internal.serial.CULSerialHandlerImpl.openHardware(CULSerialHandlerImpl.java:89)[193:org.openhab.io.transport.cul:1.9.0.20160813$
… 14 more
2016-08-15 12:53:26.900 [ERROR] [org.apache.felix.configadmin ] - [org.osgi.service.event.EventHandler, org.osgi.service.cm.ManagedService, id=298, bundle=191/m$
java.lang.NullPointerException
at org.openhab.binding.intertechno.internal.CULIntertechnoBinding$1.open(CULIntertechnoBinding.java:64)[191:org.openhab.binding.intertechno:1.9.0.201608130112]
at org.openhab.io.transport.cul.CULLifecycleManager.open(CULLifecycleManager.java:91)[193:org.openhab.io.transport.cul:1.9.0.201608130112]
at org.openhab.io.transport.cul.CULLifecycleManager.config(CULLifecycleManager.java:74)[193:org.openhab.io.transport.cul:1.9.0.201608130112]
at org.openhab.binding.intertechno.internal.CULIntertechnoBinding.updated(CULIntertechnoBinding.java:147)[191:org.openhab.binding.intertechno:1.9.0.20160813011$
at org.apache.felix.cm.impl.helper.ManagedServiceTracker.updated(ManagedServiceTracker.java:189)[7:org.apache.felix.configadmin:1.8.8]
at org.apache.felix.cm.impl.helper.ManagedServiceTracker.updateService(ManagedServiceTracker.java:152)[7:org.apache.felix.configadmin:1.8.8]
at org.apache.felix.cm.impl.helper.ManagedServiceTracker.provideConfiguration(ManagedServiceTracker.java:85)[7:org.apache.felix.configadmin:1.8.8]
at org.apache.felix.cm.impl.ConfigurationManager$ManagedServiceUpdate.provide(ConfigurationManager.java:1444)[7:org.apache.felix.configadmin:1.8.8]
at org.apache.felix.cm.impl.ConfigurationManager$ManagedServiceUpdate.run(ConfigurationManager.java:1400)[7:org.apache.felix.configadmin:1.8.8]
at org.apache.felix.cm.impl.UpdateThread.run0(UpdateThread.java:143)[7:org.apache.felix.configadmin:1.8.8]
at org.apache.felix.cm.impl.UpdateThread.run(UpdateThread.java:110)[7:org.apache.felix.configadmin:1.8.8]
at java.lang.Thread.run(Thread.java:745)[:1.8.0_101]

“Can’t open CUL”??
“org.openhab.io.transport.cul.CULDeviceException: gnu.io.UnsupportedCommOperationException: Invalid Parameter” never seen those errors before!

Searching for the reported error “Can’t open CUL” I found it in the code of the CULLifeCycleManager. This error should the thrown if “cul = culManager.getOpenCULHandler(config)” raises an error.
Why can’t my OpenHAB open a CULHandler?

Still no solution found.
The chmod of the device-file didn’t help either,
Does anybody have a hint?

Hi there, I#ve focused same isssue.
Can´t get my CUL to run, too.
My focus is mainly on FS20 device for 1st experiments with openhab.

From Log point of view it looks like this:

2016-08-22 17:04:32.982 [ERROR] [ntime.internal.engine.RuleEngineImpl] - Error during the execution of startup rule ‘Update max and min temperatures’: cannot invoke method public abstract org.eclipse.smarthome.core.types.State org.eclipse.smarthome.core.persistence.HistoricItem.getState() on null
2016-08-22 17:04:33.339 [ERROR] [org.apache.felix.configadmin ] - [org.osgi.service.event.EventHandler, org.osgi.service.cm.ManagedService, id=293, bundle=193/mvn:org.openhab.binding/org.openhab.binding.intertechno/1.9.0-SNAPSHOT]: Updating property device of configuration org.openhab.culintertechno caused a problem: Invalid device name ‘/dev/ttyACM0’. Must be 'DEVICETYPE:ADDRESS’
org.osgi.service.cm.ConfigurationException: device : Invalid device name ‘/dev/ttyACM0’. Must be ‘DEVICETYPE:ADDRESS’

As far as I could establish in many many pages it seems that now there is a BUG?
So CUL can´t be opened correctly.
Even not so expirienced with open hab I will try to setup even possibly a dev IDE
to go even more into deep…
But at the moment also from my side I can´t see any other solutions.
Hope this get fixed soon

I don’t believe it is a bug, since it was working in my old setup. In my case I must be missing a setting.

Ok I see, I guess you’re right, I ll try the next days to setup my raspberri pi 2 with the just now updated culfw sw 1.66 version again.
If It runs properly I let you know.

Just to give a possible hint I’ve noticed that some files in my openhab conf are missing.This was allready suspicious in the very beginig as default_config for open hab was missing and I have simply paste it from my dev setup in eclipse on macos.
However I will definitely do no an installation from scratch…
Based on this documentation

https://openhabdoc.readthedocs.io/de/latest/Raspberry/

and not use anymore the apt-get install method as I could find several discussion were partly similar issues were reported.
Would be nice if you give some feedback how you installed your setup maybe this is the right direction

Funny, I’m in the mood to make a new installation using apt-get.
However neither the manual nor the apt-get installation will solve my problem with the CUL-stick, at least I think so
The new installation will have to wait, because I did spend to much time on OH in last weeks ( I got some negative comments😈).

Made another complete new installation today (25. Aug) using the Online-Snapshot.
Added only the Intertechno-Binding.
Log looks like that:

21:21:04.666 [DEBUG] [org.openhab.binding.intertechno ] - BundleEvent STARTI NG - org.openhab.binding.intertechno
21:21:04.676 [DEBUG] [hno.internal.CULIntertechnoActivator] - CULIntertechno bin ding has been started.
21:21:04.681 [DEBUG] [org.openhab.binding.intertechno ] - BundleEvent STARTE D - org.openhab.binding.intertechno
21:21:04.768 [DEBUG] [org.openhab.binding.intertechno ] - ServiceEvent REGIS TERED - {org.openhab.model.item.binding.BindingConfigReader, org.openhab.binding .intertechno.CULIntertechnoBindingProvider}={component.name=org.openhab.binding. intertechno.genericbindingprovider, component.id=164, service.id=288, service.bu ndleid=187, service.scope=bundle} - org.openhab.binding.intertechno
21:21:04.790 [DEBUG] [org.openhab.binding.intertechno ] - ServiceEvent REGIS TERED - {org.osgi.service.event.EventHandler, org.osgi.service.cm.ManagedService }={event.topics=openhab/command/*, service.pid=org.openhab.culintertechno, compo nent.name=org.openhab.binding.intertechno.binding, component.id=163, service.id= 290, service.bundleid=187, service.scope=bundle} - org.openhab.binding.intertech no
21:22:41.662 [INFO ] [smarthome.event.ItemCommandEvent ] - Item ‘REV_A’ received command ON
21:22:41.691 [INFO ] [marthome.event.ItemStateChangedEvent] - REV_A changed from NULL to ON

So the “Can’t open CUL” is gone, however the connected switch is not triggered.

Openhab is running on user “openhab”, which is in the DIALOUT group. Using Screen I’m able the trigger the switch as expected.

What could be the cause?

My mistake, I forgot the .cfg-file. With it the “Can’t open CUL” error is back.

I found the reason!
Although I had made the user “openhab” member of the dialout group it didn’t work.
Changing the user that runs OpenHab to root did the difference!

But why is that?

Hi,

I seem to be having a similar issue. I can sudo into the openhab user and successfully screen to the CUL. However openhab2 complains about

Invalid device name ‘/dev/ttyACM0’. Must be ‘DEVICETYPE:ADDRESS’

openhab is in dialout group. I have not tested switching the openhab user to root. How do I so this with ubuntu and an apt-get install? How to debug this?

Regards,
JP

What version do you have? Beta or ni nigthly?
I was using root but that should be resolved, so with actual nigthly versions user openhab can use the CUL stick.
The best move for me was to change to Openhabian! Actually I’m on build #677

For debugging use this in the karaf console
log:set DEBUG org.openhab.io.transport

Btw: I had "Can’t open CUL"as error, so yours is different!

hi, and sorry for the google supersession :slight_smile:
I have the same problem. how do I have to understand this, switch to root?

Your are normally running OH as a specific user. Changing the user to "root did solve the problem.

However using an openhabian installation there is no need to switch the user that runs OH anymore.