Jeelink and nanoCUL Intertechno at the same time. Newbee

Hello all together I am straight at the change of Fhem to OpenHAB2.

So now to my problem, I have a self-made Jeeling and a nanoCUL 433Mhz Intertechno.

With the nanoCUL I was able to switch my Intertechno IT-1500 sockets under Fhem and receive the temperature and humidity of my Lacrosse units with the Jeelink.

Have the Jeeling binding installed and configured as ttyUSB0, which runs under Openhabian (OpenHAB 2)

The binding for my CUL Intertechno I have also installed and configured but i can’t switch anything under openHAB 2

So items are created correctly, sitemaps too. The intertechno config I have also set in my log is can’t open CUL. It is as if the two sticks bite, so think the CUL is not ready since the Jeelink uses the serial interface. These two sticks have operated parallel under Fhem. Since I could however also the CUL directly over the FTDI serial number adjust thus / dev / serial / by-id / and since the serial number.

Can you please help me am really despairing.

My system is a Raspberry 3 with openhabian and the Jeelink Stick and CUL Stick. A Hue bridge is also configured and runs over openHAB 2.

I should notice that I am Linux newbee. Fhem I had only run about the instructions from the web.

Sorry for my bad english i’m from germany

Based on my( limited ) experience with linux, both sticks should be using a different serial port (only one at /dev/ttyS0. The config file of the Intertechno binding and the thing configuration for Jelink should reflect that.
I’m using a CUL only on my Raspi running Openhabian Besides the config thee was nothing else the set.

Hello

You have two serial devices so you have two serial interfaces.

The Jeelink should not have a effect to the CUL

Do you have set the cul device path in the culintertechno.cfg file ?

What do you see when you type: lsusb ?

What do you see when you type: dmesg | grep tty ?

If the jeelink is /dev/ttyUSB0 then the CUL could be /dev/ttyUSB1 …

But do be sure run lsusb and dmesg | grep … here you will see all the ports …

Hallo

Jeelink und CUL sind beides serielle Schnittstellen mit ihren eigenen seriellen Ports.

Jeelink sollte dem CUL demnach nicht in die Quere kommen.

Hast du den device Pfad in der culintertechno.cfg datei angepasst ?

Versuch mal über die Console lsusb und dmesg | grep tty auszuführen da werden dir dann alle beim ersten alle USB Geräte und beim zweiten alle Ports aufgelistet so solltest du den richtigen Port für den CUL finden.

Da Jeelink auf /dev/ttyUSB0 funktioniert könnte der CUL /dev/ttyUSB1 haben das ist aber nicht 100% sicher …

hallo thank for the answers i write the commands in the console
lsusb :
Bus 001 Device 005: ID 1a86:7523 QinHeng Electronics HL-340 USB-Serial adapter
Bus 001 Device 004: ID 0403:6001 Future Technology Devices International, Ltd FT 232 USB-Serial (UART) IC
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. SMSC9512/9514 Fast Ethernet Adapter
Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

dmesg | grep tty:
[ 0.000000] Kernel command line: 8250.nr_uarts=0 bcm2708_fb.fbwidth=656 bcm2708_fb.fbheight=416 bcm2708_fb.fbdepth=16 bcm2708_fb.fbswap=1 vc_mem.mem_base=0x3ea00000 vc_mem.mem_size=0x3f000000 dwc_otg.lpm_enable=0 console=ttyS0,115200 console=tty1 root=PARTUUID=c78ac60c-02 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait
[ 0.001246] console [tty1] enabled
[ 0.829625] 3f201000.serial: ttyAMA0 at MMIO 0x3f201000 (irq = 87, base_baud = 0) is a PL011 rev2
[ 3.884363] usb 1-1.5: ch341-uart converter now attached to ttyUSB0
[ 3.885244] usb 1-1.2: FTDI USB Serial Device converter now attached to ttyUSB1

that was show on the screen.

Jeelink is ttyUSB0 and nano CUL is ttyUSB1 is that right?
thats now in the log:
2017-09-27 17:08:26.053 [ERROR] [org.apache.felix.configadmin ] - [org.osgi.service.event.EventHandler, org.osgi.service.cm.ManagedService, id=305, bundle=194/mvn:org.openhab.binding/org.openhab.binding.intertechno/1.10.0]: Unexpected problem updating configuration org.openhab.culintertechno

java.lang.NullPointerException

at org.openhab.binding.intertechno.internal.CULIntertechnoBinding$1.open(CULIntertechnoBinding.java:64)[194:org.openhab.binding.intertechno:1.10.0]

at org.openhab.io.transport.cul.CULLifecycleManager.open(CULLifecycleManager.java:92)[196:org.openhab.io.transport.cul:1.10.0]

at org.openhab.io.transport.cul.CULLifecycleManager.config(CULLifecycleManager.java:74)[196:org.openhab.io.transport.cul:1.10.0]

at org.openhab.binding.intertechno.internal.CULIntertechnoBinding.updated(CULIntertechnoBinding.java:147)[194:org.openhab.binding.intertechno:1.10.0]

at org.apache.felix.cm.impl.helper.ManagedServiceTracker.updated(ManagedServiceTracker.java:189)[3:org.apache.felix.configadmin:1.8.12]

at org.apache.felix.cm.impl.helper.ManagedServiceTracker.updateService(ManagedServiceTracker.java:152)[3:org.apache.felix.configadmin:1.8.12]

at org.apache.felix.cm.impl.helper.ManagedServiceTracker.provideConfiguration(ManagedServiceTracker.java:85)[3:org.apache.felix.configadmin:1.8.12]

at org.apache.felix.cm.impl.ConfigurationManager$UpdateConfiguration.run(ConfigurationManager.java:1772)[3:org.apache.felix.configadmin:1.8.12]

at org.apache.felix.cm.impl.UpdateThread.run0(UpdateThread.java:141)[3:org.apache.felix.configadmin:1.8.12]

at org.apache.felix.cm.impl.UpdateThread.run(UpdateThread.java:109)[3:org.apache.felix.configadmin:1.8.12]

at java.lang.Thread.run(Thread.java:745)[:1.8.0_121]

Pleas show your culintertechno.cfg

oh sorry forget

thats my cfg

############################# Intertechno Binding ###################################

Devicename to use (mandatory)

Example /dev/ttyACM0

culintertechno:device=serial:/dev/ttyUSB1
culintertechno:baudrate=34800
culintertechno:parity=none
culintertechno:data=8

How often should the command be repeated? (optional)

See http://culfw.de/commandref.html for details

repetitions=6

How long should one pulse be? (optional)

See http://culfw.de/commandref.html for details

wavelength=420

For posting prefornated text please use the Button “</>”.

You are using the entries from the OH1 .cfg file, which had the entries for all bindings. In OH2 you have a single for all bindings. That way the starting “bindingname:” can be ommited.
In your case remove the “culintertechno.” in each used line.

changed to
</>
device=serial:dev/ttyUSB1
baudrate=38400
parity=none
data=8
</>

thats what you mean?
but the same problem in the Logfile

</> 2017-09-27 19:23:22.323 [ERROR] [org.apache.felix.configadmin ] - [org.osgi.service.event.EventHandler, org.osgi.service.cm.ManagedService, id=305, bundle=194/mvn:org.openhab.binding/org.openhab.binding.intertechno/1.10.0]: Unexpected problem updating configuration org.openhab.culintertechno </>

Sorry in this case I have no clue.

on the “preformated text”, I was talking about the BUTTON which labeled “</>” . You have it in the top line of the window where you put in the text.

oh ok thx
i don’t understand why it dosen’t work. Thats strange but my problem is that i don’t understand many of commands by linux.

hope that anybody has ideas.

sorry for my english

Hi

I have no intertecno devices so i cant say realy much about the binding it self but if we cant get ist to work
you also can trigger the devices directly so you dont realy need a binding (it make it easy but its not a a must have)

I have some devices with a unkown protocol and trigger it through the cul in raw mode :slight_smile:

But lets get the binding to work:

The intresting point is:
Unexpected problem updating configuration org.openhab.culintertechno

So the binding cant read the culintertechno.cfg file !

Do you have made your changes in the file with a windows client ?

I had also sometimes problems with script and rule files edited in a windows client …

I have discoverd that the texteditor or wordpad somtimes reformat the text in the background when i saved the file.

As example i write:
stty -F /dev/ttyUSB0
echo “G0030af13403b1610097ee8” > /dev/ttyUSB0

And wordpad or texteditor will save it as:
stty -F /dev/ttyUSB0/p
echo “G0030af13403b1610097ee8” > /dev/ttyUSB0/p

The /p is a linebreak so the formating ist ok …

BUT when the system reads the file it will read the command stty -F /dev/ttyUSB0/p and get a error because with the /p its wrong.

  1. Deinstall the intertechno binding and be sure the culintertechno.cfg is deleted.

  2. Reinstall the binding to get a new untouched culintertechno.cfg file.

  3. Go to the commandline and edit the culintertechno.cfg this way.

# Get to the directory of the culintertechno.cfg file
cd /etc/openhab2/services

# Type ls to see the files in the directory to get sure you are in the right one.
ls 

#Open the culintertechno.cfg file with the nano editor.
#You can navigate trough the text (the cursor) with the arrow keys.
#When you done press strg+x
#Save changes dialog press y and return
#Filename dialog press return to save the file with the same filename
nano culintertechno.cfg

#To get sure everything is loaded reboot the server
sudo reboot

I am not 100% sure but i think the content of the file should be:

device=serial:dev/ttyUSB1
baudrate=38400
parity=none
data=8
repetitions=6
wavelength=420
  1. Try it and watch your log if there is a new error …

Also sorry for my bad english :wink:

indent preformatted text by 4 spaces

i installed openhabian on raspberry new
and just installed the intertechnocul binding
and configured it with nano
thats now my logfile

any new idea now ???

2017-09-28 18:34:33.197 [WARN ] [internal.serial.CULSerialHandlerImpl] - Can’t write to serial device serial:/dev/ttyUSB0

java.io.IOException: Stream closed

at java.io.BufferedWriter.ensureOpen(BufferedWriter.java:116)[:1.8.0_121]

at java.io.BufferedWriter.write(BufferedWriter.java:221)[:1.8.0_121]

at java.io.Writer.write(Writer.java:157)[:1.8.0_121]

at org.openhab.io.transport.cul.internal.serial.CULSerialHandlerImpl.write(CULSerialHandlerImpl.java:161)[185:org.openhab.io.transport.cul:1.10.0]

at org.openhab.io.transport.cul.internal.AbstractCULHandler.writeMessage(AbstractCULHandler.java:265)[185:org.openhab.io.transport.cul:1.10.0]

at org.openhab.io.transport.cul.internal.AbstractCULHandler.access$0(AbstractCULHandler.java:264)[185:org.openhab.io.transport.cul:1.10.0]

at org.openhab.io.transport.cul.internal.AbstractCULHandler$SendThread.run(AbstractCULHandler.java:55)[185:org.openhab.io.transport.cul:1.10.0]

That sounds different now. Did you switch the devices? The CUL was ttyUSB1 before!

    indent preformatted text by 4 spaces

just installed openhabian new, now i installed jeelink binding and the cul switched to ttyUSB1

the Log
2017-09-28 19:16:50.722 [WARN ] [internal.serial.CULSerialHandlerImpl] - Can’t write to serial device serial:/dev/ttyUSB1

java.io.IOException: Stream closed

at java.io.BufferedWriter.ensureOpen(BufferedWriter.java:116)[:1.8.0_121]

at java.io.BufferedWriter.write(BufferedWriter.java:221)[:1.8.0_121]

at java.io.Writer.write(Writer.java:157)[:1.8.0_121]

at org.openhab.io.transport.cul.internal.serial.CULSerialHandlerImpl.write(CULSerialHandlerImpl.java:161)[185:org.openhab.io.transport.cul:1.10.0]

at org.openhab.io.transport.cul.internal.AbstractCULHandler.writeMessage(AbstractCULHandler.java:265)[185:org.openhab.io.transport.cul:1.10.0]

at org.openhab.io.transport.cul.internal.AbstractCULHandler.access$0(AbstractCULHandler.java:264)[185:org.openhab.io.transport.cul:1.10.0]

at org.openhab.io.transport.cul.internal.AbstractCULHandler$SendThread.run(AbstractCULHandler.java:55)[185:org.openhab.io.transport.cul:1.10.0]

but that is new Can’t write to serial device serial:/dev/ttyUSB1

not error just warning but it still dosen’t work

Hi

Sounds better …

The Binding can read the config file now and shold work … but it cant open the serial port.

I am on a long weekend and have no openhabserver to test but i searched a little bit …

There is no sample for the .cfg file so …

Maybe try with the nano editor like before:

culintertechno:device=serial:/dev/ttyUSB0
culintertechno:baudrate=38400
culintertechno:parity=none
culintertechno:data=8

Have found it here:
https://community.openhab.org/t/intertechno-binding/4812/15

In the description of the intertechno binding you can find the following:
When using a serial port, you may need to add -Dgnu.io.rxtx.SerialPorts=/dev/ttyACM0 in your server startup.

This should open the serial port on server start but i cant recall/remeber the steps without try it on my openhab.

If you cant get it to work i will test it on monday.

But we can test the binding by open the port by hand :slight_smile:

Its not a real solution because on a reboot the port will be closed again but for now it should work.

Get to the commandline und type:

# Setup the Port
stty -F /dev/ttyUSB1 38400 raw -echo

# Open the Port / Connection with a cat terminal in background
cat /dev/ttyUSB1 &

Now try it again … the port is open so the binding should work (if you dont get in other problems).

thx for the help but it still dosen’t work same log file entry.

for the startup i found it in sudo nano /etc/default/openhab2

and then write EXTRA_JAVA_OPTS="-Dgnu.io.rxtx.SerialPorts=/dev/ttyElero:/dev/ttyJeelink:/dev/ttyS0:/dev/ttyAMA0:/dev/ttyUSB0:/dev/ttyUSB1"

thats already done from the jeelink binding.

thx i go to bed.
n8

Hi

What jeelinkbinding did you use ?

This one ?
https://github.com/openhab/openhab2-addons/tree/master/addons/binding/org.openhab.binding.jeelink

I have made a testsetup with only intertechno and it worked without any problems … when i know your jeelink binding i will test it with both …

In the intertecno cfg file i removed all and write only (nano editor):

device=serial:/dev/ttyUSB0
baudrate=38400
parity=none
data=8

Made a item:

Switch test_sw3   "Testschalter 3"   <light> (testraum1, testschalter) { culintertechno="type=fls;group=I;address=1" }

In my log:

2017-10-02 08:36:45.207 [WARN ] [io.transport.cul.CULLifecycleManager] - CUL config is NULL, doing nothing
2017-10-02 08:36:45.371 [WARN ] [io.transport.cul.CULLifecycleManager] - CUL config is NULL, doing nothing
2017-10-02 08:36:45.380 [INFO ] [ternal.serial.CULSerialConfigFactory] - Update config, baudrate = 38400
2017-10-02 08:36:45.384 [INFO ] [ternal.serial.CULSerialConfigFactory] - Update config, parity = NONE (0)
2017-10-02 08:51:24.144 [ItemCommandEvent          ] - Item 'test_sw3' received command ON
2017-10-02 08:51:24.215 [ItemStateChangedEvent     ] - test_sw3 changed from NULL to ON

The cul is sending (blinking) but i cant test if he sends the right code i have no intertecno devices to test it …

So the binding standalone is working if you provide me with a link to your jeelink binding and one of your intertecno and jeelink items config i will test it with both.

hello and thx for the help that is strange i don’t now why but it is working now. I installed Openhabien on a new microSD Card. Install the Intertechno Binding from PaperUI, configured the cfg via nano.
Then i install the Jeelink Addon from
https://openhab.jfrog.io/openhab/libs-pullrequest-local/org/openhab/binding/org.openhab.binding.jeelink/2.2.0-SNAPSHOT/org.openhab.binding.jeelink-2.2.0-SNAPSHOT.jar
the same as the last time and it work. The jeelink and Intertechno CUL work.
But at this time i don’t use this settings
EXTRA_JAVA_OPTS="-Dgnu.io.rxtx.SerialPorts=/dev/ttyElero:/dev/ttyJeelink:/dev/ttyS0:/dev/ttyAMA0:/dev/ttyUSB0:/dev/ttyUSB1"
in the /etc/default/openhab2 File
and also don’t install
feature:install openhab-transport-serial
and now is all working.
:slight_smile:
i’m happy
thx