I’ve got two Raspberry Pi’s - one with a Z-Wave stick and ser2net and the other with socat and OpenHAB (and a Z-Wave stick of it’s own.
I can get the remote Z-Wave on the remote Pi working and running solidly. However if the connection gets broken, I have to fiddle around and poke various parts of the system before it will reconnect otherwise it just reports as “Offline”. This can take ages and I have yet to discover what I do to fix the link. It’s really annoying!
So far as I’m aware the ser2net/socat link is OK as socat happily sits running. Restarting OH or just the ZWave bundle doesn’t help - until it does!
Any ideas what could be going on?
Permissions on the tty are:
lrwxrwxrwx 1 root root 10 Jun 7 13:47 /dev/ttyACM9 -> /dev/pts/2
crwxrwxrwx 1 openhab dialout 136, 2 Jun 7 2018 /dev/pts/2
Socat is running as:
/usr/bin/socat -d -d -d -lf /var/log/socat.log pty,link=/dev/ttyACM9,raw,user=openhab,group=dialout,mode=777 tcp:
:raw:0:/dev/ttyACM0:115200 8DATABITS NONE 1STOPBIT
Thanks for your help
Hmm as far as i remember there is a thread about ser2net and based on that description it works very reliable on my system with blue giga adapters. The startup ist implemented as a daemon with reconnect. You should search the forum
Another option is maybe to use usb2ip on server side i brought it to work, but on the client side i never made it
Thanks yes, I’m aware of posts explaining others setups but I still have problems. So far as I’m aware I’ve tried everything I could find - this has been a problem for quite a while. It won’t work then suddenly springs into life.
I’ll give usb2ip a go. I’m not convinced the link itself is a problem as socat stays running, but I’m out of ideas!
@Dibbler42 - usb2ip has made everything spring into life thanks. Fingers crossed it stays that way
I’m off to edit my startup configs now!
Wow, on which platform does your openhab is running? i never fugured out how to establish the link at the openhab side on a Raspberry Pi 3
Raspberry Pi on both ends of the link.
I used these instructions:
usbip list -r
usbip attach -r -b
However “usbip port” doesn’t work but the link does, happily.
When you set up the remote end, it’s worth doing a netstat to check the code is listening to the port as I did have a situation once where the code seemed to be working but it wasn’t listening.
i tried that a hundered time, but no sucess.
You are using Stretch?
I thought I was up-to-date but it appears to be Jessie on the Openhab end. Stretch on the remote end
Is it reporting anything?
i tried it again and get an error while binding
libusbip: error: udev_device_new_from_subsystem_sysname failed
and it is stretch on the openhab end
Hmm - there are some suggestions that it might have something to do with vhci-hcd. I think I’ll avoid that upgrade for a while
you better do i tested it now.
Raspbian Stretch: Server - Yes; Client - No
Raspbian Jessie: server - Yes; Client - Yes, but Errors while detaching and port commands