I’m using a velbus server from here on the forum and a selfwritten sockter reader in a android application. But your stuff seems realy usefull to rewrite my app !
The link velbus.tidespark.be/downloads/wi … dk-x86.exe is not working, didn’t take the time to compile it myself yet.
I’m very glad you will find a use for it! Everything is still actively being developed, including the website, so the website is currently only an empty visual shell Sorry about that!
P.S.: It’s a purely private project that I work on at home, so there will be no support from Velbus itself, please don’t contact them about it.
Please take a look at jvelbus.org/ instead, it is a Java library for communication with Velbus over basic input and output streams. It should be very easy to use and integrate. If you have any questions, contact me through the email address on my GitHub profile.
I’ve been trying to get the velserv.c to work, but i can’t find out what’s wrong.
When running the server everything seems fine, and i can connect using velbuslink from an external system.
pi@raspberrypi:~/velserv $ ./velserv -f -v -v -v -v -v -v
Device : /dev/ttyACM0
IP address : 127.0.0.1
Port : 3788
Verbose level : 5
Client mode : 1
Server mode : 1
Velserv: socket is OK...
Velserv: setting socket options is OK ...
Velserv: bind is OK ...
Velserv: server listen is OK ...
Velserv: accepting connection
Velserv: new connection from 127.0.0.1 on socket 6
But it seems like nothing ever gets in or out the serial port. When scanning for modules from velbuslink i see al the requests passing in velserv, but nothing blinks (more than normal) on the VMB1USB. When i see bus activity on the VMB1USB i can’t see anything in velserv either.
I’ve tried using screen to manually connect to the serial port and verify everything is correct, and that seems to “work”. I do get data back, but it’s not readable. Probably some charset or serial port setting issue.
=== EDIT ===
I was running over the code and found out there was a level 8 verbose level that should print the raw serial data. Testing that does seem to work, so it’s actually connecting and reading from the serial port…
I’m having similar issues. After 4 hours of fiddling with i did get jvelbusd to run and Velbuslink is able to communicate trough jvelbusd with the bus, but i’m looking for a daemon which can run scripts on receiving certain velbus commands, so no luck there. jvelbusd does make it easier to test/run multiple scripts.
With velserv in my case, it only outputs bus debugging info after a client disconnects
[code]root@raspberrypi:/home/pi/velserv# ./velserv -f -v -v -v -v -v -v -v -v -v
Device : /dev/ttyACM0
IP address : 127.0.0.1
Port : 3788
Verbose level : 8
Client mode : 1
Server mode : 1
Velserv: socket is OK…
Velserv: setting socket options is OK …
Velserv: bind is OK …
Velserv: server listen is OK …
Velserv: accepting connection
Velserv: new connection from 127.0.0.1 on socket 6
Velserv: accepting connection
Velserv: new connection from 127.0.0.1 on socket 7
0F FB A3 02 FA 04 53 04 0F FB A3 07 ED 00 3F FF 00 00 C0 61 04 0F F8 A3 04 00 04 00 00 4E 04 0F FB A3 02 F6 FF 5C 04 0F F8 A3 04 00 00 04 00 4E 04 0F FB A3 02 F5 FF 5D 04 0F FB A3 02 F6 02 59 04 0F FB A3 02 F5 09 53 04 0F FB A3 02 F5 04 58 04 Velserv: 127.0.0.1 on socket 7 hung up
Yeah, same for me. I finally ended up using jvelbusd from jvelbus.org
Had some troubles getting the RXTX lib to work on de Raspberry Pi and for future reference here’s the correct way to install it: wiki.erraweb.com/doku.php?id … ry_pi:rxtx
As for automation i’m going to use Domoticz. It supports some basic programmable logic and variables out of the box (drag 'n drop style), and for the more advanced stuff you can always program your way out.
I have tested a few similar systems and this one has by far the most stable Android app ever, which was important to me. It integrates with lots of other systems, but for now, no velbus support.
Since i’m a programmer i’m going to write my own script to make velbus work with Domoticz. You can find an example on the Domoticz forum and it’s quite straightforward. You’ll need 2 scripts. One for translating the Domoticz “buttons” to velbus commands, and a second script that listens to the velbus for messages and pushes feedback to Domoticz.
Same problem for me, Raspberry with raspbian got a power cut, sd card corrupt… I reinstalled a new fresh raspbian, Jessie lite … And velserv won’t communicate anymore. I tried on another raspberry with openelec and no problem there. So it is something with the new reaspian jessie, I already tried removing some parameters in /boot/cmdline.txt.
But it did not help. The change in cmdline.txt helped for my razberry board on the same pi that also connects serial. and had timeouts after the reinstall. The board did work before the crash without any modifications.
I found the problem with the velbus c server on newer raspbian (jessie) by adding debug printf statements It was the variable " int start_recv" that wasn’t intialised as 0, probably previous C versions / compilers did this.
After changing it to “int start_recv = 0” (2 times) and recompiling it worked.
to compile it yourself : gcc -o velserv velserv.c -lpthread
don’t forget to “chmod +x velserv”
I didnd’t find jvelbusd as stable as this version in C also cpu and memory usage of java version was much higher.
I also want to add velbus support to domoticz wich is also written in C.
At the moment I added some virtual switches and some bash code to get my velbus components running in domoticz
[quote=“bheremans”] also want to add velbus support to domoticz wich is also written in C.
At the moment I added some virtual switches and some bash code to get my velbus components running in domoticz
[/quote]
Hi Sapien, still need to start with domoticz development. I’m looking now to set up development environment, also it’s a long time ago I did C-code …
I can’t reply private messages on the domoticz board because I don’t have enough posts
Long time that I came across here, didn’t know that my code was a bit more popular these days. Thank bheremans for your debug, will change it to the original code
the one and only true link is: code
I’ll try to make a github in the near future so other can fork this into there project and there’s some version control because I’ve noticed (and got a lot of question) for the older versions of the code.