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


#21

Hi

To make life even easier to setup Velserv, I’ve created a script to download and setup.

http://www.mdar.co.uk/dl/velserv-setup.sh

Use a terminal and try these commands…

wget http://www.mdar.co.uk/dl/velserv-setup.sh

cat velserv-setup.sh

sudo sh velserv-setup.sh

When the script has completed it’s final step, you should see something like this :

user@Linux_MiniServer:/# systemctl status velserv
● velserv.service - Velserv
   Loaded: loaded (/opt/velserv/velserv.service; enabled; vendor preset: enabled)
   Active: active (running) since Sun 2019-03-24 17:55:34 GMT; 47s ago
  Process: 2345 ExecStartPost=/bin/bash -c /bin/pidof velserv >> /var/log/velserv.log (code=exited, status=0/SUCCESS)
  Process: 2338 ExecStartPost=/bin/bash -c /bin/echo Velserv Started $(date) >> /var/log/velserv.log (code=exited, status=0/
  Process: 2334 ExecStartPost=/bin/bash -c /bin/touch /var/log/velserv.log (code=exited, status=0/SUCCESS)
  Process: 2327 ExecStart=/opt/velserv/velserv -d /dev/serial/by-id/usb-Velleman_Projects_VMB1USB_Velbus_USB_interface-if00
 Main PID: 2332 (velserv)
    Tasks: 4
   Memory: 104.0K
      CPU: 86ms
   CGroup: /system.slice/velserv.service
           └─2332 /opt/velserv/velserv -d /dev/serial/by-id/usb-Velleman_Projects_VMB1USB_Velbus_USB_interface-if00 -p 6000

Mar 24 17:55:34 Ubuntu-Home systemd[1]: Starting Velserv...
Mar 24 17:55:34 Ubuntu-Home systemd[1]: Started Velserv.

It will stay in that state until you press q

Good luck

If you want to keep an eye on the amount of times Velserv is started at boot up, take a look at the log file it appends

cat /var/log/velserv.log

I can’t remember what inspired me to write this script, ahem… @CobleS @RossJe


#22

Haha, great!
Keep in mind that there 's a minor update in the current version, so we’re now at version 1.6 :slight_smile:


#23

I’m very glad you approve :smiley_cat:

I’ve added a line in the velser-setup.sh script that will pull down the latest version of your velserv.c file from now on :smile:


#24

@MDAR

Tried your script today with a friend, works perfect! :ok_hand: