For the correct /dev/ entry, you can also create a udev rule:
cat /etc/udev/rules.d/99-usb-serial.rules :
SUBSYSTEM==“tty”, ATTRS{idVendor}==“10cf”, ATTRS{idProduct}==“0b1b”, SYMLINK+=“ttyVelbus”
This will create a /dev/ttyVelbus based on the vendor and producti ID.
This was needed when I used an older PI.
It didn’t created a symlink in /dev/servial
I know what you mean…
But I tried a part of your script: wget https://raw.githubusercontent.com/jeroends/velserv/master/velserv.c -O /opt/velserv/velserv.c
and I got a write error. I did stop velserv before trying the update. Will your script be able to overwrite the already running/installed version?
Just me begin curious.
Hey CobleS,
what error did you get, permission denied? Try to put sudo in front of your command, so: sudo wget https://raw.githubusercontent.com/jeroends/velserv/master/velserv.c -O /opt/velserv/velserv.c
After that compile the file with : gcc -o velserv velserv.c -lpthread (or if this gives you an error, sudo in front of it)
@jeroends was right, I didn’t put “sudo” in front of the command @MDAR I’m not using RS232, so I won’t update
Still good to know that I can use the scirpt if I want to update, whatever makes my life easier
i have installed velserv on a rasberrypi that also runs openhabian.
The VelServ works, the usb cable is also connected, the network connection installed in openhab. but no Velbus things are discovered.
Do these have to be entered manually or am I doing something wrong.
this is the log file in openhab:
2019-08-09 11:26:56.774 [vent.ItemStateChangedEvent] - VelbusNetworkBridgeHuis_LastSeen changed from 2019-08-09T11:22:14.117+0200 to 2019-08-09T11:26:56.730+0200
2019-08-09 11:27:56.804 [vent.ItemStateChangedEvent] - VelbusNetworkBridgeHuis_LastSeen changed from 2019-08-09T11:26:56.730+0200 to 2019-08-09T11:27:56.776+0200
this is the configuration in network binding:
Hostname or IP
127.0.0.1
Port
6000
Retry
1
Timeout
5000
are you sure the velserv has connection? Try to connect with Velbuslink, if that works you’re sure .The problem is that velserv exists in 2 parts, a distribution part and a gateway. The distribution part keeps running even when the gateway is down, so it could look like velserv is still running.
have you’ve tried to connect with velbuslink? You can make a connection choosing the TCP/IP in the connection dialog, then fill in your ip address and port 6000. Do a scan and if you don’t get a timeout your velserv is up and running fine.
Other posibility is looking at a more verbose session of velserv. First stop your velserv service with “sudo systemctl stop velserv”. The go to the dir where the velserv program lives: “cd /opt/velserv”.
Here you can start the server manually and add some verbose options, in your case type: “./velserv -d /dev/serial/by-id/usb-Velleman_Projects_VMB1USB_Velbus_USB_interface-if00 -p 6000 -vvvvvv” and copy the output here. You can end the program with the key combination “ctrl c”. In this way you can see every client connect and disconnect + monitor the data on the bus.