activated Create or purge Sensors for MQTT integration to : CREATE
Updates :
1 - set back sensor creation to NO
2 - MIS to 1 (Multi Inverter System in the advanced option)
3 - deactivate MultiINV-SBFspot
and I see my 2 inverters in the logs.
I guess the final correction will be a change in HTML form to allow entering a number of sensor instances to create.
I guess this will help other people in the same case
Hmm I just join HA discord chat
Next step
try to manually create sensors and create dashboards
already tryed in Dev Tools > Model :
{{ states(āsensor.sma_energy_dailyā) + states(āsensor.sma_energy_daily_2ā) }}
but the outcome is a char concat (state: 0.3680.368) instead of a int sum ( should be state: 0,736)
I still havenāt figured where to put themā¦ File editor > configuration.yaml ?
Any one have already done a automation that notify HA mobile app when inverter injection is rising ?
I managed to set the app notification ā¦ I have added the day and night sensor ā¦ but donāt know how to set the trigger ?!
You need to add the float to convert from string to float. I am not sure if that is handling āUnknownsā
correctly though. You want unknown or none when either figure is not a float.
I couldnāt get to test properly in my > dev tools > template
You would add it to configuration.yaml as a template sensor.
template:
- sensor:
- name: Combined Inverter data ## You can make up your name of choice
unique_id: sbfspot_combined_id_128123483 ## this can be any sort of unique value
device_class: energy
state_class: total_increasing
icon: mdi:solar
state: >
{{ states('sensor.sma_energy_lifetime') | float(none) + states('sensor.sma_energy_lifetime_2') | float(none) }}
Edit:
Actually have you tried just adding the individual inverters separately to the energy dashboard. You wouldnāt need the template that way.
I couldnāt get those two I linked earlier to connect, I didnāt try super hard though. One was arduino and one was platformio.
These two work in arduino.
You have to set the appropriate files up with your info. BTaddress and Password and SSID and Password. Also make sure partitions are setup in arduino, the default partitions are too small for the Lupo one.
the lupo one would be reasonable for testing your range issue, as you should be able to have the esp32 in bt range to your inverter and then view the webview over wifi.
I didnāt find a mqtt oneā¦ although mqtt shouldnāt be toooo hard to add inā¦
Installed Home Assistant a few days ago and my first mission was to install SBFspot to upload the SMA data to PVoutput. I am really just a user and have not much knowledge about programming, debugging etc. And it turned out that i also cannot read well.
After 2 days of tinkering and reading this thread i finally got my installation working! Installation of SBFspot, MariaDB, Mosquitto Broker and phpMyAdmin turned out to be straight forward. SBFspot connected to the SMA straight away, but the data would not upload.
Turned out that i did not fill in the System ID and API correctly. Sid 012345679:12345 Api
37377fake37373fake4847fake12.
Hello, you donāt really need the MariaDB and phpMyAdmin as long as you only want to use the data for yourself.
You only need the api and the fake number if you donāt want to publish your data.
Hi there, Iām fairly new to HA and wanted to add on old SMA inverter to a local HA installation (being close to the inverter). I looked at your solution and tried it out. Installed as suggested (apart from PVoutput) and have it running Yet Iām confused about the data flow in your set-up and options. The main reason is that I also have a remote home automation system that Iām using as a master (integrating all measurements). This master system is already running a MQTT broker. Would it be possible, rather than using your proposed data flow, to simply send the inverter data straight to the broker on my master automation system? Or perhaps there are other Addons or Integrations that I missed in my search?
You can point to a different broker in the setup if you want.
You would have to setup the mqtt sensors on you master home automation system, however you normally do that, assuming itās not homeassistant.
The automatic sensors only work with the Homeassistant mqtt integration discovery. You can skip the automatic sensors and manually create them if you prefer. Which is how they were originally setup.
You could just run SBFspot directly on a machine locally if you have only setup HA for that specific purpose.
Thank for the quick reply OK, I missed that in the setup as I saw no obvious possibility to provide an IP address and port. Which entry should I use for this?
By the way, the master is not a HomeAssistant version so I indeed would have to setup the sensors myself, which is fine.
Firstly, thanks for a great add-on and wrapping SBFspot (which I already know).
New-ish HA user here. I am running it on Supervised on āunsupportedā Ubuntu 22.04.1 LTS until now without issue.
Have a bt enabled SMA SB3800 inverter and previously older SBFspot running on this host uploading to PVOutput (using CSV files not SQL). So I know bluetooth is all good, most config settings etc.
I have installed MQTT Add-on and configured Broker integration, and setup my secrets.yaml entries, but I canāt seem to get the sensors created for some reason. Looks like it canāt talk to MQTT ?
Any thoughts on troubleshooting this ? (have stopped other instance of SBFSpot during this of course)
s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service fix-attrs successfully started
s6-rc: info: service legacy-cont-init: starting
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service legacy-services: starting
services-up: info: copying legacy longrun sbfspot (no readiness notification)
[22:55:57] INFO:
[22:55:57] INFO: Linux 5.15.0-58-generic #64-Ubuntu SMP Thu Jan 5 11:43:13 UTC 2023 x86_64
[22:55:57] INFO:
s6-rc: info: service legacy-services successfully started
| INITIALISE MQTT SENSOR CREATION |
curl: (7) Couldnāt connect to server
[22:55:57] ERROR: Something went wrong contacting the API
null
core-mosquitto
null
null
null
[22:55:57] INFO: ===================================
[22:55:57] INFO: Setup failed to create HA Sensors
[22:55:57] INFO: ===================================
jq: error: Could not open file /data/device: No such file or directory
[12:55:57] WARNING: Halt add-on with exit code 2
s6-rc: info: service legacy-services: stopping
Yes, I assumed that was the issue from interpretation of the logs.
I did try a host restart with no difference.
MQTT is of course running without error.
How is ācore-mosquittoā resolved normally ? Remember I am not on HAOS.
I will check the address in the options. Thanks.
Cheers
Ian
Does it work and post info to mqtt when you donāt try to create the sensors? As in option ānoā on create sensors.
HAOS or supervised shouldnāt be of any particular relevance generally, they would both use core-mosquitto on a default install of mqtt addon and integration.
The hostname for the mqtt addon should be visible on the info page of that addon, and should be matching in the integration.
You could try the IP address as a test. Supervisor handles the name resolution normally.
It didnāt have ethernet two years ago. That was a recent addition. There is also an SMA integration for Ethernet connections.
I canāt test the Ethernet version so I donāt particularly promote it.
As to the issue you posted on github. (issue #54)
The sensors donāt always refresh.
The connection to the inverter is shut off overnight and restarting HA does not restart addons. The addon does a finq when it starts or restarts, which will update the sensors overnight. They will update at the next 5min timestamp during the day and when it starts in the morning.
Solutions to the issue are:
Restart the addon manually when you restart homeassistant if itās night time. This is what I typically doā¦ If I happen to restart HA and go looking for the data. So perhaps once every 3 months or soā¦ So very rarely.
You could create an automation in HA to restart the addon when HA restarts. It would be best to check it does actually restart.
There is a post around post 230 which details how to use SSH to do a finq via the command line that you could also use in an automation instead of a restart automation. This would be safer than a straight up restart as it wonāt cause the addon to duplicate accidentally(which is fairly rare).
Someone might do a pull request for a websocket authentication and trigger for a finq request on HA restarts. I would be happy to add it into the addon. I couldnāt figure how to write this after spending quite abit of time on that solution.
A host reboot will cause the addon to restart also.