"Can't open CUL" on Synology Diskstation

Hi everyone,

I have recently started the project of moving from fhem on a raspberry Pi to OpenHAB on my Synology Diskstation. Initial tests with an HTTP bind and switch worked fine so I moved on to integrate my intertechno compatible switches that I switch using a 433Mhz CUL stick.

Thanks to http://www.jadahl.com/ I was able to easily install the necessary drivers and after some trying I am now able to manually switch my switches from the command line. However, I have not been able to get openHAB to recognise my nanoCUL.

I read through what must have been dozens of threads and websites (mostly seeming outdated) and tried the following without any success so far:

  • chmod 666 /dev/ttyUSB0
  • add the following to openHAB/runtime/bin/setenv
EXTRA_JAVA_OPTS="
  -DlibNRJavaSerial.userlib=/volume1/@appstore/openHAB/userdata/tmp/libNRJavaSerial_openhab_0/libNRJavaSerial.so
  -Dgnu.io.rxtx.SerialPorts=/dev/ttyUSB0"
  • start openHAB from command line as root
  • add user openHAB to the http (and admin) group on the Diskstation

I can only guess that this is a permission or Java issue. However I’m not very experienced with Linux and as such am not sure what else to try. I have attached the openHAB.log below in case anyone around here has the patience to help me out. Any tips would be greatly appreciated.

Thanks in advance
Benjamin

  • Platform information:
    • Hardware: DS218play (Realtek RTD1296 SoC/1GB)
    • OS: DSM 6.2-23739 Update 2
    • Java Runtime Environment: openjdk version “1.8.0_161” OpenJDK Runtime Environment (IcedTea 3.7.0) (linux-gnu build 1.8.0_161-b12) OpenJDK 64-Bit Server VM (build 25.161-b12, mixed mode)
    • openHAB version: 2.3.0.005
  • Issue of the topic: please be detailed explaining your issue
  • If logs where generated please post these here using code fences:
23:54:06.176 [DEBUG] [org.openhab.binding.intertechno      ] - BundleEvent STARTING - org.openhab.binding.intertechno
23:54:06.180 [DEBUG] [chno.internal.CULIntertechnoActivator] - CULIntertechno binding has been started.
23:54:06.182 [DEBUG] [org.openhab.binding.intertechno      ] - BundleEvent STARTED - org.openhab.binding.intertechno
23:54:06.230 [DEBUG] [org.openhab.io.transport.cul         ] - BundleEvent [unknown:512] - org.openhab.io.transport.cul
23:54:06.234 [DEBUG] [org.openhab.io.transport.cul         ] - BundleEvent STARTING - org.openhab.io.transport.cul
23:54:06.257 [DEBUG] [openhab.io.transport.cul.CULActivator] - CUL transport has been started.
23:54:06.296 [DEBUG] [.io.transport.cul.internal.CULManager] - Registering class org.openhab.io.transport.cul.internal.serial.CULSerialHandlerImpl for device type serial
23:54:06.302 [DEBUG] [.io.transport.cul.internal.CULManager] - Registering class org.openhab.io.transport.cul.internal.network.CULNetworkHandlerImpl for device type network
23:54:06.305 [DEBUG] [org.openhab.io.transport.cul         ] - BundleEvent STARTED - org.openhab.io.transport.cul
23:54:06.329 [WARN ] [.io.transport.cul.CULLifecycleManager] - CUL config is NULL, doing nothing
23:54:06.333 [DEBUG] [org.openhab.binding.intertechno      ] - ServiceEvent REGISTERED - {org.osgi.service.event.EventHandler, org.osgi.service.cm.ManagedService}={service.id=325, service.bundleid=212, service.scope=bundle, event.topics=openhab/command/*, service.pid=org.openhab.culintertechno, component.name=org.openhab.binding.intertechno.binding, component.id=202} - org.openhab.binding.intertechno
23:54:06.334 [TRACE] [.io.transport.cul.internal.CULManager] - Requesting deviceTypeFactory for type 'serial'
23:54:06.338 [TRACE] [.io.transport.cul.internal.CULManager] - 2 factories registered
23:54:06.338 [DEBUG] [org.openhab.binding.intertechno      ] - ServiceEvent REGISTERED - {org.openhab.model.item.binding.BindingConfigReader, org.openhab.binding.intertechno.CULIntertechnoBindingProvider}={service.id=324, service.bundleid=212, service.scope=bundle, component.name=org.openhab.binding.intertechno.genericbindingprovider, component.id=203} - org.openhab.binding.intertechno
23:54:06.341 [INFO ] [nternal.serial.CULSerialConfigFactory] - Update config, baudrate = 38400
23:54:06.345 [INFO ] [nternal.serial.CULSerialConfigFactory] - Update config, parity = NONE (0)
23:54:06.347 [TRACE] [techno.internal.CULIntertechnoBinding] - commandON = 00101000101100111111110010010000
23:54:06.349 [TRACE] [techno.internal.CULIntertechnoBinding] - commandOFF = 00101000101100111111110010000000
23:54:06.369 [DEBUG] [.io.transport.cul.internal.CULManager] - Trying to open device serial:/dev/ttyUSB0 in mode SLOW_RF23:54:06.370 [DEBUG] [.io.transport.cul.internal.CULManager] - Searching class for device type serial
23:54:06.428 [DEBUG] [.internal.serial.CULSerialHandlerImpl] - Opening serial CUL connection for /dev/ttyUSB0
23:54:06.557 [WARN ] [.io.transport.cul.CULLifecycleManager] - Can't open CUL
org.openhab.io.transport.cul.CULDeviceException: gnu.io.NoSuchPortException
        at org.openhab.io.transport.cul.internal.serial.CULSerialHandlerImpl.openHardware(CULSerialHandlerImpl.java:111) [213:org.openhab.io.transport.cul:1.12.0]
        at org.openhab.io.transport.cul.internal.AbstractCULHandler.open(AbstractCULHandler.java:163) [213:org.openhab.io.transport.cul:1.12.0]
        at org.openhab.io.transport.cul.internal.CULManager.createNewHandler(CULManager.java:150) [213:org.openhab.io.transport.cul:1.12.0]
        at org.openhab.io.transport.cul.internal.CULManager.getOpenCULHandler(CULManager.java:85) [213:org.openhab.io.transport.cul:1.12.0]
        at org.openhab.io.transport.cul.CULLifecycleManager.open(CULLifecycleManager.java:86) [213:org.openhab.io.transport.cul:1.12.0]
        at org.openhab.io.transport.cul.CULLifecycleManager.config(CULLifecycleManager.java:74) [213:org.openhab.io.transport.cul:1.12.0]
        at org.openhab.binding.intertechno.internal.CULIntertechnoBinding.updated(CULIntertechnoBinding.java:147) [212:org.openhab.binding.intertechno:1.12.0]
        at org.apache.felix.cm.impl.helper.ManagedServiceTracker.updated(ManagedServiceTracker.java:189) [8:org.apache.felix.configadmin:1.8.16]
        at org.apache.felix.cm.impl.helper.ManagedServiceTracker.updateService(ManagedServiceTracker.java:152) [8:org.apache.felix.configadmin:1.8.16]
        at org.apache.felix.cm.impl.helper.ManagedServiceTracker.provideConfiguration(ManagedServiceTracker.java:85) [8:org.apache.felix.configadmin:1.8.16]
        at org.apache.felix.cm.impl.ConfigurationManager$ManagedServiceUpdate.provide(ConfigurationManager.java:1479) [8:org.apache.felix.configadmin:1.8.16]
        at org.apache.felix.cm.impl.ConfigurationManager$ManagedServiceUpdate.run(ConfigurationManager.java:1435) [8:org.apache.felix.configadmin:1.8.16]
        at org.apache.felix.cm.impl.UpdateThread.run0(UpdateThread.java:141) [8:org.apache.felix.configadmin:1.8.16]
        at org.apache.felix.cm.impl.UpdateThread.run(UpdateThread.java:109) [8:org.apache.felix.configadmin:1.8.16]
        at java.lang.Thread.run(Thread.java:748) [?:?]
Caused by: gnu.io.NoSuchPortException
        at gnu.io.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:273) ~[?:?]
        at org.openhab.io.transport.cul.internal.serial.CULSerialHandlerImpl.openHardware(CULSerialHandlerImpl.java:87) ~[?:?]
        ... 14 more
23:54:06.609 [ERROR] [org.apache.felix.configadmin         ] - [org.osgi.service.event.EventHandler, org.osgi.service.cm.ManagedService, id=325, bundle=212/mvn:org.openhab.binding/org.openhab.binding.intertechno/1.12.0]: Unexpected problem updating configuration org.openhab.culintertechno
java.lang.NullPointerException: null
        at org.openhab.binding.intertechno.internal.CULIntertechnoBinding$1.open(CULIntertechnoBinding.java:67) [212:org.openhab.binding.intertechno:1.12.0]
        at org.openhab.io.transport.cul.CULLifecycleManager.open(CULLifecycleManager.java:92) [213:org.openhab.io.transport.cul:1.12.0]
        at org.openhab.io.transport.cul.CULLifecycleManager.config(CULLifecycleManager.java:74) [213:org.openhab.io.transport.cul:1.12.0]
        at org.openhab.binding.intertechno.internal.CULIntertechnoBinding.updated(CULIntertechnoBinding.java:147) [212:org.openhab.binding.intertechno:1.12.0]
        at org.apache.felix.cm.impl.helper.ManagedServiceTracker.updated(ManagedServiceTracker.java:189) [8:org.apache.felix.configadmin:1.8.16]
        at org.apache.felix.cm.impl.helper.ManagedServiceTracker.updateService(ManagedServiceTracker.java:152) [8:org.apache.felix.configadmin:1.8.16]
        at org.apache.felix.cm.impl.helper.ManagedServiceTracker.provideConfiguration(ManagedServiceTracker.java:85) [8:org.apache.felix.configadmin:1.8.16]
        at org.apache.felix.cm.impl.ConfigurationManager$ManagedServiceUpdate.provide(ConfigurationManager.java:1479) [8:org.apache.felix.configadmin:1.8.16]
        at org.apache.felix.cm.impl.ConfigurationManager$ManagedServiceUpdate.run(ConfigurationManager.java:1435) [8:org.apache.felix.configadmin:1.8.16]
        at org.apache.felix.cm.impl.UpdateThread.run0(UpdateThread.java:141) [8:org.apache.felix.configadmin:1.8.16]
        at org.apache.felix.cm.impl.UpdateThread.run(UpdateThread.java:109) [8:org.apache.felix.configadmin:1.8.16]
        at java.lang.Thread.run(Thread.java:748) [?:?]

If I remember correctly the group “dialout” was needed.

Hi Jürgen, thanks for your reply.

The Synology Diskstation doesn’t seem to have a group “dialout”. Of course I could set it up in the web gui - but in my understanding that wouldn’t do any good since it’s not integrated in the system permission structure.

How would I proceed after setting the group up and adding “openHAB” to the group? What other steps are necessary?

Thanks and regards
Benjamin

I’m sorry, but that question is beyond my Linux knowledge.
I always used a CUL on a raspberry using an openhabian image. Using that image solved all problems concerning the “Can’t open CUL error”.