Java Lib for Velbus

Hello,

Is that anyone developped the Library to connect to Velbus in Java?

If yes could you share it to me?

thks

Valery
v.detez@gmail.com

jVelbus - Java Velbus SDK
jvelbus.org

Hi

Iā€™ve been using JVelbusD on a Debian Jessie SBC for a few weeks now and I can happily report that it is faultless!

Thanks Gunther

How did you get it to work on a raspberry pi? I have the issue that when I start the script:

Exception in thread ā€œmainā€ java.lang.NoClassDefFoundError: gnu/io/NoSuchPortException
at jvelbusd.ServerApplication.main(ServerApplication.java:22)
Caused by: java.lang.ClassNotFoundException: gnu.io.NoSuchPortException
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)

Hi

I havenā€™t got an exact answer yet, but Iā€™ve just been given this snippet of information that might help you.

[quote]"The key with jvelbusd is that it depends on RXTX which is a native library that needs to be loaded into your java runtime.

Thereā€™s not much difference between windows and Linux when it comes to java."
[/quote]

Does this help?

If this means installing that library then yes I can do that.

If not, then I have no clue what todo.

Its a pitty since this is the missing link.
I have openremote running on a rapsberry pi and I need a windows pc to run the jvelbusd appā€¦tssssā€¦

I just tried to install the lib, but the error remains the same

I have a similar issue :slight_smile:

Once I can confirm, Iā€™ll update this thread.

However, if you can install the RXTX library on your Pi and let us know how you get on, it would be really helpful.

Cheers,

Stuart

I installed everything. And I used the script as stated but it always refers to /dev/ttyAMA0

however, When I connect my USB cable to the velbus installation it connects on /dev/ttyACM0, which I edited. But still the same error

root@openremote:/velbusserver/JVelbusD# ./setjava.sh Bus 001 Device 004: ID 10cf:0b1b Velleman Components, Inc. Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. SMSC9512/9514 Fast Ethernet Adapter Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp. Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Exception in thread "main" java.lang.NoClassDefFoundError: gnu/io/NoSuchPortException at jvelbusd.ServerApplication.main(ServerApplication.java:22) Caused by: java.lang.ClassNotFoundException: gnu.io.NoSuchPortException at java.net.URLClassLoader.findClass(URLClassLoader.java:381) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ... 1 more

I followed this guide, but it didnt help angryelectron.com/rxtx-on-raspbian/

Hi

One of the fabulous programmers I work with has got JVelbusD working on our Debian & Ubuntu machines.

He has offered the following instructions.

For reference, we have Oracle Java on one machine and IcedTea on others, so the paths will vary, but the concept remains the same.

Please let us know how you get on.

For reference, we also noticed that there are two versions of JVelbusD floating around.

One that is 17Kb and another that is 59Kb.

They both seem to work, but if you have one and want the other, let me know and Iā€™ll post some links.

Zip file with 17Kb JVelbusD.jar file mdar.eu/dl/JVelbusD.zip

Zip file with IcedTea config file and JVelbusD mdar.eu/dl/jvelbusd-iced-tea.zip

Zip file with Oracle config file and JVelbusD mdar.eu/dl/jvelbusd_Oracle1.6.zip

Just to be clear, JVelbusD is the work of Gunther, I lay no claim to it, or make any claim to understanding how it works or is correctly configured.

I will help where I can, if I can as it benefits us all.

it seems the first zip file is password protected :frowning:

By the way, there is a JAVA Velbus source on Sourceforge : sourceforge.net/projects/jvelbus/

I think Iā€™ve just realised a small detail that might be stopping JVelbusD from working.

I thinkā€¦

RXTXcomm.jar is actually a SymLink to the actual RXTX jar file.

In one case this is
RXTXcomm-2.2pre2.jar

Iā€™ve copied the real RXTXcomm file to the java.ext.dirs folder.

Does this help?

Also, I have opened the zip file (as hosted on my web server) and it didnā€™t ask for a password.

Can you download it again and check it isnā€™t corrupt.

Good luck.

Stuart

As suggested, there is now a GitHub page with instructions on how to setup GuntherVBā€™s JVelbusD TCP server here

**github.com/openremote/Documentation/wiki/JVelbusD-installation-instructions
**

It works for me with the Oracle version you provided.
We need to make sure this is kept somewhere to be repeated when needed.

This is very valuable information. MDAR much thanks for that.

hi everyone,
i have some trouble with installing the jvelbusd server on a raspberry pi3 , i followed the previous steps on this forum and also the instructions on the the following github.com/openremote/Documentation/wiki/JVelbusD-installation-instructions, but i still run in to errors.

and about 30 more of this
On the Pi there is ā€œjdk 8 oracleā€ installed

if there is some who could give me a handā€¦,
i must say iā€™am newbie with the raspberry and linux

regards steven

Re your post on the OpenRemote groups page, I see that youā€™ve got VelServ up and running.

groups.google.com/forum/m/#!topic/openremotecommunity/d9Ds3KNqgZY

Congratulations.

Iā€™m sure we all wish you luck with your UI and are here to help if you run into any configuration issues.

Cheers,

Stuart

MDAR Ltd

A classpath is a list of locations to load classes from. These ā€˜locationsā€™ can either be directories, or jar files. The JVM will attempt to look in the directory classes first, then in .Jar files. When you get a ClassNotFoundException, it means the JVM has traversed the entire classpath and not found the class youā€™ve attempted to reference. This may be something that can happen in the distribution or production of JAR files, where not all the required class files were included.

1 Like