How-To : Install and Run VelServ - a Velbus TCP Gateway

everything works now, the binding works over the velserv

1 Like

thanks to you all:smiley:

1 Like

Youā€™re very welcome :slight_smile:

Hi All,

Iā€™m targeting to run the software components on my raspberry PI in containers/dockers
Do we have a fully configured recent raspbian velserver available as ARM?
I found this 3Y old docker:
https://hub.docker.com/r/tomvancutsem/velserv/tags

Iā€™m targeting to run it on a new Raspberry Pi 4
Thanks a lot,

1 Like

Hi

Iā€™m not aware of a Deb version of VelServ.
Youā€™d have to ask @jeroends

However, this script downloads everything and completes the setup in less than 10 seconds, so Iā€™m not sure thereā€™s anything to be gained.

https://forumtest.velbus.eu/t/how-to-install-and-run-velserv-a-velbus-tcp-gateway/15422/21

Iā€™ve got it running on loads of ODroid C2 machines and recently some C4, so thereā€™s no reason why it wouldnā€™t work on a Raspberry Pi 4

Hello,
thereā€™s idd no deb package. Because the simplicity of installation I never even thought about making one :slight_smile:
I see nothing that would prevent velserv to work on a pi4 because everything depends on the system you 're running, not the hardware.
Iā€™m planning myself also a pi4 as openhab server.

2 Likes

Hi All,
Iā€™ve velserv running on pi4 and VelbusLink is working like a charm.
I was also able to connect in OpenHab 2.5.9 and Velbus Network Bridge. Next controlling the switches is fine as well (though Control) but Iā€™m not receiving (auto) updates. Status when manually changing the light bulbs and temperature values etc. Do we need some kind of ā€œpush eventā€ setting enabled on either Velserv or openHab?
(I had the same problem 2y ago with first attempt pi3 and reverted back to Velbus Serial Bridge)
Any tips?

note: reason why checking docker was for port mapping, but velserv can change the ports by default.

Hello :smile:

Thereā€™s nothing that needs enabling, so I suspect there is something going on within openHAB2 that is stopping the update messages getting through.

What does the openHAB log files indicate?

If you disable & re-enable the Velbus bridge, does that restore the connection? (You can do this within PaperUI, RestAPI or by using a Curl command)

At worst, does it require a restart of VelServ to get you back up and running?

Hi Maarten

Thanks for this report.

CĆ©dric has found a small bug in the 2.5.9 version of the binding that was pushed into the official openHAB repository that was blocking incoming packets from the TCP network bridge.

He has worked his magic and fixed it, which should be available via PaperUI when the 2.5.10 release is available.

I would strongly recommend going back to the 2.5.4 version of the binding that is downloadable from my website using the update script. (Iā€™ve fixed the error on my website now)

http://www.mdar.co.uk/dl/openhab/update-velbus-jar.sh

If you want to try the very latest version of CĆ©dricā€™s Velbus binding, you can download it from here ā€”

https://openhab.jfrog.io/openhab/libs-snapshot-local/org/openhab/addons/bundles/org.openhab.binding.velbus/2.5.10-SNAPSHOT/org.openhab.binding.velbus-2.5.10-20201006.033435-11.jar

or here

https://openhab.jfrog.io/openhab/libs-snapshot-local/org/openhab/addons/bundles/org.openhab.binding.velbus/2.5.10-SNAPSHOT/org.openhab.binding.velbus-2.5.10-20201013.033427-15.jar

This will work in OH2.5.9

In OH2.5.9 you will need to add the V1 serial binding to get it to work.

Be aware that there are breaking changes in how some channels are named, so you will need to remove the affected Things from PaperUI and re-add them.

Then adapt your Items to suit.

To make it easier, I have created a Generic_Items Template file that has all these changes in.

You can download everything in this ZIP file

http://www.mdar.co.uk/dl/openhab/AAA_Generic_template.zip

Hi MDAR & Cedric,
Special thanks a to provide the bug fix and clear instructions on such a short notice, by far meeting any company SLA response times ! Happy to let you know setup PI4 + docker + openhab + velserv is working perfectly. Upon initial testing all events are captured.
(note: a reboot is recommended :wink: )

1 Like

Hi @MDAR ,
Iā€™m trying to re-install velserv with your script. It worked before, but now Iā€™m getting a ā€œcould not resolve www.mdar.co.ukā€ error when I try to do ā€œwget http://www.mdar.co.uk/dl/velserv-setup.shā€

Any ideas? I wanted to re-install velserv because I noticed itā€™s using A LOT of CPU since I did an update of my DietPi installation yesterday. It was idling before, but now it uses 50 - 75% of CPU consistentlyā€¦

Thanks for your help!

How odd

This is working for me

https://mdar.co.uk/dl/velserv-setup.sh

Or you can try the Velbus Snap package

https://forumtest.velbus.eu/t/bridging-velbus-with-tcp-through-snap-package/15814

Thanks for the super fast reply!
I think I found a DHCP setting change because of the DietPi update, which causes my server to connect to the wrong gateway IP. Iā€™m checking this our right now and trying to fix. Iā€™m quite sure thatā€™s the issue, so itā€™s on my end and not yours. Iā€™m curious if this also causes the high CPU spike of Velserv serviceā€¦ weā€™ll see.

1 Like

Oh is this an official Velbus package to be used to read out the Velbus bus channel?
Aka: a kind of successor to Jeroenā€™s Velserv ?

I was always afraid Velserv wouldnā€™t work anymore one day and thus am curious whether the velserv package needs to be updated for new Velbus features to work and/or whether a more official TCP bridge was available.
Are you saying I could replace Velserv with this Velbus Snap package and use it in my HomeAssistant installation (port 27015 instead of 6000 then obviously) ; or is there more to it?

Thanks!

@MDAR : just to quickly confirm: DHCP settings were indeed bricked after the system update. I managed to fix it just now and the hostname is able to resolve now; so all good on that part. Thanks!

@MDAR , @cereal : Do you know whether something changed in the HomeAssistant package for Velbus and Velserv?

Iā€™ve been using this for a few years and never had issues. Since Iā€™ve updated to HA 2022.2.3 I notice Velserv is using a lot of CPU. I also notice HomeAssistant automically detects a Velbus installation on the network since this release (have never noticed that before).
Did something change and is HA perhaps pinging the Velserv all the time which causes the CPU spike?
Any ideas on this? Just reporting it here so you are aware :slight_smile:

All help would be very appreciated! Thanks!

** Update: after fully deleting the Velbus integration and reconfiguring it, plus restarting the Velserv. service , it seems to have calmed down and is back to 0 to 1% of CPU. Not sure what caused it before, will monitor further.
I now seem to have issues with Velbus integration itself ; it loaded all modules but isnā€™t working, all entities are unavailableā€¦
but I might need to discuss this in another thread (not on the Velbus forums but some thread we use to track these Velbus x HomeAssistant issues ?)

** Update 2: after a HomeAssistant restart and full Velbus scan (via HomeAssistant services), all seems to be working fine again.
Again: not sure what happened by updating DietPi system and HomeAssistant, but the whole HomeAssistant x Velbus seemed to break because of it. Iā€™ve had this issue before when updating HomeAssistant (I think from 2020.x to 2021.x , but not sure of the exact versions anymore)

1 Like

Okay, so just for clarity (Iā€™m sure @jeroends will agree) VelServ is pretty rock solid and just works.

All it does is pass the USB packets back and forth to a TCP Port.

Thereā€™s probably more to it, but essentially thatā€™s what itā€™s doing.

It doesnā€™t care what the packets are, so if thereā€™s an incorrectly formatted packet or a brand new style, VelServ wonā€™t care.

You couldā€¦

Or you can leave VelServ in place.

I canā€™t speak for HomeAssistant, but I would assume that itā€™s not yet (probably one day) able to support TLS secured packets.

The advantage of the official Velbus Snap package is that it can be configured to offer a localhost / loopback unsecured port, that only applications on the same machine can access.

For example, Port 6000 for HomeAssistant, Node-Red or openHAB (or whichever port you want)

It can also offer a second (,third or fourth etc) TLS secured port for external applications, like Velbuslink or Control4 to use across the network.

There are full instructions on the Velbus GitHub page or you can use the script Iā€™ve created to pull down everything you need.

{ note that your machine needs to install a Snap package called Core18, if it canā€™t find that package, it wonā€™t be able to run Velbus-tcp, I know that Odroid C4 DietPi works very well, but Odroid C2 machines canā€™t install Core18 }

Does this help you?

Home assistant does support tla communications to the bus (like used by the signum).

The initial startup of home assistant it will need to scan the full bus once, so it reads all the modules and names from velbus and keeps it in a local cache (since 2020.10 release).
So in the first startup it can be heavy for a diet pi, but after this initial scan all will calm down.

1 Like

Great :smiley:

Thatā€™s excellent news

This definitely helps, thanks!
I thought Velserv interpreted the messages instead of just being a passthrough. Itā€™s the integration in OpenHab and HomeAssistant that interpret the messages of Velbus then (which it receives from Velserv), so only that integration needs to change / update for changes or new features. Very clear to me now, thanks!

Iā€™ll take a look at the Snap package but as long as Velserv is doing its thing, itā€™s definitely a robust and fine solution for me.

Thanks again all! Crazy how active you are here.

Can I ask where itā€™s best to report issues / bugs for Velbus integration for HomeAssistant to the active developers (mainly @cereal i think atm?) ?

Thanks! :pray:

1 Like