smart home integration

186 views
Skip to first unread message

Bernd

unread,
Jan 20, 2021, 5:13:45 PM1/20/21
to electrodacus
I´m currently running an iobroker offgrid system with "nearly" full sbms0 integration.  
all (documented) values (sbms) out of the rawdata page is available via iobroker. I´ve integrated telegram messages updating me on the current system status and automated knx actions.based on SOC etc.
In case anyone is working on similar topics, please let me know. Would love to exchange information and thoughts.

Not ending this post without a question:
Are there information available on the other values on the rawdata page?
I´m looking for the sums of PV, load, etc. to run daily statitics 
As I´m not speaking javascript, I cannot see this out of SBMS.html...

Did someone manage to integrate these values in any other system? 

Dacian Todea

unread,
Jan 21, 2021, 12:40:06 AM1/21/21
to electrodacus
Bernd,

All the measured data is available in the sbms variable all else is just calculated data out of that.
So for example you get the PV and battery current and load current is calculated out of that then if you want the energy you just need to integrate the data over time.



Bernd

unread,
Jan 21, 2021, 5:11:15 AM1/21/21
to electrodacus
Dacian,

for most of the values you are right.Cell Voltage, cell Delta, Battery Voltage, Amperage, etc. can be calculated. Also temperates, date and time are in variable SBMS.

But what about "the rest"... 

1.) The graphs are represented in the 6 related variables (Btn,Btp,ELd,Ld,PV1,PV2). Each has 240 chars based-91 coded.
a.) first part 12 hours looks like 120 values one for each 6 minutes
b.) second part 60 values for each minute in the last hour
c.) third part 60 values for each seconde in the last minute
But:
The values I see on the html page are exact for a tenth of a watt, how can this be calculated out of these values? 
It looks more like a single character is a percentage value (base per 91). But how do we how, which wattage the value represents? The values on the headlines of the 3 graphs are not clear, how to get them. If this represents a full graph a division by 91 and multiplaction with the single value, would give the reading of the wattage per time slot. But this is not in variable sbms....

2.) I also miss the sums for PV and load. I agree that I could sum them up (somehow), but this will for sure result in different values compared to the bms readings? 
-> If these are (only?) on the HTML page, maybe I shall better parse this page?!?


Robert Tagscherer

unread,
Jan 21, 2021, 5:45:26 AM1/21/21
to electrodacus
Hi Bernd,

Everything the html page displays is present in the variables in rawdata.

If you store the live data (only from the sbms variable) in a database and run queries on that, summing/integrating the values, you get the same result as what you could parse from the other data in rawdata.
What you gain is the flexibility to select the time range you want to know the values for.

The "manually" integrated values will be exactly the same as what the sbms calculates as there is mathematically no difference when integrating over averaged values.

Bernd

unread,
Jan 21, 2021, 6:24:56 AM1/21/21
to electrodacus
Hi Robert,
thank you, but I think I have a different approach or view on this.
I have all the sbms data in a database and can run queries on these settings, generate graphics on cell voltage over time, load, soc, etc. pp. this is all working fine.
But it is not the same level of quality as the data in the BMS.

In case you are right, I need to parse the rawdata from sbms every second via wifi. Quite sure this is way to much for the sbms and the wifi connection, sound more like a DDOS attack to the BMS to me :-)

But It´s okay for me, if the other variables are not documented for now or every.Maybe I will dive in and find out..

It is already excellent as it is for now, I was just looking for maybe the last 5% of the data available in the BMS and to get way to get these values.
E.g. by reading the data every minute and store the values.

Thanks again Robert and Dacian for your excellent support/product, it is very much appreciated.

Greetings from germany
Bernd

Robert Tagscherer

unread,
Jan 21, 2021, 6:46:13 AM1/21/21
to electrodacus
I've been receiving the data every second via Mqtt on a raspberry pi for months without a single problem.
Querying the rawdata via http every second is probably not the best idea and you might miss a set of data or skip one occasionally, but should just work fine.

Bernd

unread,
Jan 21, 2021, 6:56:54 AM1/21/21
to electrodacus
MQTT is a very nice idea, I did see the option in the software, but did just a quick test without success and as I didn´t see any documentation, I´ve ended the approach after 1 or 2 hours.
But good to hear this is working fine for you. I will try and see what happens, as always step by step :-)

Which software are you using on the PI?

Michael Zeeb

unread,
Jan 21, 2021, 7:40:51 AM1/21/21
to electrodacus
I've also been using MQTT exported to a broker with no issues on the SBMS at all.  MQTT is very lightweight; with MQTT, you're exporting data that's being collected anyway and you're not expecting acknowledgement, etc.  That's completely different than asking the SBMS to respond to a query and will not result in a DDoS type "attack".
If you export to HomeAssistant for example, you can invoke the InfluxDB addon database to very efficiently store large amounts of time based SBMS data.


Dacian Todea

unread,
Jan 21, 2021, 1:36:54 PM1/21/21
to electrodacus
Bernd,

1) In those variable each character can be converted to a value between 0 and 90 and you can show a graph based on those values but they do not represent anything by themselves. The graphs are auto scaled and the max scale for each graph is saved in another variable.
Even if you want to convert to current or power the resolution will be very low as you only have 90 levels so is more to have a graphical representation. Yes a, b and c are correct.

The SBMS is doing the exact same thing internally to generate those graphs (they are calculated) and then keep in to SBMS RAM memory.  So if you do the same thing externally calculate those graphs you will get the exact same thing but you have the full value for each point in the graphs not compressed down to just 91 values.

The reason I transfer those graphs from the SBMS is because people will maybe just open the html page for a few seconds then close it so that way they can see the last 12h graphs. If connection to SBMS0 will be permanent then I could have implemented drawing a graph based on calculations then graph will have been much more detailed and you could read the values from the graph with good resolution not just 91 steps.
 

Bernd

unread,
Feb 4, 2021, 5:48:07 PM2/4/21
to electrodacus
for anyone else interested in these values, who does not want to do the calculation on his own or go the mqtt way...
These 7 values on the summary of amperage and wattage for battery, pv1, pv2,pv1+2,load, extload, dmppt are stored in 6 digit values in the eA and eW values on the rawData page.

Enjoy your DIY solar project and thanks to Dacian for all his excellent work and support! 

John Smith

unread,
Feb 17, 2021, 1:15:33 PM2/17/21
to electrodacus
Robert,

I have been trying to establish connection via LAN  between my SBMS0 and my raspberry pi.  Mosquitto MQTT is running on the pi, and the local sub and pub is working.  The pi can also find the SBMS0 using a browser and displays the electrodacus-dash just fine.   
Thanks for your kind assistance

John

Kohala Jim

unread,
Feb 17, 2021, 1:51:30 PM2/17/21
to electrodacus
I'm also utilizing the SBMS MQTT messaging in tandem with a host of other Tasmota enabled devices in a Node-RED, Mosquitto broker system.
Thanks for your efforts here, Robert and Dacian.!

I'm still debating the merits of utilizing InfluxDB/Grafana, especially in light of the sheer payload and data volume.
Once I've actually got an installed SBMS0 the need for longer term historical data should become more evident.

It might be a nice enhancement to allow a user-definable publishing interval, and I may just give this a go to get the build IDE and flash support running.

Reply all
Reply to author
Forward
0 new messages