Skip to content
Christoph Krzikalla edited this page Nov 12, 2024 · 41 revisions

OpenDTU-OnBattery supports batteries communicating via CANbus using the "Pylontech Protocol"
If your battery has CANbus, you can try connecting it using its default configuration; If unsuccesful, switch to "Pylontech Protocol" and try again. (We have tested a GOBEL GP-SR1-RV150 Battery (280Ah 15kWh, 2022 model), its CANBus even in "DEYE Configuration" communicates with OpenDTU-OnBattery)

Pylontech Info EN-DE

Tools for Pylontech US2000c/US3000c/US5000

Pylontech CANbus Port

Pylontech Batteries have only one CANbus port. If you have more than one systems that need to be connected with CANbus, you may need to use an RJ45 Splitter. One user has tested one such (at 15EUR, VERY EXPENSIVE!) Splitter: this model works well and connects a Pylontech with OpenDTUonBattery and Victron Cerbo-S GX (Brand Name and shop has been removed in order to avoid advertising of overpriced items)

Splitter Working with Pylontech Victro Cerbo Canbus Anonymised

Pylontech Console Port

Pylontech Battery BMS can communicate through a RS232 serial communication connection at the "Console" port. Please note that this connection needs regular old-school RS232 levels - +/- 3-12V. If you use a USB to serial adapter, those with TTL (5V) or 3,3V levels DO NOT WORK.

You need a special crafted cable with RJ45 connector at the BMS side. You find USB-to-serial cables to buy for Cisco routers and other network equipment with a RJ45 connector, you can use these cables but must change the pinout! This is shown in this (lenghty) video.

grafik grafik

BatteryView Tool

https://www.panda-solar.de/Pylontech-US5000-Energiespeicher.html

look at "Produktdatenblatt / Downloads" beside the description ("Beschreibung")

Deep link: https://www.panda-solar.de/images/BatteryView_us2000b_series_3-0-2-28_2.zip

Pylontech Battery Firmware Update

Information about firmware problems: https://community.victronenergy.com/questions/182659/pylontech-us3000c-us5000-internal-failure-problem.html

Important! Use at your own risk! Read before flash anything!

Update-Program and Firmware: https://www.effekta.com/download/firmwareupdate-for-us2000c-3000c/

Here is a good video example of somebody using the console port to do the firmware update Pylontech US2000C auslesen und Firmware Update via RS232

CAN-Bus connection

OpenDTUonBattery can connect with the Pylontech batteries using CANbus. You need a simple module that can receive data (no transmition required). Following modules have been found to be working well:

CAN Bus Shield with TJA1050 CAN Bus Shield with TJA1050 successfully tested with Pylontech battery

SN65HVD230 CAN-Board SN65HVD230 CAN-Board 1

Connections to the RJ45 Port Pin:

  1. CAN L goes to PIN5
  2. CAN H goes to PIN4
  3. CAN Ground goes to PIN6 (not needed)

RJ45 wire colors Pin Layout and Pylontech - - Copy

Warning! On some SN65HVD230 boards without termination jumper (pictured below), the terminating resistor between CANH and CANL (R2) must be removed in order to allow communication with the Pylontech battery (see https://github.com/helgeerbe/OpenDTU-OnBattery/discussions/245)

kloppy1984 Bei meinen Test hat es gestern nur ohne den R2 Widerstand funktioniert.

Cheap SN65HVD230 shield

The need for terminating resistor between CANH and CANL (R2) depends on the kind of cable you are using (shielded vs unshielded twisted-pair) Here is some technical information: Diagnosing CANBUS Communication Problems

There must be exactly two (2) termination resistors of 120 ohms each at the physical ends of the CANBUS. Both termination resistors must be on the physical ends of the CANBUS (ends of the main trunk). If they are not at the physical ends of the network, then the effectiveness of the termination filtering resistors will be negated. Always use termination resistors. Even if the network appears to operate without termination resistors in quiet environments, it may not operate correctly when noise is introduced!

All CANBUS wire must be twisted pair cable, even short lengths (longer than 1 inch / 2 cm). The twisted pair wire is an essential part of how the differential mode filtering works on CANBUS, and without it, the signal can be easily distorted.

If the CANBUS wire being used is a shielded (twisted pair) cable, the shield should be grounded on one end only. If both ends of the CANBUS wire shield are grounded then ground loops may be formed which can cause interference.


Pylontech Emulator

Python script to emulate the outgoing CAN bus from Pylontech

If you do not have a Pylontech battery yet, you can still test your OpenDTU CANbus installation with an Emulator:

PYLON_EMU Python script to emulate the outgoing CAN bus traffic from a Pylontech LFP battery pack (48V)

https://github.com/juamiso/PYLON_EMU

It requires a raspberry pi (or a linux machine) plus extra hardware (Waveshare RS485 CAN HAT) to communicate via CAN. 71S-zVRmy1L AC_SL1500 - Copy

See a short screen capture video showing the function of it. https://www.youtube.com/watch?v=CiFts8KZV6k Currently only the keep alive message is being modified every second (incremented by one). The rest of the values are static (but can be modified in the script to be set on-the-fly) https://www.youtube.com/watch?v=CiFts8KZV6k

Required CANtools package, install it using: python3 -m pip install cantools

https://www.waveshare.com/wiki/RS485_CAN_HAT

Install the Waveshare RS485 CAN HAT Your Waveshare RS485 CAN HAT version will probably have a 12M crystal so the config.txt lines should be

dtparam=spi=on

dtoverlay=mcp2515-can0,oscillator=12000000,interrupt=25,spimaxfrequency=2000000

WICHTIG! YOU MUST CHANGE THE CAN0 bitrate before starting the program. Type following command:

sudo ip link set can0 up type can bitrate 500000

Then change to the directory where you have the two files pylon_can.py & pylon_CAN_210124.dbc

UPDATE: You need to edit the pylon_cyc.py and change

Lines 140-141:

for interface, channel in [

('socketcan', 'vcan0'),

into:

for interface, channel in [

('socketcan', 'can0'),

After that run the pylon_can.py script with the command:

python pylon_can.py

which will look like this:

temp


Home Assistant

Home Assistant Relevant Information


Pylontech switch off / wake up per Remote control

I found by coincidence the explanations of how it is done: Using the CONSOLE port of the battery.

Console Pinout

connect Pin4 (+5~+12V) with Pin5 (GND) for wake up Wake up signal must be ≥0.5Sec, current must be between 5~15mA.

Here is a good video example of somebody using the console port to do the firmware update, it provides information about the communication by Terminal.

Pylontech US2000C auslesen und Firmware Update via RS232

Here is somebody explaining (in German) how he remote controls the powering up of the battery:

Solar – Pylontech Akku (C-Serie) über Konsole aufwecken

Instructions in English are available on Github: Pylontech C Series Monitoring & Wakeup

IMG_8625-225x300 Piggy Back Board

Just in case it is of use for somebody.


Here is some information about the voltage of the Pylontech US series

Users have reported that even with 52,8V charging voltage, max. SOC % reaches 98% so, take the information below as guidance, rather than absolute rule.

00 Spannungen der Pylontech US-Serie


Have also a look there: Battery Tipps

Clone this wiki locally