My configuration.yaml looks very much like poggialb posted above, except my topic ID numbers are different. It’s mqtt sensors and nothing else.
From memory you just add your mqtt details in the sbfspot config file (poggialb discusses this in his post when he says “Some important settings to get MQTT working with HA:”.
And then just execute sbfspot with the -mqtt argument every X minutes.
the -mqtt ( On Windows the command to generate a reading is: "C:\\Program Files (x86)\SpfSpot.3\SBFSpot.exe" -v -finq -nocsv -mqtt) got me. Its working fine
I got it working, mqtt user is required, not optional which I first thought due mqtt already working while never entered username and password but it was an integration so seems work differently for those.
Now looking to intregrate into new energy dashboard in Home assistant 2021.8, it doesn’t show in entities list but I’m trying to use platform integration to create new kwh property.
It would be nice to get original kwh entitie to get showing into energy dashboard choice list.
Thank you very much for this @poggialb, also managed to get it work.
@jaan I am ideally looking to integrated this with the new Energy Dashboard, so if you are anyone makes progress on this, please can you update us here.
Cheers for that I’ve now got my SMA invertor talking via MQTT as well as PVOutput
I’m also trying to get it connected to the new energy dashboard and I believe it’s because the power generation values are missing two attributes state_class: measurement (See below) and last_reset: which I haven’t figured out the format with the MQTT Sensor [Edit might have figured out]
Been trying to do the same thing - had spfspot running for around a year on a raspberry pi taking in my data from an older sma 3600 inverter into home assistant. Have made some nice existing dashboards on generation, but would like to put into the new Energy Dashboard.
It seems that MQTT generated sensors cannot have the last_reset set which means it can’t create statistics which the new Energy dashboard needs. I’ve seen some comment about making a utility meter in configuration.yaml which can get around this with the daily attribute on it but not managed to get it working yet.
I’ve also amended the other outputs to now be device_class: power or energy and taken off the ‘’ ‘’ around appropriate unit of measurement - this should make it easier to see them in the newer HA environments
Think you’d need a separate raspberry pi running Raspbian to run Spfspot - that is what I use. I run HA as a docker image on my NAS as the most stable and easiest for me. Don’t think you can run spfspot on HomeAssistant OS.
As for getting data into the new solar output part of HA I found that by creating a utility meter using the inverter_today_yield data that I didn’t need to mess with last reset time etc - which was crashing for me.
Making sure that inverter_today_yield was set as device_class power and unit as kwh allowed the utility meter to sum up the daily total and then be shown in the new solar output portion of HA.
Strange about the crashing. I ended up using the total Yield in the energy graph as the daily yield seemed to reset the graph with a negative value for the second day I guess because it starts at 0 each day and the last reset date should match that.
So excluding all the other mqtt data sbfspot sends to HomeAssistant this is the main sensor I’m using. Obviously change the 123456 to what ever your invertor Serial Number is
@poggialb Just wanted to say a massive thanks for this, I moved in to place with SMA inverter 18months ago and since been trying to work out how to integrate since webconnect doesn’t work. Hour after stumbling across this post have it working and perfect timing with addition of energy functionality.
works fine, just one question, I have 2 inverters, get data from both in mqtt but on same topic, is there a way to have different topics or select them in Home assitant?
With two invertors don’t each of them have different serial numbers leading to different MQTT datasets. I’m not sure how sbfspot handles multiple invertors.
It looks like with the latest 2021.9 update that the total power should change from state_class: ‘measurement’ to ‘total_increasing’.
I’ve now moved to the same way of collecting data as others with the right settings for Total Energy Produced and this came up when I did the amendment today.
Hiyas,
I am looking for someone to test my conversion of my Bluetooth SBFspot addon to Ethernet. I need to confirm it actually connects to an inverter over ethernet! My Inverter is only bluetooth.
Thanks in advance!
An example yaml config is here You should just need to put in your Inverter IP and perhaps password? Not sure, I don’t use the ethernet version. Whatever you would normally use on a Non HA SBFspot version anyway. I just need to confirm it connects and receives data before I swap it over to my other Repo into my main version. you can leave fake details(you can make up your own) in to get the yaml config page to save.
You don’t need MQTT, MariaDB or a PVOutput account to test the connection, Although feed back on those would be useful(let me know if you are going to try live to PVOutput I disabled it for the moment.)