TM48
Solar Wizard
Question: why connect to each battery when RS485 is a daisy chain addressed type configuration?
Right you are, I wasn't sure it would work, but it works fine. I can talk to batteries 4, 5, and 6 and get all their stats, now I'm parsing the numbers I can figure out to load Redis and MQTT and (somewhere in there) SQL. I've got parts on order to hook the other 3 batteries in, but there's some question of what happens when I talk RS485 to battery 1, will it respond like an individual battery, or do I have to talk the (undocumented) multi-battery-of-which-this-is-the-primary modbus-ish protocol? I should know soon enough...Question: why connect to each battery when RS485 is a daisy chain addressed type configuration?
PP.py V1.2 11/04/2024 WPNS at 2024/11/04 09:22:48
Connected to MQTT Broker!
found it at /dev/ttyUSB1
Batt04
Battery Voltage: 53.12
Batt05
Battery Voltage: 53.03
Batt06
Battery Voltage: 53.04
Yeah Me too.so I'm hoping talking to the batteries with Modbus on the RS485/CAN ports won't cause any issues...
root@sand:/home/MQTT# redis-get.py | grep Batt0
EG4_PP.Batt04.AH 179
EG4_PP.Batt04.CellmV.Cell00mV 3282
EG4_PP.Batt04.CellmV.Cell01mV 3283
EG4_PP.Batt04.CellmV.Cell02mV 3284
EG4_PP.Batt04.CellmV.Cell03mV 3284
EG4_PP.Batt04.CellmV.Cell04mV 3283
EG4_PP.Batt04.CellmV.Cell05mV 3283
EG4_PP.Batt04.CellmV.Cell06mV 3283
EG4_PP.Batt04.CellmV.Cell07mV 3283
EG4_PP.Batt04.CellmV.Cell08mV 3281
EG4_PP.Batt04.CellmV.Cell09mV 3284
EG4_PP.Batt04.CellmV.Cell10mV 3282
EG4_PP.Batt04.CellmV.Cell11mV 3284
EG4_PP.Batt04.CellmV.Cell12mV 3283
EG4_PP.Batt04.CellmV.Cell13mV 3284
EG4_PP.Batt04.CellmV.Cell14mV 3282
EG4_PP.Batt04.CellmV.Cell15mV 3283
EG4_PP.Batt04.Current -12.5
EG4_PP.Batt04.Cycles 145
EG4_PP.Batt04.SOC 64
EG4_PP.Batt04.SOH 100
EG4_PP.Batt04.Temp0 32
EG4_PP.Batt04.Temp1 33
EG4_PP.Batt04.Temp2 34
EG4_PP.Batt04.Voltage 52.52
EG4_PP.Batt04.mVdelta 3283
EG4_PP.Batt05.AH 176
EG4_PP.Batt05.CellmV.Cell00mV 3281
EG4_PP.Batt05.CellmV.Cell01mV 3284
EG4_PP.Batt05.CellmV.Cell02mV 3283
EG4_PP.Batt05.CellmV.Cell03mV 3283
EG4_PP.Batt05.CellmV.Cell04mV 3282
EG4_PP.Batt05.CellmV.Cell05mV 3284
EG4_PP.Batt05.CellmV.Cell06mV 3283
EG4_PP.Batt05.CellmV.Cell07mV 3284
EG4_PP.Batt05.CellmV.Cell08mV 3283
EG4_PP.Batt05.CellmV.Cell09mV 3283
EG4_PP.Batt05.CellmV.Cell10mV 3282
EG4_PP.Batt05.CellmV.Cell11mV 3283
EG4_PP.Batt05.CellmV.Cell12mV 3282
EG4_PP.Batt05.CellmV.Cell13mV 3283
EG4_PP.Batt05.CellmV.Cell14mV 3281
EG4_PP.Batt05.CellmV.Cell15mV 3284
EG4_PP.Batt05.Current -11.1
EG4_PP.Batt05.Cycles 144
EG4_PP.Batt05.SOC 63
EG4_PP.Batt05.SOH 100
EG4_PP.Batt05.Temp0 33
EG4_PP.Batt05.Temp1 33
EG4_PP.Batt05.Temp2 33
EG4_PP.Batt05.Voltage 52.52
EG4_PP.Batt05.mVdelta 3284
EG4_PP.Batt06.AH 184
EG4_PP.Batt06.CellmV.Cell00mV 3282
EG4_PP.Batt06.CellmV.Cell01mV 3284
EG4_PP.Batt06.CellmV.Cell02mV 3283
EG4_PP.Batt06.CellmV.Cell03mV 3285
EG4_PP.Batt06.CellmV.Cell04mV 3283
EG4_PP.Batt06.CellmV.Cell05mV 3285
EG4_PP.Batt06.CellmV.Cell06mV 3283
EG4_PP.Batt06.CellmV.Cell07mV 3283
EG4_PP.Batt06.CellmV.Cell08mV 3282
EG4_PP.Batt06.CellmV.Cell09mV 3284
EG4_PP.Batt06.CellmV.Cell10mV 3282
EG4_PP.Batt06.CellmV.Cell11mV 3285
EG4_PP.Batt06.CellmV.Cell12mV 3284
EG4_PP.Batt06.CellmV.Cell13mV 3285
EG4_PP.Batt06.CellmV.Cell14mV 3283
EG4_PP.Batt06.CellmV.Cell15mV 3284
EG4_PP.Batt06.Current -10.4
EG4_PP.Batt06.Cycles 143
EG4_PP.Batt06.SOC 66
EG4_PP.Batt06.SOH 100
EG4_PP.Batt06.Temp0 32
EG4_PP.Batt06.Temp1 33
EG4_PP.Batt06.Temp2 33
EG4_PP.Batt06.Voltage 52.53
EG4_PP.Batt06.mVdelta 3284
root@sand:/home/MQTT#
I guess you would need to buy cables for every single battery and use the USB ports on the SA Pi. If it would work from master CAN, they/him would not earn more money?SA https://solar-assistant.io/help/battery/canbus states "When multiple batteries are connected in parallel they will display as one large battery. Per pack metrics via CAN bus might be available in future." Vague and disappointing. We need this feature.
Btw. do you have published your python script to read out the EG4-LL battery data via modbus somewhere (github?) - maybe I've missed it. Have you ever used modbus via ESPHome?Found some other battery Modbus data (thank you @fmeili1 !)
Now to rewrite everything, and then I can start logging. 8*)
Looks great!Using ESP32 devices to pull data from four different batteries (SOK Rack, Sungold Wall Mount, RUIXU Rack, and DIY's w/JK Inverter BMS) and able to display full cell data and set some parameters the code for the ESP2 devices is on github. I am pulling data and monitoring over 21 batteries in real time - Example below:
View attachment 283198View attachment 283199
Ruixu - https://github.com/easybotics/esphome-ruixu-bmsLooks great!
Can you provide a link to the github project?
Is it an ESPHome project or Arduino code?
Thanks!
Just posted it to:Btw. do you have published your python script to read out the EG4-LL battery data via modbus somewhere (github?) - maybe I've missed it. Have you ever used modbus via ESPHome?
I use my Modbus interface as a Master, so there's no address setting required (there can be only one).I have the spec, but I've never programmed modbus by myself and need a bit of a kick-start... as far as I understand, I need to set the modbus controller in the ESPHome program as a "Modbus client" (master?) to "sniff" the existing data which SA gets already from the batteries. Beside the baud rate (the EG4-LL spec says 9600 bps) I need to set a modbus address for the ESPHome controller itself (which address do you use?). After that I can just configure ESPHome sensors by specifying the modbus register as the address - still need to find out how to identify the different batteries via ESPHome modbus.