diy solar

diy solar

Victron VenusOS driver for serial connected BMS - JBD / Daly / ANT / JKBMS / Heltec / Renogy / Tian / ECS

I have not seen their comms protocol published anywhere. If can find their protocol I can add them to the list.
This is all I could find. Not sure if it applies to their batteries.
 

Attachments

  • ROVER MODBUS.pdf
    328.2 KB · Views: 50
Quick Question:
Do I also need a shunt in my system if my BMS is being monitored? I was going to use the Victron Smartshunt until I found this.
More details:
I am building 2 - 12V 310Ah banks with a JDB BMS on each. My system will be monitored with a Raspberry Pi 4 with VenusOS. I want to get the JBD BMS communicating with the Pi using this method.
My system will be wired mostly like this:
 
Quick Question:
Do I also need a shunt in my system if my BMS is being monitored? I was going to use the Victron Smartshunt until I found this.
More details:
I am building 2 - 12V 310Ah banks with a JDB BMS on each. My system will be monitored with a Raspberry Pi 4 with VenusOS. I want to get the JBD BMS communicating with the Pi using this method.
My system will be wired mostly like this:
I can't speak for the JBD BMS, but I would use a shunt. My Daly is very inaccurate showing amps in or out. Using voltage as a SOC is not that accurate for LiFePO4 cells or packs. You have the Pi already, only makes sense to track in/out for the packs.
 
Quick Question:
Do I also need a shunt in my system if my BMS is being monitored? I was going to use the Victron Smartshunt until I found this.
More details:
I am building 2 - 12V 310Ah banks with a JDB BMS on each. My system will be monitored with a Raspberry Pi 4 with VenusOS. I want to get the JBD BMS communicating with the Pi using this method.
My system will be wired mostly like this:
The JBD does have a shunt built it. Once you set up your BMS with the size cells you have I find it very accurate.
It does not use the voltages for SOC. As such when you begin with the BMS it will assume a starting SOC and calculate the min/max from there. This will naturally not be 100% what the cells are at, so I found that it will block charge with the first full charge and then reset the SOC from there. The BMS will also adjust your battery capacity (default is max 10%) if you set it wrong.
 
Just stumbled across this. Fantastic work! Would be great if this could work with the DIYBMS. Stuart, the dev behind DIYBMS, just released a new controller board that uses RS485 but its not enabled yet on the software side. Would be great if they worked together!
 
@Louisvdw I created a python app that logs from the JDB via bluetooth using gatt, works perfectly but I hadn't been able to extend it to add the battery on Venus OS because it only has python 2.7. Do you intend to implement an option for a bluetooth connection?
 
Do you intend to implement an option for a bluetooth connection
Hi Dave
I was planning to extend the driver to use bluetooth at some stage.

With the latest VenusOS release bluetooth is now available on the GX devices. The Pi2/3 and P4 versions had the bluetooth disabled before, so this was never feasible. For official GX devices a bluetooth dongle will have to be used, but it is possible
I also know that Victron is busy with upgrading the VenusOS to use Python 3, but there is no ETA on that yet. For now we are on python 2.7 so gatts will not work yet.
 
Hi Dave
I was planning to extend the driver to use bluetooth at some stage.

With the latest VenusOS release bluetooth is now available on the GX devices. The Pi2/3 and P4 versions had the bluetooth disabled before, so this was never feasible. For official GX devices a bluetooth dongle will have to be used, but it is possible
I also know that Victron is busy with upgrading the VenusOS to use Python 3, but there is no ETA on that yet. For now we are on python 2.7 so gatts will not work yet.
Excellent news! If you want a hand with anything please let me know, I’d be happy to contribute.
Python 3 would be a dream, I hope they include it soon.
I’m aware that I could use the bluez dbus api with 2.7, I did a bit more exploration on that last night and I’ll see if I have time over the next few days.
Is it possible to install python3 manually on Venus OS? So far it’s been difficult to work with because it’s so restrictive.
 
I have tried to keep the driver as lean as possible without many refences. If someone need to install it too many funnies will make it difficult and I want to make it as easy as possible.
I am sure you should be able to get Python 3 running, but it will take a bit of effort
 
  • Like
Reactions: Dzl
This sounds fabulous for removing redundancy (shunt in BMS AND an external shunt) and potential failure points. Does it work completely seamlessly? IOW does it look like you're running a Victron Smart Shunt from your GX device screens?

Thanks for the hard work, @Louisvdw !
 
Another vote for Bluetooth support.

Can the UART module of the Overkill / JBD BMS be plugged directly into a Raspberry Pi or does it need an RS485 cable / adaptor?
 
Can the UART module of the Overkill / JBD BMS be plugged directly into a Raspberry Pi or does it need an RS485 cable / adaptor?
You need either a RS485 or RS232 to USB adapter depending on your BMS model.
If you want to plug it directly to the Pi's GPIO pins you will need to write code to handle that.
 
@Louisvdw , I am hoping I can get some feedback from you on my linked post.
 
Hi Dave
I was planning to extend the driver to use bluetooth at some stage.

With the latest VenusOS release bluetooth is now available on the GX devices. The Pi2/3 and P4 versions had the bluetooth disabled before, so this was never feasible. For official GX devices a bluetooth dongle will have to be used, but it is possible
I also know that Victron is busy with upgrading the VenusOS to use Python 3, but there is no ETA on that yet. For now we are on python 2.7 so gatts will not work yet.
Hello!
Logging via Bluetooth would be awsome. Besides avoiding all the wiring - I am using 2 parallel banks in Summer, planning on 4 banks in Winter - I was hopeful that one could also be able at same time (briefly) to use the default Phone App "Xiaoxiang" to take a look at extra parameters of the BMS. Do you think this could be viable?
 
use the default Phone App "Xiaoxiang" to take a look at extra parameters of the BMS
You can do this currently if the model of your BMS has a seperate serial port.
Normally the bluetooth is connected to an UART port. If your BMS comes with the seperate RS485 port and you use the RS485 USB cable to connect it with the Victron GX system then you can use the bluetooth and Xiaoxiang app as well without issue.
But if you need to unplug the bluetooth module to connect to the GX, then it is not currently possible. There is a ticket to look at this but it is very low priority.

2 parallel banks in Summer, planning on 4 banks
This is currently not handled yet, but when my second BMS arrives from China I plan to look at handling more banks.
 
You can do this currently if the model of your BMS has a seperate serial port.
Normally the bluetooth is connected to an UART port. If your BMS comes with the seperate RS485 port and you use the RS485 USB cable to connect it with the Victron GX system then you can use the bluetooth and Xiaoxiang app as well without issue.
But if you need to unplug the bluetooth module to connect to the GX, then it is not currently possible. There is a ticket to look at this but it is very low priority.
Thanks for your reply!
Just to be clear what I meant..., I'm not sure if we are saying the same.

I currently use the only UART port available on the BMS (that I am aware of) to connect to the GX device via USB (using the adapter box). I also have the Bluetooth dongle that I can use, but of course, not at same time.
What I meant is this:
- If one could put the Raspberry Pi (my current GX device) to connect to the BMS via Bluetooth instead of plain wired serial, then I could ditch the USB adapter board and just let the Bluetooth dongle permanently connected to the BMS UART. And, maybe, just maybe, we could read the values with your driver (via Bluetooth) and still be able to use my Smartphone to take a peek with the original App.

Is this what you had in mind too?
 
Is this what you had in mind too?
Correct, that is what I describe in the quote below.
But if you need to unplug the bluetooth module to connect to the GX, then it is not currently possible. There is a ticket to look at this but it is very low priority.
There is a ticket to look into that, but not soon. Up to a few versions ago the GX image did not support bluetooth on the Raspberry Pi and Victron's GX devices does not have bluetooth at all so this was only possible with an external bluetooth dongle, drivers and lots of fiddling (not an easy option for everyone to do).
The latest Pi4 image does have bluetooth support, and my one BMS also onel have the single UART so I might possible look at this in the future.
 
There is a new beta build v0.5beta* for the initial Daly BMS integration for those that want to test it and give feedback.
This build should work for both the RS485 and UART connection, updates the battery SOC, voltage and current in the GX device.

Download the venus-data.tar.gz from the latest beta and FTP it to your GX/pi.
Extract using tar -zxf venus-data.tar.gz -C /data
Reboot and let me know if it works.
I've had feedback from a few users using the 8cell models that it works.
 
Back
Top