SBMS0 bug with MQTT

38 views
Skip to first unread message

Sasa Duric

unread,
Jun 26, 2024, 12:44:42 PMJun 26
to electrodacus
I am monitoring SBMS0 trough MQTT. In Home Assistant I monitoring all that SBMS0 is forwarding to my server. One thing is not working as it should.
To eliminate possible my fault in Home Assistant configuration, I have first checked incoming traffic using MQTT explorer.

Here you can see SBMS is showing current of PV, BATTERY and LOAD

PXL_20240624_164459300.jpg

But, if the LOAD current is smaller than PV current, SBMS0 is sending Load current=0A

Screenshot_20240624-184445.png

If the LOAD current is bigger than PV current, SBMS0 is sending the LOAD current value.

Screenshot_20240625-071143.png

If charging is finished and PV=0A, SBMS0 is sending the LOAD current value.

Screenshot_20240624-185119.png

Dacian Todea (electrodacus)

unread,
Jun 26, 2024, 1:58:05 PMJun 26
to electrodacus
Sasa,

The SBMS0 splits the Load in two types. BatterytoLoad what you are displaying and PVtoLoad in the SBMS0 you can see those in the graph's
You can display the total Load value same as on SBMS0 monitoring screen by subtracting the PV current from battery current.

So 
case 1
 3.914A - (+0.27A) = 3.644A
case 2
2.033A - (-52.328) = 54.361A
case 3
0 - (-3.4) = 3.4A    (the small difference 3.4 - 3.381A = 0.019A is the SBMS0 calculated self consumption ).

There is no calculated total load in the SBMS0 data so you need to calculate that before displaying.

Sasa Duric

unread,
Jun 27, 2024, 10:02:09 AMJun 27
to electrodacus
Dacian,

hanks for the answer, but it was clear I could calculate that in Home Assistant. What confuses me is that following data is coming from SBMS0 MQTT, and "extLoad" corresponds to the calculated load value. So, not sure why would I calculate the Load current if it is already sent to the server.
 
 "currentMA":{"battery":5598,"pv1":5442,"pv2":0,"extLoad":0}

"extLoad" data is not 0 only if it`s value is bigger than pv1 value, or SBMS0 is in EOC mode as you can see from following data stream

{"battery":-3127,"pv1":0,"pv2":0,"extLoad":3095}
According to SBMS0, Load current is 3.95A

Dacian Todea (electrodacus)

unread,
Jun 27, 2024, 1:22:50 PMJun 27
to electrodacus
The SBMS0 only sends the BatterytoLoad value that is what is in the extLoad.

{"battery":-3127,"pv1":0,"pv2":0,"extLoad":3095}

pv1 - (battery) = TotalLoad
0 - (-3127) = +3.127A
extLoad = 3.095A
SBMS0 self consumption  3.127A - 3.095A = 0.032A

SBMS0 separates the current provided to Load by the battery and the current provided to Load from PV
What you get in to extLoad is current provide to Load by the battery only and if you want to find out the total Load current you need to add the current provided by the PV

If battery current is negative as in this example it means battery is discharging so this current is flowing to Load and very small part 0.032A is the SBMS0 self consumption.
If battery current was positive it means battery is charging and so extLoad will be zero as all load current if there is some will be provided by PV.

That is why in your original first example PV1 current was 3.914A but only 0.27A was ending up charging the battery thus the delta was going to the load directly from PV so PVtoLoad = 3.644A
case 1
 3.914A - (+0.27A) = 3.644A


So if you are interested in the total load use this equation
TotalLoad = pv1 - battery         
this will include the SBMS0 self consumption the PVtoLoad and BatterytoLoad(extLoad)

Sasa Duric

unread,
Jun 27, 2024, 2:34:10 PMJun 27
to electrodacus
Thank you Dacian. Meanwhile, I have already did the calculation in the Home Assistant. All is clear now.
Reply all
Reply to author
Forward
0 new messages