tomatensaus / bms

Raspberry PI intelligent inverter control
MIT License
2 stars 0 forks source link

Daly BMS to Growatt #1

Open sanitariu opened 11 months ago

sanitariu commented 11 months ago

Hello, I have Daly BMS 16S 48V 200A connected to Pi device. I have also Growatt Inverter connected to the same pi device. I am able to read info from both devices and my problem is that i can not find a way to make the talk each other. If this possible with direct or some emulated protocols ? I have tried part of your software and this is the output:

python dalyUsbRetry.py DALY BMS DATA COMMUNICATION PROGRAM Press y for raw data only y bytearray(b'\xa5\x01\x90\x08\x02\x1b\x00\x00v\x93\x02\xc8.') 0x90 byte 0-1: 539 0x90 byte 2-3: 0 0x90 byte 4-5: 30355 0x90 byte 6-7: 712 bytearray(b'\xa5\x01\x91\x08\r0\x10\r)\x01\x02\xc8\x8d') 0x91 byte 0-1: 3376 0x91 byte 1: 16 0x91 byte 3-4: 3369 0x91 byte 5: 1 bytearray(b'\xa5\x01\x92\x08D\x01D\x01)\x01\x02\xc8\xbe') 0x92 byte 0: 68 0x92 byte 1: 1 0x92 byte 2: 68 0x92 byte 3: 1 bytearray(b'\xa5\x01\x93\x08\x01\x01\x01\x1e\x00\x03\n\xc0/') 0x93 byte 0: 1 0x93 byte 1: 1 0x93 byte 2: 1 0x93 byte 3: 30 0x93 byte 4-7: 3 bytearray(b'\xa5\x01\x94\x08\x10\x01\x00\x00\x00\x00?2\xc4') 0x94 byte 0: 16 0x94 byte 1: 1 0x94 byte 2: 0 0x94 byte 3: 0 0x94 byte 4: 0 0x94 byte 5-6: 63 Traceback (most recent call last): File "/root/bms/dalyUsbRetry.py", line 331, in bms.rawprintall() File "/root/bms/dalyUsbRetry.py", line 169, in rawprintall print(self.D0x95) AttributeError: 'DalyBms' object has no attribute 'D0x95'

Seems like it is missin D0x95 ? Also where we can find information about the returned values ? Thanks !

tomatensaus commented 11 months ago

0x95 returns the individual cell voltages.

This project was pretty much a proof of concept, at some stage it was used to update the SOC and charge current on a Deye inverter (for one of my friends). Rasp Pi was used to run the python script A CANBUS Hat and sent CANBUS updates to the inverter. RS485-To-USB cable was used to collect the values from the Daly BMS.

Since both Deye and Growatt support the PylonTech CANBUS protocol it should work (in theory)

Also note that the code does not use async io in python, there will be missed messages. These days I have switched over to using microcontrollers (ESP32) and c++ for everything communication related

My Daly BMS is connected directly to my Deye inverter via CANBUS and updates the SOC without the need for any external translation. (Not sure what protocol is used but it is the Lithium-00 profile on the DEYE)

sanitariu commented 11 months ago

Thank you very much for the information. Could you tell me which pins you are using for the CAN at Daly side ? CAN_H / CAN_L ? According to my info it is ping 4,5 at Daly. So i connect CAN_H from Daly to CAN_H my inverter and then the same for CAN_L. After that i choose the protocols at inverter side and it should work.

Daly-BMS

Is this the way you did it ? Anything special like turn on/off something ?

tomatensaus commented 11 months ago

Optional means: you do not need to connect anything to this port, bms with function without. You must connect the NTC (temperature sensor)

I connected the CAN/RS485 port on the BMS PIN4,5 to the RJ45 pins matching my inverter CAN_H and CAN_L and selected the correct communication protocol on the inverter. The correct battery SOC started showing on my inverter. My BMS looks exactly the same as the picture.

tomatensaus commented 11 months ago

@sanitariu Did you manage to get your bms communicating with the inverter?

tomatensaus commented 10 months ago

An to anyone looking at this thread for answers because you had the same issue take note.

This is what is wrong with Humanity. People ask for help, they receive help from a total stranger sharing their experience. Once they solve their own problem they do not bother to respond. They simply take and give nothing in return. The attitude "As long as I am sorted other people can struggle on their own".

https://en.wikipedia.org/wiki/Narcissism

Do not be that person