Closed scauwe closed 5 months ago
It sounds like your MQTT topics might not be matching.
homeassistant/sbfspot_sma/sbfspot_XXXX
That topic that the addon is posting to the MQTT server needs to be the same when Home Assistant is listening to the MQTT server.
It is probably just a case of deleting the sensors from Home Assistant and re-adding with the addon. They may have picked a different topic the first time they were created when the MQTT connection wasn't working in issue #92
You can use the listen to a topic in the MQTT integration to confirm it is being received in Home Assistant, then you will need to configure your sensors again.
Settings > Devices & Services > MQTT > configure > listen to a topic
You could also use program like "MQTT explorer" to connect and troubleshoot, which is available as a windows download or a Home Assistant addon.
Hi all,
When removing all the sensors, HAOS-SBFspot adds them again on starting up. What I noticed is that these are added without the serial number:
Since these are created prior to connecting, I thought that this was normal.
I changed the MQTT topic configured in HAOS-SBFspot to include the serial number "hardcoded": change from homeassistant/sbfspot{plantname}/sbfspot{serial} to homeassistant/sbfspot_{plantname}/sbfspot2100XXXXXX
When deleting the sensors again, HAOS-SBFspot still generated config messages without the serial number.
So, next try was to remove the serial number in HAOS-SBFspot from the topic name:
homeassistant/sbfspot{plantname}/sbfspot_
And now I do have results in the sensors.
So, no clue what the actual issue is right now. It seems logic that the serial number is unknown at the time of creation of the topics (since sbfspot was not yet started), but hardcoding the serial number in the topic did not help either.
Stefaan
Run a purge sensors
Or at worst case copy your options (in yaml mode is easy for copy paste) and uninstall /reinstall the addon.
When the addon starts trying to create the sensors the first time it creates a file with the serial number it receives via mqtt from SBFspot. It gets abit stuck if it creates that file incorrectly.
You can't hard code the serial in the mqtt topic in options. That is is one of the sacrifices that had to be made to get the addon options to convert to something that sbfspot could use.
The purge sensors did not solve it. Uninstall & reinstall did. Now I have the serial number as part of the topic.
Thanks! Closing the issue.
Hi all,
After I got the HAOS-SBFspot connected to MQTT (ticket #92 ), I am now faced with the next problem: all values are read from the inverter, but the publishing to the queue seems not to work. All MQTT sensor values are "Unknown". The SBFspot does not show an error (except for the MySQL which I indeed did configure with dummy data). In the debug info from MQTT, the HAOS-SBFspot entity, I do see the HAOS-SBFspot topics, but "most recently received messages" is "0" for all.
Relevant part of the log from HAOS-SBFspot:
Thanks, Stefaan