Connection between Velbus and Openremote Server on PI 3

Hey all,
Actually I’m trying to connect Openremote on Raspberry Pi3 with Velbus. Openremote server running on the Pi and can be connected by the UI on my Android Phone…However I’m struggeling with the connection between the Pi and the VMBRSUSB.
If I do see it right the Pi is connected to the VMBRSUSB by an USB cable but how do you need to set the connection right?
My Raspberry has a static IP address 192.168.1.195:8688. In the Open Remote designer I filled out following fields:

I filled out the Velbus.server ip (192.168.1.190) and the port (8445) a bit random. Is this allowed or should it be specific?

Do you need to specify which USB port on the PI should communicate with the VMBRSUSB or is this automatically done by connecting a cable to one of his ports? Or I’m I seeing this completely wrong?

I’ve been busy quite a while to setup and to install everything but I would be delighted if someone could help me a little bit further.

Thanks you very much in advance!!!

Friendly regards,

Jan

Hello Jan,

I’m very happy to help you get your OpenRemote controller up and running with your Velbus installation, but before I go into great detail, can I ask if you’re read the first two paragraphs of this how to guide? (And followed any links that take you eye)

There is mention of JVelbusD which is a Linux / Java USB to IP server.

All you need to do is get this, or any other Velbus to IP server running on your Raspberry Pi and point OpenRemote to the defined port.

For example
IP address - 127.0.0.1
Port - 6000 (if using JVelbusD)

You can search this forum for VelServ if you don’t get on with JVelbusD.

Alternatively, I’m told that you can issue a ‘cat’ command that will pass everything from a USB port to an assigned IP port.
It’s not the most robust way of going about it, but it might work.

You could also try searching the OpenRemote Google groups page, as I have previously answered similar questions.

https://groups.google.com/forum/m/#!forum/openremotecommunity

Search with keywords like :
JVelbusD
VelServ
PBServer

Good luck, I’ll keep my eye on this thread.

Best wishes,

Stuart

Hey Stuart,

First of all many thanks for your continuous and ever lasting effort to help all of us in this forum. You answered already so many questions…so again THANK YOU SO MUCH!!!

Ok now i got it ;). I’ve read already the Velbus documentation above many times and now I do understand what you mean by the JVelbusD USB to IP server. This was my missing link. I knew there have to be an interface out there between the Openremote and Velbus but I didn’t get the point. Until now.

I’m out for the WE but I will try it out next week and I give you an update on this matter.

Have a nice WE and many thanks again!

Best regards,

Jan

1 Like

Stuart,

Just a small question… The thee files below after unzipping the JVelbusD zipfile…I guess you put them in the OR-server folders (in my case on the Rasp PI but that will be similar like on other platforms I suppose…). Do you know the exact folder location? I’m trying to work very systematic :wink: because I’m not used to work in Linux.

Thanks again and best regards,

Jan

Hi Jan

I’m happy to help :slight_smile:

There’s no hard rules as to where you put those three files, it’s the paths to start them and the exact file path to the Java library in the config file that are important.

Good luck,

Stuart

Just to give you a little more information.

By running JVelbusD (or something like it) you can simultaneously connect OpenRemote and VelbusLink to your installation via the IP port of your server machine :grinning:

Which helps for programming / reprogramming or debugging :slight_smile:

Cheers,
Stuart

Hi Stuart,

Thanks again for the tip…

I’m trying to get grip on linux and what in the script but I’m certainly missing some things…First before trying other Java USB to IP servers, I will try to make the JVelbusD working…

What I did so far is followed everything till point 6 (https://github.com/openremote/Documentation/wiki/JVelbusD-installation-instructions)

Then I downloaded JVelbusD.zip and I placed it in the ‘/opt/jvelbusd’ folder

At the command line I instructed : sh jvelbusd.sh &

Gave me…

Only one exception ot the log file…

What you told my in yr previous reply is that ‘the exact file path to the to the Java library in het CONFIG file that is important’. Do you mean the ‘jvelbusd.sh’ or the ‘jvelbusd.config’ file?

I didn’t change the content of the files yet because I’m a bit careful doing that…

My ‘jvelbusd.sh’ file contains but I’m not sure about the library path (last line) :

My ‘jvelbusd.config’ contains:

Is this the right way or is the path to my lib incorrect?

Thanks Stuart for your time. Have a great sunday!!

Best wishes,

Jan

Hi Jan,

It looks like you are really close to getting it up and running.

You are at the really fiddly bit :frowning:

However, if you follow these instructions to the letter, you should be able to get up and running quickly. (I get stuck in the details of the last few steps if I go through it fast)

https://github.com/openremote/Documentation/wiki/JVelbusD-installation-instructions

The file that looks like it needs editing is the jvelvusd.sh script, with regard to the Java path.

That said, please do check that your Raspberry Pi sees your Velbus VMBRSUSB module (USB connection) at /dev/ttyACM0

Those should be the only two issues that you need to address to get JVelbusD working.

One way of checking that the USB data is coming in on /dev/ttyACM0 is to use this command…

cat /dev/ttyACM0

What should happen is that any data from that port will be ‘printed’ to your terminal screen.

CTRL&c will close it :wink:

I hope this information helps.

Good luck.

I’ll keep an ear open for my email alerts if you need any more help.

Cheers,

Stuart

Hi Stuart,

In your phrase : ‘The file that looks like it needs editing is the jvelvusd.sh script, with regard to the Java path’ you mean this line don’t you?

In the /jni folder I have:

So I guess that’s ok ?

When I run :

  cd /opt/jvelbusd 
  sh jvelbusd.sh

I get:

In OR I filled out :

There something I’m doing wrong but what ??..

Thanks for yr patience and time.

Best regards Jan

PS: when it works I will make a discription with detailled instruction for people who wanna set up OR on a raspberry.

.

Hi Jan,

I was about to go on about running this command and pasting the results here for me to have a look at…

java -XshowSettings:properties -version

But then I noticed that the error you’re showing is quite precise.

It says that it can’t find the log file…

/var/log/jvelbusd.log

Can you try creating a blank file for it to append to with this command.

touch /var/log/jvelbusd.log

Then try running the app again.

Good luck :slight_smile:

Thanks for offering to write a how to guide, I’d really appreciate that :slight_smile:

Cheers,

Stuart

Hi again Stuart,

I did create the jvelbusd.log file in the /var/log/ folder but no luck :frowning:

It stills says (access refused). So same error. Is this perhaps an access right matter?

The printout of the ‘java -XshowSettings:properties -version’ command gives me:


In my /usr/lib/jni folder I have following files:

When executing the ‘Sudo java -jar jvelbusd’ and the ‘Sudo sh jvelbusd.sh’ instructions the access error is gone but it gave me another one…

Thanks anyhow for your effort Stuart.

Best regards,

Jan

PS: No problem to write a how to guide. It will be my pleasure…

Forgot this …

I did copy the RXTXcomm.jar to /usr/lib/jvm/jdk-8-oracle-arm32-vfp-hflt/jre/lib/ext

Arrrr harrrr

I suspect the problem is what it always is…

It’s all to do with “java.ext.dirs”

The long folder location listed in your result must contain all of the RXTX files, which aren’t always copied correctly​. (We are working on a totally different solution for all this, but there is much to do)

So, please ‘cp’ all of the rxtx files into the folder that is indicated by the java.ext.dirs= entry.

Then it’s just a matter of…

Editing the jvelbusd.config file to include the specific path to RXTX-comm.jar,

or remove all reference if it is located in a normal place, as defined by “java.ext.dirs=”

I think that should get you up and running, assuming you run it with the sudo command or on bootup using the RC.local method.

Please excuse the short answer, I’m accessing the site from my phone.

Good luck,
Stuart

Hi Jan,

I know you’re really close to getting JVelbusD up and running, but to throw in a curve ball, you could try VelServ instead.

There are a number of people who report better results when using it with Raspberry Pi.

https://forumtest.velbus.eu/search?q=Velserv

I’m sure that Jeroen will help you get it running.

Best of luck,

Stuart

Hey Stuart,

Yeah I getting closer. Will first try to run the JVelbusd module. It’s in my nature not to quit easily things when something is difficult :wink:… So I will let you know how it turns out.

Thanks for all your effort till now,

Regards,

Jan

1 Like

Here is a velbusd binary I compiled for use on my raspberry: https://www.dropbox.com/s/kemtsdbh4dnkpds/velbusd?dl=0
e.g.
velbusd -s /dev/ttyACM0 -b 192.168.1.30:8445 -l /var/log/velbusd.log

1 Like

Hi Jan,

How are you getting on?

I’m keen to get you past this stumbling block so you can start unlocking the hidden power of your Velbus installation.

Good luck,

Stuart

Hi Jan

Any news?

Cheers,

Stuart