Java Lib for Velbus


#1

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


Sending/reading Velbus commands with an Arduino
#2

jVelbus - Java Velbus SDK
jvelbus.org


#3

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


#4

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)


#5

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?


#6

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


#7

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


#8

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/


#9

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.


#10

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.


#11

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/


#12

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
**


#13

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.


#14

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


#15

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


#16

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.