Share Z-wave dongle over IP (USB over IP using ser2net / socat ) guide

Just some other tips:
My configuration only worked when i added echo=0 to the configuration.

So from

pty,link=/dev/ttyUSB0,raw,user=openhab,group=dialout,mode=777 tcp:172.16.11.5:3333

to

pty,link=/dev/ttyUSB0,raw,echo=0,user=openhab,group=dialout,mode=777 cp:172.16.11.5:3333

Also with the newer versions of ser2net, you can make multiple connections to one serial port by adding max-connections=N to the configuration. For the dutchies this might be handy when using a DSMR data logger and a seperate OpenHAB instance.

Just for reference, my ser2net line is

3333:raw:0:/dev/ttyUSB-P1:115200 8DATABITS NONE 1STOPBIT max-connections=3

Ser2net is downloadable from https://sourceforge.net/projects/ser2net/

I’d like to now this is strictly a limitation of socat and is completely outside of OH itself. OH has no problem working with multiple USB devices.

Not with multiple usb z wave sticks it doesnt. At least not on my setup ysing 2 x aeotec gen 5 sticks

It is supposed to. You create two zwave controller Things each connected to a different /dev/tty.

What specific problem are you experiencing?

If the problem is getting a device to appear as a /dev/tty remotely using socat/ser2net, then the problem is outside of OH.

I tested it with two socats as described in the other tutorial and it worked fine

Hi Rich

See my post here:

I couldnt get 2 x ZWave sticks working. One connected via socat works just fine, when I connect a local controller it wouldnt discover it. When I added it manually I had all sorts of issues as described in the thread.

All the problems read like they are a problem with the controller, not the fact that it happens to be the second controller. Do you see the same errors when adding that controller by itself?

One controller works fine, either via socat or via the USB port.

Its the second controller because when its inserted/removed those errors come up and also the second controller fails to display a new item in the inbox after a successful pair.

This must be specific to your setup, but is not true for OH. I am even using 3 x Aeotec Gen5 Sticks parallel in my production environment for more than 1,5 years without any problems.

Id love to be able to fix it but I didnt get any guidance. What version of the Zwave binding

At the moment I am running OH Snapshot 2.4 1407 with Z-Wave Binding 2.4.0.20181031 but it worked ever since May 2017 for me with the Z-Wave dev version (which became part of the Snapshots later, I think shortly after 2.3 release?). Which one do you use?

I use this version

2.4.0-SNAPSHOT Build #1341

251 │ Active   │  80 │ 2.4.0.201809081506     │ ZWave Binding

This might be one day too old… :frowning:
Chris merged to dev version on September 9th in the 2.4 master branch…

1 Like

Oh. How do I obtain that newer version?

Just install a more recent snapshot.
However, the switch to the recent Z-Wave version requires to delete and rediscover all Z-Wave things (leave them included, but delete just the things in OH). More Details in this thread:

Hm… id best confirm that i am absolutely on the old version before I start breaking things haha!

The link doesnt actually say where you download the binding? The link that says latest version of the dev binding (here) is the one Im using it.

Actually it is not as dangerous as it might sound. Of course it depends on the number of Z-Wave devices you have but I managed to do it with > 100 devices 1,5 years ago. After rediscovery with the new binding your items und rules should work again as before (at least if you have them maintained in item files what I do)

Yes, they are in Items files. Ive only about 15 devices.

Cant work out where to download this binding…

So did you already use the dev binding all the time?

Ive always been on the binding I posted above, never changed it. And if you say this works since 2017, then my binding should work just fine given this is Sept 2018.