diy solar

diy solar

JBD BMS Wi-Fi Module

Yes ... that's what this project is

Can this be used on windows and use the mqtt function? Or it only works for Linux?
 
Yes ... that's what this project is

I have the JDB for 8 cells and it works fine. It has the RS485 so I went and bought me an RS485 to Ethernet, that way and using USR Virtual Comm I'm able to use the JDBTOOL from my computer on windows. I would like to use the Linux version on a container to publish the MQTT topic and then being able to import the info from the BMS into Home Assistant.

Is it possible to do what I want? I'm not a programmer but I maybe able to put this tool into a container.

What I would like to know is how to use the MQTT part of the tool
 
I have the JDB for 8 cells and it works fine. It has the RS485 so I went and bought me an RS485 to Ethernet, that way and using USR Virtual Comm I'm able to use the JDBTOOL from my computer on windows. I would like to use the Linux version on a container to publish the MQTT topic and then being able to import the info from the BMS into Home Assistant.

Is it possible to do what I want? I'm not a programmer but I maybe able to put this tool into a container.

What I would like to know is how to use the MQTT part of the tool
Or if anyone knows how to get the information out of this and directly to home assistant, I'm all ears (or ?)!
 
Dear god this thread is amazing. I too want to know how to attach JBD BMS via ethernet to publish MQTT topics. I assume I’ll have to write it myself so far.
 
Can this be used on windows and use the mqtt function? Or it only works for Linux?

Yes, it can be used on Windows. This project describes how to make the WiFI module. There is a separate project for the program (jbdtool) to collect data from the BMS.
 
Dear god this thread is amazing. I too want to know how to attach JBD BMS via ethernet to publish MQTT topics. I assume I’ll have to write it myself so far.

jbdtool will collect the data from the bms over wifi (tcp/ip) and publish to an mqtt server
Yes, it can be used on Windows. This project describes how to make the WiFI module. There is a separate project for the program (jbdtool) to collect data from the BMS.

Here is the windows binary. If you have built the Wifi module and the module's IP address is 192.168.0.1 and your MQTT server is 192.168.0.2 and you want to publish the data to Powerwall/Battery1 using the clientID of Bat1, then you would use this command:

Code:
jbdtool.exe -t ip:192.168.0.1 -m 192.168.0.2:Bat1:Powerwall/Battery1

You can also use the serial port COM6 using the same MQTT info:

Code:
jbdtool.exe -t serial:COM6 -m 192.168.0.2:Bat1:Powerwall/Battery1
 

Attachments

  • jbdtool_win32.zip
    335.9 KB · Views: 36
Here is the JBD windows binary for Solar Director. It will run in the background and continuously collect info from the bms and publish it to MQTT. It will also allow you to change configurations settings over MQTT simply by publishing to a topic (no special tools required).

The syntax on the command line is different than that of jbdtool. Using the same info from post #86, here's how you would run it:

Code:
jbd -t ip,192.168.0.1 -m 192.168.0.2
 

Attachments

  • jbd.zip
    1.2 MB · Views: 16
I have the JDB for 8 cells and it works fine. It has the RS485 so I went and bought me an RS485 to Ethernet, that way and using USR Virtual Comm I'm able to use the JDBTOOL from my computer on windows. I would like to use the Linux version on a container to publish the MQTT topic and then being able to import the info from the BMS into Home Assistant.

Is it possible to do what I want? I'm not a programmer but I maybe able to put this tool into a container.

What I would like to know is how to use the MQTT part of the tool

Here's the linux x86_64 version of jbdtool. See post #86 for usage.
 

Attachments

  • jbdtool_linux64_static.zip
    1 MB · Views: 20
OMG, so many tools to try now!
Thanks!

A question: Which TCP port is the utility using when connecting to the WiFi module?
 
Yes, it can be used on Windows. This project describes how to make the WiFI module. There is a separate project for the program (jbdtool) to collect data from the BMS.
Link to the project? There are many on the results now, and many share the same name
 
I use Home Assistant on a a HASSIO VM inside my Synology NAS, seems to be the best suited version for my little knowledge :)

Which means it's probably running debian ... maybe - you'd have to link the VM image you loaded
 
jbdtool will collect the data from the bms over wifi (tcp/ip) and publish to an mqtt server


Here is the windows binary. If you have built the Wifi module and the module's IP address is 192.168.0.1 and your MQTT server is 192.168.0.2 and you want to publish the data to Powerwall/Battery1 using the clientID of Bat1, then you would use this command:

Code:
jbdtool.exe -t ip:192.168.0.1 -m 192.168.0.2:Bat1:Powerwall/Battery1

You can also use the serial port COM6 using the same MQTT info:

Code:
jbdtool.exe -t serial:COM6 -m 192.168.0.2:Bat1:Powerwall/Battery1
Thanks for this information.
Hey Mama! Look what I did!

I'm using an USR-DR302 and here's how I set it up for working with this tool:
First, IP parameters:
1623288842265.png
Then, serial parameters:
1623288483380.png

Then I ran the jbdtool.exe with this commands:
Code:
jbdtool.exe -d 2 -t ip:172.16.10.99 -m 172.16.9.12:GABO-WORKSTATION:LIFEPO4

With this, I got the data on the cmd window, excellent!

Code:
main(788): transport: 00FF0F78, target: 00FF0F7B
main(813): transport: ip
ip_init(48): initializng winsock...
main(816): tp: 004184A0
main(819): cp: 004183C0
jbd_new(424): pp->target: 172.16.10.99, pp->opts:
ip_new(69): target: 172.16.10.99
main(831): charge: -1, discharge: -1
main(855): mqtt: 00FF0FA0
main(865): broker: 172.16.9.12, clientid: GABO-WORKSTATION, topic: LIFEPO4, user: , pass:
mqtt_new(42): address: 172.16.9.12, clientid: GABO-WORKSTATION, topic: LIFEPO4
mqtt_new(59): returning: 0262EE90
mqtt_connect(67): s: 0262EE90, interval: 20, user: , pass:
mqtt_connect(79): rc: 0
mqtt_disconnect(96): timeout: 10
mqtt_disconnect(100): rc: 0
main(898): outfp: 75C84660
jbd_open(435): opening...
ip_open(97): s->sock: FFFFFFFF
ip_open(100): creating socket...
jbd_get_info(263): transport: ip
ip_write(196): s->sock: 00000198
ip_write(201): bytes: 7
ip_read(179): debug: 2
jbd_std_get_info(172): voltage: 26.17
jbd_std_get_info(173): current: -11.50
jbd_std_get_info(174): capacity: 57.37
jbd_std_get_info(179): fullcap: 100.00
jbd_std_get_info(180): cycles: 3
jbd_std_get_info(181): pctcap: 39
jbd_std_get_info(196): balance: 0000000000000000
jbd_std_get_info(212): protect: 0000000000000000
jbd_std_get_info(224): fetstate: 3
jbd_std_get_info(225): mfgdate: 20200904
jbd_std_get_info(226): version: 2.2
jbd_std_get_info(230): strings: 8
jbd_std_get_info(231): probes: 2
jbd_std_get_info(236): temp[0]: 2992
jbd_std_get_info(236): temp[1]: 2991
jbd_std_get_info(242): temp 0: 32.470
jbd_std_get_info(242): temp 1: 32.468
ip_write(196): s->sock: 00000198
ip_write(201): bytes: 7
ip_read(179): debug: 2
ip_write(196): s->sock: 00000198
ip_write(201): bytes: 7
ip_read(179): debug: 2
jbd_get_info(271): r: 0
jbd_get_info(280): cell 0: 3.272
jbd_get_info(280): cell 1: 3.271
jbd_get_info(280): cell 2: 3.274
jbd_get_info(280): cell 3: 3.271
jbd_get_info(280): cell 4: 3.274
jbd_get_info(280): cell 5: 3.271
jbd_get_info(280): cell 6: 3.272
jbd_get_info(280): cell 7: 3.273
jbd_get_info(288): cells: total: 26.178, min: 3.271, max: 3.274, diff: 0.003, avg: 3.272
display_info(498): temp: [ 26.1,26.0 ]
display_info(520): temp: [ 3.272,3.271,3.274,3.271,3.274,3.271,3.272,3.273 ]
mqtt_new(42): address: 172.16.9.12, clientid: GABO-WORKSTATION, topic: LIFEPO4
mqtt_new(59): returning: 0262DB50
mqtt_connect(67): s: 0262DB50, interval: 20, user: , pass:
mqtt_connect(79): rc: 0
mqtt_send(116): message: {"Name":"GABO-WORKSTATION","Voltage":26.170000076293945,"Current":-11.5,"DesignCapacity":100,"RemainingCapacity":57.369998931884766,"PercentCapacity":57,"CycleCount":3,"Probes":2,"Temps":[26.100000000000001,26],"Strings":8,"Cells":[3.2719999999999998,3.2709999999999999,3.274,3.2709999999999999,3.274,3.2709999999999999,3.2719999999999998,3.2730000000000001],"CellTotal":26.177999496459961,"CellMin":3.2709999084472656,"CellMax":3.2739999294281006,"CellDiff":0.0030000209808349609,"CellAvg":3.2722499370574951,"DeviceName":"15300051-SP10S009-L8S-100A","ManufactureDate":"20200904","Version":2.2000000476837158,"FET":"Charge,Discharge"}, timeout: 10
mqtt_send(123): rc: 0
mqtt_send(129): rc: 0
mqtt_send(134): delivered message.
mqtt_disconnect(96): timeout: 10
mqtt_disconnect(100): rc: 0

Just need to figure out how to use mqtt, as I have never used it before, but this should be simple enough for me to do it on home-assistant with their guides.

Thank you everyone that helped on this topic.
I know the topic is for the WiFi module, but a lot of what you did also applies for RS485 with this BMS and any RS485 to Ethernet adapter!
I'm really happy with this BMS, now I'm going to buy another one for my other battery!
 
Back
Top