Jump to content

Watchpower on RPi-3+ and ICC


Recommended Posts

Hi all RPi fans with ICC,

Is it possible to use the RPi to run the debian linus version of Watchpower on?

If so, can one use the USB cable to communicate to the Inverter, or does one still need a USB to Serial converter, and then run both ICC & Watchpower at the same time?

I would rather go this route then having a dedicated Windows machine to occasionally look at WatchPower.

Your thoughts/suggestions 

Link to comment
Share on other sites

  • 1 year later...
  • 2 months later...
On 2019/05/17 at 8:34 AM, Sidewinder said:

Hi all RPi fans with ICC,

Is it possible to use the RPi to run the debian linus version of Watchpower on?

If so, can one use the USB cable to communicate to the Inverter, or does one still need a USB to Serial converter, and then run both ICC & Watchpower at the same time?

I would rather go this route then having a dedicated Windows machine to occasionally look at WatchPower.

Your thoughts/suggestions 

WatchPower is written in Java so that part would work.

However, they make use of a native library to communicate with the inverter.  For serial they use RXTX and for USB they have their own library.  They then make use of JNI (Java Native Interface) to use that library.

If you compile RXTX on ARM and replace the JAR with the version built for ARM, serial port would work.  You would also need to replace the JVM they bundle with WatchPower with a JVM installed on your RPI.

It is definitely doable but not something a layman can do easily.

Link to comment
Share on other sites

  • 2 years later...
  • 8 months later...
 

WatchPower is written in Java so that part would work.

However, they make use of a native library to communicate with the inverter.  For serial they use RXTX and for USB they have their own library.  They then make use of JNI (Java Native Interface) to use that library.

If you compile RXTX on ARM and replace the JAR with the version built for ARM, serial port would work.  You would also need to replace the JVM they bundle with WatchPower with a JVM installed on your RPI.

It is definitely doable but not something a layman can do easily.

I did not noticed RXTX library here, but rather jSerialComm2.7.jar, which seems to not use native libraries.
Only thing which uses native code, is libUSBDevice.so, used by WatchPower.jar directly.

I installed 32-bit Linux version of WatchPower on x86 Linux PC, copied it over Raspberry Pi, made some modifications to LAX config to not use embedded Java VM (because it is x86 one) and some other modifications, to launch it. Still, for having working USB connection, I written my own libUSBDevice.so replacement, and it works quite well so far.

image.thumb.png.76ddd904de4f970fbeeb60ecec2b3fa6.png

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...