Skip to content

How to use

Torsten Oltmanns edited this page Sep 29, 2024 · 46 revisions

How to use

Requirements

This project explicitly supports Java 8 because its the latest version with 32-bit JDK 8 support that many microcontrollers support. If you're using a Raspberry PI 3B, 4B or above I recommend to use a 64-bit Java JDK and 64-bit operating system like Raspian OS or Ubuntu.

  • JDK 8 or above (see https://jdk.java.net/) (JDK 8 is only recommended for 32-bit microcontroller otherwise JDK 21+ is recommended)
  • A PC or microcontroller running a Linux derivate like Raspian OS or Ubuntu (CAN/RS485/ModBus/Serial) or Windows (RS485/Modbus/Serial)
  • Communication adapters to use CAN, RS485, Modbus or Serial depending on your battery management system (BMS) and/or inverter

Download the Configurator

Download the Configurator application and start it:

java -jar configurator.jar

This will start the configurator. You can do this on any platform that has a Java JDK 17+ installed. It does not necessarily need to be the target platform where you will run the bms-to-inverter application.

General settings

image

Please first select the installation folder for your application, e.g. bms-to-inverter by clicking the Choose button. If necessary create a folder where the application is to be installed. You can also choose an existing installation folder if you just want to update your configuration or installation.

Then choose the OS platform of the * target * device, e.g.:

  • AARCH64 for Raspberry Pi 2Bv1.2/3A+/3B/3B+/4B/5 or Mac M1/M2/M3 running a 64bit OS
  • X86 32bit (Unix) for a Linux/MacOS system running on Intel/AMD x86_32 bit
  • X86 64bit (Unix) for a Linux/MacOS system running on Intel/AMD x86_64 bit
  • ARM7 for a Raspberry PI 2B running 32bit OS
  • etc.

NOTE: if you select Windows as your target platform you will NOT be able to use the CAN protocol to communicate to your BMS(es) or inverter.

Also choose the log-level for the application. Recommended is to leave it at info level for your first installation. You can change it anytime later (debug if you run into problems, warning or even only error if everything is running smoothly).

BMS configuration

Next you need to configure your BMS(es) on the BMS tab.

image

The poll interval on the buttom configures the delay (in seconds) between each reading round of BMS data.

Click the Add button to add and configure a BMS. This will open the following BMS configuration dialog:

image

Select your type of BMS, e.g. Daly, JK, Pylon, Seplos, etc. with their corresponding protocol (CAN or RS485 (UART, RS232)). For example, select DALY_CAN if you have a Daly BMS using the CAN protocol, select DALY_RS485 if you have a Daly BMS using the RS485, UART or RS232 protocol.

Assign an ID for the BMS. Usually this starts with ID 1 and increments with each additional BMS. Often the ID is also configured on the BMS hardware via a DIP switch or manufacturers software setting. If you're not sure start with ID 1.

Next enter the port which the BMS is connected to, e.g. /dev/ttyUSB0, can0, com3, or similar. Please check the manual of your CAN or RS485 hardware module manufacturer.

If your baudrate differs from the default, then you can change the value to the BMS specific value.

The delay after no bytes can help to solve problems if the BMS is too slow to put data on the wire. So if no data was available when reading, it will wait the configured milliseconds before reading again.

If you have multiple BMSes configured on the same port using the same bus, you can just select the BMS and click the Duplicate button.

image

Use the Edit button or double click to make changes to a BMS. The Remove button will delete the BMS from the list.

Configure inverter

On the Inverter tab you can configure your inverter.

image

Select NONE if you only want to read your BMS(es) values. Otherwise select your inverter brand. If your brand is not in the list but supports the PlyonTech CAN protocol you can try the PYLON_CAN (PylonTech).
(If you have problems or need an implementation of a missing Bms or inverter - just contact me!)

Next enter the port which the inverter is connected to, e.g. /dev/ttyUSB0, can0, com3, or similar. Please check the manual of your CAN or RS485 hardware module manufacturer.

If your baudrate differs from the default, then you can change the value to the inverter specific value.

The send interval defines in what intervals (in seconds) the BMS data is sent to the inverter.

Configure optional BMS or inverter plugins

The plugins tab provides configuration of optional plugins you might want to use to manipulate the BMS data or inverter data.

image

Currently these 2 plugins (for inverters) available:

  1. PresetBatteryPackDataPlugin will check if a SOC has already been read from the BMS. If not, it will set the preset values which can be configured when adding or editing the plugin:

image

Use this if the inverter reports errors upon starting the application to deliver data until the BMS binding has read real data.

  1. SimulatedBatteryPackPlugin can be used in combination with the BMS binding NONE (the dummy BMS) to test the inverter binding communication.
    IMPORTANT: If you use the dummy BMS (NONE) binding together with the inverter plugin SimulatedBatteryPackPlugin you MUST (!!!!!!!!!!) disconnect any load and PV DC input to prevent possible damage as the inverter will try charging/discharging!!! Some basic battery data values can be set when adding or editing the plugin:

image

Configure optional services

The Services tab provides multiple optional services that you can activate.

image

Email notification

If you like to be notified when there are alarms or warnings from you BMS, you can have them sent as email. Configure the properties according to your email provider.

MQTT producer

Use the MQTT producer to connect to external MQTT brokers, e.g. Home Assistant, Mosquitto, etc. to send BMS data.

MQTT producer

Use the MQTT broker to provide BMS data to external MQTT clients so that they can connect to the topic and receive BMS data.

Webserver

If you like to monitor all your BMS(es) data like voltages, currents, balancing, warnings and alarms, you can select this option. If you use the webserver service you can specify which ports the HTTP and HTTPS will run on set a username and password for the login. You can then connect to the webserver like http://<my_ip>:<http_port> or https://<my_ip>:<https_port>, e.g. https://localhost:8080. The http connector will automatically be forwarded to the https connector.

Installation

If you're just editing your configuration you only need to click the Update Configuration button.
If you're installing for the first time or want to update the application you can create a fresh installation using the current configuration by pressing the Clean install button.

image

When you see the succesfull message you will have everything you need in your installation folder. If you need to transfer this to your target machine, e.g. like a Raspberry PI you can use something like WinSCP to copy the installation folder to your target machine. If your installing directly on the target system you will not need to do anything, but if you copy the files from a Windows system to a Linux system (like the PI) you need to change the file permissions of the start scripts in your installation folder:

chmod 744 start.sh
chmod 744 configurator.sh

That's it - now you're ready to go!

Starting the application

You can now start the application from your installation folder by calling:

./start.sh

To re-configure or update the application call:

./configurator.sh

On windows call the respective file with the .cmd file ending.


Notes

If you have questions or need support feel free to contact me or raise an issue or discussion. If you like to support me testing the application on all different BMSes and inverters please contact me!

========>>>>>>> Finally, if you like this project and like to support my work please consider sponsoring this project Sponsor button on the right :)