Bridging Velbus with TCP through snap package

You should select ‘Network’, filling in the IP/port.

Is it also possible to use in openhab? Witch port should i use? I tried 8080 but its online for one second and then its give communication error.

Kind regards

The default port for the connection is 27015 you can check whether you can connect with VelbusLink.

For more configuration options, check https://github.com/velbus/velbus-tcp-snap

1 Like

Just an update.

I have revisited the `velbus-tcp’ snap and can report that after a little bit of a bump in the road, it’s now working perfectly and very fast.

I’ve set it up so that the local machine has a restricted unsecured connection for software like OpenRemote, openHAB & Home-Assistant.

With a second secured port (TLS, SSL & Authentication) for VelbusLink, Control4, Crestron, Elan, URC-Automation etc

I’m very happy with the setup on two different types of devices.

Everything I did can be reviewed here :-

Got it working - on an Odroid C4 with the following:

  1. Commands:
apt update
apt install snapd
snap install core
snap install velbus-tcp
snap connect velbus-tcp:raw-usb :raw-usb

had to install Snap Core manually

while core18 got installed automatically - core was required else the log indicated a failure in bind_network and main and snap connect velbus-tcp:raw-usb :raw-usb would not work

  1. Set the listening ports to dual (to have Auth/TLS enabled for VelbusLink software and no Auth/TLS for OpenHab)
snap set velbus-tcp \
    tcp.host=0.0.0.0,127.0.0.1 \
    tcp.port=27015,54934 \
    tcp.relay=true,true \
    tcp.ssl=true,false \
    tcp.auth=true,false \
    tcp.authkey=62fa0c49-b0ba-486a-abcd-blablablablabla,
  1. used serial\by-id\ for the bus connection - and set autodetect to false
snap set velbus-tcp serial.autodiscover=false 

I trying to get it to work with a USB->RS232 converter (to avoid sticking in a USB in the front of VMBRSUSB) as well as the regular USB

[for USB]

snap set velbus-tcp serial.port=/dev/serial/by-id/usb-Velleman_Projects_VMB1USB_Velbus_USB_interface-if00

For the Serial one - it’s writing (meaning I can send controls through OpenHab) - but the receiving part is not working. I’ve checked the serial converter in Windows (VelbusLink) directly and there it works so the wired connection is okay… not sure if its a programming thing then…

[for serial RS232]

snap set velbus-tcp serial.port=/dev/serial/by-id/usb-FTDI_US232R_FTGY89BK-if00-port0
1 Like

Hi @RCZ

Great to hear the you’ve got velbus-tcp working… Almost

It suddenly occurred to me that this might be something to do with the RS242 RTS / DTS signalling.

Unfortunately that’s way beyond me, you’ll need a wizard like @VEL448 or @VEL524 to shine some light on that.

(You know what my solution is, but it’s not exactly sanctioned)

We’ve not tested the snap for correct operation with RS-232 interfaces, @MDAR might be on to something as the DTR flag is not set;

We’ll try to get a fix out for this soon

1 Like

This wouldn’t be an issue if there was a USB port on the top edge… :man_shrugging:

I’ve been asking for years :crying_cat_face:

However, I know there are installations that only use the RS232 connection.

I’ll just continue with my little hack for now.

1 Like

hi

was there an update on this one already? can we use the RS232 now?

It’s in our backlog to implement this. We’ll also accept pull requests. :slight_smile:

1 Like

Just a quick update

I’ve created a small script to automate the installation of this Snap package.
It should also add avahi and broadcast the presence of the Velbus bus connection

www.mdar.co.uk/dl/velbus/velbus-tcp.sh

mkdir /opt/velbus-tcp
cd /opt/velbus-tcp
wget www.mdar.co.uk/dl/velbus/velbus-tcp.sh -O /opt/velbus-tcp/velbus-tcp.sh
sh velbus-tcp.sh
1 Like

did you also do the pull request and editted for serial connections?

Oh no no no

I think you’re confusing me with someone with some coding skills.

I see my pull was committed - any idea on when the snap package will be updated? the channel still shows the 1.4.1 only… (dated 2021-08-20 / 2021-08-20)

or is there another way to test this?

Correct, the snap package was not yet built due to a missing git tag, it is now available.

2 Likes

tested it … but still no receiving of commands through serial

image

happy to debug jointly if required

I think you may need to check snap logs velbus-tcp to see if any errors are listed there. Otherwise it may be easier to just use the python-velbustcp library to do further tests. Since velbus-tcp-snap is just a wrapper around the python code to build the library as a Ubuntu snap.

I rebooted my machine - and now Velbus won’t start – this probably happened after an update of the operating system -

logs indicate:
velbus-tcp.velbus-tcp[3502]: cannot perform operation: mount --bind /snap/core18/current/etc/nsswitch.conf /tmp/snap.rootfs_dVmC9V/etc/nsswitch.conf: Permission denied

Can you post this on the GitHub project issues page please.

I had a situation where I updated the Kernel in Debian Buster and the whole Snap environment failed.

There’s was absolutely nothing I could do to resolve it.

The only solution was to flash Debian Bullseye to the machine and start again.

(All back up and running within 30 minutes)

For the time being, you can use @jeroends VelServ application
This 100% works

(More information on this — How-To : Install and Run VelServ - a Velbus TCP Gateway - #21 by MDAR )

Just remove the Snap environment and install VelServ

apt remove snapd

wget http://www.mdar.co.uk/dl/velbus/velbus-tcp.sh to download a simple setup script

Run it using

sudo sh velbus-tcp.sh

Port 6000 will then be your Velbus connection.

1 Like

This doesn’t quite look like an issue with the software we provide through the snap system. I’d suggest getting help through the snapcraft forums.

1 Like