Snuffleupagus Posted April 16, 2022 Posted April 16, 2022 Good day people of the forum, I would appreciate if some of the technically enlightened on this forum could share some advice or experience on a challenge that I am currently facing. I recently set up a Pi monitoring solution for my Sunsynk inverter, querying the modbus registers via a nodejs script, then scraping with Prometheus and graphing with Grafana. All of that is working 100% and I am very happy with the setup. However the inverter's info on the battery is very minimal. It reports the SOC, total voltage and temperature. I was wondering if I could extract some more detailed info from the BMS itself, such as individual cell voltages. The battery I have is a Dyness A48100. It communicating just fine with the inverter via its CAN port. But I see it has a second com port (6P4C) that according to the manual uses RS232: So I crimped a 6P4C connection according to the pin diagram in the manual, and connected it to my RS232 to USB converter. However I am getting no response from the battery with my usual diagnostic test. It also didn't seem to respond to modbus queries. Swapping the RX and TX pins also didn't help. So now to anyone who may know: what kind of com protocol does the Dyness BMS use? Does it require additional configuration that I might be missing? I would be grateful if anyone has some protocol specification I can take a look at. Quote
Dyness Posted April 24, 2022 Posted April 24, 2022 On 2022/04/16 at 6:15 PM, Sir Rodgers said: Good day people of the forum, I would appreciate if some of the technically enlightened on this forum could share some advice or experience on a challenge that I am currently facing. I recently set up a Pi monitoring solution for my Sunsynk inverter, querying the modbus registers via a nodejs script, then scraping with Prometheus and graphing with Grafana. All of that is working 100% and I am very happy with the setup. However the inverter's info on the battery is very minimal. It reports the SOC, total voltage and temperature. I was wondering if I could extract some more detailed info from the BMS itself, such as individual cell voltages. The battery I have is a Dyness A48100. It communicating just fine with the inverter via its CAN port. But I see it has a second com port (6P4C) that according to the manual uses RS232: So I crimped a 6P4C connection according to the pin diagram in the manual, and connected it to my RS232 to USB converter. However I am getting no response from the battery with my usual diagnostic test. It also didn't seem to respond to modbus queries. Swapping the RX and TX pins also didn't help. So now to anyone who may know: what kind of com protocol does the Dyness BMS use? Does it require additional configuration that I might be missing? I would be grateful if anyone has some protocol specification I can take a look at. Hi You can contact me first,I will communicate your request to our technical director.. whatsapp:+8617625812876 e-mail:[email protected] Thank you Quote
lombardy Posted June 14, 2022 Posted June 14, 2022 Just curious, did you ever manage to figure out how to communicate via the COM port? I'm also trying to do the same... Quote
Snuffleupagus Posted July 1, 2022 Author Posted July 1, 2022 On 2022/06/14 at 6:09 PM, lombardy said: Just curious, did you ever manage to figure out how to communicate via the COM port? I'm also trying to do the same... I contacted [email protected] with my questions and got a response containing monitoring software that they use with their batteries. You can find the files here: https://drive.google.com/file/d/1hSka8UvoSMR2WizIR3u58ZHuIAa3Q9Xh/view?usp=sharing Looks like "MYCanProtocol/MYBMSCanProtocol.cs" is the file with most of the protocol decoding info for both CAN and RS232. With the software you should be able to read info like cell voltages and alarms. I am trying to port some of it to NodeJS so I can run it on my Raspberry Pi, since that is already monitoring the inverter. power.esrl3 1 Quote
power.esrl3 Posted July 1, 2022 Posted July 1, 2022 36 minutes ago, Snuffleupagus said: I contacted [email protected] with my questions and got a response containing monitoring software that they use with their batteries. You can find the files here: https://drive.google.com/file/d/1hSka8UvoSMR2WizIR3u58ZHuIAa3Q9Xh/view?usp=sharing Looks like "MYCanProtocol/MYBMSCanProtocol.cs" is the file with most of the protocol decoding info for both CAN and RS232. With the software you should be able to read info like cell voltages and alarms. I am trying to port some of it to NodeJS so I can run it on my Raspberry Pi, since that is already monitoring the inverter. Wow, it includes source code? Quote
Snuffleupagus Posted July 1, 2022 Author Posted July 1, 2022 53 minutes ago, power.esrl3 said: Wow, it includes source code? Eh... not officially. They only sent me the compiled program, but since it is made with .NET I was able to decompile it with ILSpy to see the code. I needed to understand how they make the protocol level messages since I want to make my own monitoring script. power.esrl3 and Tsa 2 Quote
Skillet Posted October 3, 2022 Posted October 3, 2022 Hey @Snuffleupagus Did you end up getting this up and running? I have 2 x BX51100 batteries and would like to get more info from them as well. Quote
Tsa Posted April 17, 2023 Posted April 17, 2023 (edited) On 2022/07/01 at 1:35 PM, Snuffleupagus said: Eh... not officially. They only sent me the compiled program, but since it is made with .NET I was able to decompile it with ILSpy to see the code. I needed to understand how they make the protocol level messages since I want to make my own monitoring script. Would also like to know if you got this to work. I am specifically looking for stats on cycles and SOH. Question being what pins to connect to the USB RS232 connector. Thanks Edited April 17, 2023 by Tsa Quote
AndySu Posted April 18, 2023 Posted April 18, 2023 (edited) On 2023/04/17 at 10:44 AM, Tsa said: Would also like to know if you got this to work. I am specifically looking for stats on cycles and SOH. Question being what pins to connect to the USB RS232 connector. Thanks try this connect 3wires rx,tx,and gnd - important! and use usb/rs232 converter (not ttl!) Edited April 18, 2023 by AndySu Quote
Tsa Posted May 5, 2023 Posted May 5, 2023 On 2023/04/18 at 11:28 AM, AndySu said: try this connect 3wires rx,tx,and gnd - important! and use usb/rs232 converter (not ttl!) Thanks @AndySu, I was wrong. The B4850 does not have a COM/console port, so RS485 is the only option. I now have a RS485 USB cable and using the PIN1 and PIN3 as per the photo below. Now the next question is which DIP switch optoin on the battery? I am guessing 0110 for RS485? Also what software to use for RS485 comms? Quote
AndySu Posted May 11, 2023 Posted May 11, 2023 (edited) On 2023/05/05 at 3:03 PM, Tsa said: Now the next question is which DIP switch optoin on the battery? I am guessing 0110 for RS485? Also what software to use for RS485 comms? If you use can protocol need set the dip switch to 0010, use 485 protocol need to set the dip switch to 0100. (answer from dyness manufacturer) for reading i prefer use python scripts like this https://github.com/Frankkkkk/python-pylontech in rs485 dyness use whole pylontech protocol - search public info (pylon rs485 protocol ver 2.8) Edited May 11, 2023 by AndySu Tsa 1 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.