SBFspot Bluetooth homeassistant addon

That looks correct…

There are two topics. The first is the discovery setup topic, that was in your earlier screenshot in post 155.

homeassistant/sensor/sbfspot_{plantname}/sbfspot_{serial}_{sensor types etc} 

The above gets sent out via mosquito_pub directly.

There should be another topic and message.

This doesn't include the sensor or sensor type parts of the previous/discovery topic
homeassistant/sbfspot_{plantname}/sbfspot_{serial} 

That should get sent out via SBFspot and will have the payload of inverter data. Is that arriving in MQTT Explorer?

It might be failing discovery still or perhaps it’s reading the mqtt creditentials incorrectly in SBFspot… Check the logs of HA core, SBspot, and mqtt broker.

Hello HasQT,

the MQTT log includes several itterations of;

2022-10-07 14:30:04: New connection from 172.30.32.1:40162 on port 1883.
2022-10-07 14:30:04: New client connected from 172.30.32.1:40162 as auto-091B1C16-4E71-52C1-1A3B-19E321B016AD (p2, c1, k60, u'mqtt-admin').
2022-10-07 14:30:04: Client auto-091B1C16-4E71-52C1-1A3B-19E321B016AD disconnected.
2022-10-07 14:31:20: New connection from 172.30.32.2:33646 on port 1883.
2022-10-07 14:31:20: Client <unknown> closed its connection.
2022-10-07 14:33:20: New connection from 172.30.32.2:42046 on port 1883.
2022-10-07 14:33:20: Client <unknown> closed its connection.
2022-10-07 14:35:04: New connection from 172.30.32.1:46556 on port 1883.
2022-10-07 14:35:04: New client connected from 172.30.32.1:46556 as auto-44FA5C0E-299E-51DE-D70D-4304A8ECA900 (p2, c1, k60, u'mqtt-admin').
2022-10-07 14:35:04: Client auto-44FA5C0E-299E-51DE-D70D-4304A8ECA900 disconnected.
2022-10-07 14:35:20: New connection from 172.30.32.2:58702 on port 1883.
2022-10-07 14:35:20: Client <unknown> closed its connection.
2022-10-07 14:37:20: New connection from 172.30.32.2:41970 on port 1883.
2022-10-07 14:37:20: Client <unknown> closed its connection.
2022-10-07 14:39:20: New connection from 172.30.32.2:34554 on port 1883.
2022-10-07 14:39:20: Client <unknown> closed its connection.
2022-10-07 14:40:04: New connection from 172.30.32.1:37958 on port 1883.

The SBF-spot log includes:

MQTT: Publishing (sbfspot) "Timestamp": "2022-10-07T14:45:04+0200","SunRise": "2022-10-07T07:20:00+0200","SunSet": "2022-10-07T18:30:00+0200","InvSerial": xxxxx,"InvName": "SN: xxxxx","InvTime": "2022-10-07T14:44:28+0200","InvStatus": "Ok","InvTemperature": 58.900,"InvGridRelay": "Closed","EToday": 9.175,"ETotal": 29746.483,"GridFreq": 49.990,"PACTot": 1881.000,"UDC1": 221.190,"UDC2": 0.000,"IDC1": 8.953,"IDC2": 0.000,"PDC1": 1974.000,"PDC2": 0.000
Client null sending CONNECT
Client null received CONNACK (0)
Client null sending PUBLISH (d0, q0, r0, m1, 'sbfspot', ... (437 bytes))
Client null sending DISCONNECT

No MQTT or SBFspot spezific error or warning in the HA log-file.

Frank

Hello HasQT,

i don’t know what to do with it

These are incorrect. They should have the full topic instead of only sbfspot.

It Should be

MQTT: Publishing (homeassistant/sbfspot_{plantname}/sbfspot_{serial}) 
Client null sending PUBLISH (d0, q0, r0, m1, 'homeassistant/sbfspot_ThisWouldBePlantname/sbfspot_YourSerial', ... (437 bytes))

Did you set the topic in options?

Capture

It needs to be this for auto-sensors.

Hello HasQT,

the last options (MQTT Topic Leave …) was the problem.

It works now.

THANKS
Frank

1 Like

Hi HasQT and other all SBFspot users!
Thanks for HAOS-SBFspot!
Today I have an old SBFspot running in an old Domoticz environment. But it would be great to have it running in my new Home Assistant environment.
However I get the following “CRITICAL: Logon failed”:

SBFspot V3.9.7
Yet another tool to read power production of SMA solar inverters
(c) 2012-2022, SBF (https://github.com/SBFspot/SBFspot)
Compiled for Linux (LE) 64 bit with MySQL support
Commandline Args: -v -finq -mqtt -cfg/usr/bin/sbfspot/SetConfig.cfg
Reading config '/usr/bin/sbfspot/SetConfig.cfg'
Thu Oct 20 11:43:13 2022: INFO: Starting...
sunrise: 07:46
sunset : 17:38
Connecting to 00:80:25:28:F5:DA (1/10)
Connecting to 00:80:25:28:F5:DA (2/10)
Connecting to 00:80:25:28:F5:DA (3/10)
Connecting to 00:80:25:28:F5:DA (4/10)
Connecting to 00:80:25:28:F5:DA (5/10)
Initialising...
SUSyID: 125 - SessionID: 878318517
SMA netID=02
Serial Nr: 7DCB15CE (2110461390)
BT Signal=7.8%
Thu Oct 20 11:43:54 2022: CRITICAL: Logon failed. Check 'USER' Password
Thu Oct 20 11:43:54 2022: INFO: Done.
[09:43:54] WARNING: Halt add-on with exit code 1
s6-rc: info: service legacy-services: stopping
[09:43:54] INFO: Service restart after closing
s6-rc: info: service legacy-services successfully stopped
s6-rc: info: service legacy-cont-init: stopping
s6-rc: info: service legacy-cont-init successfully stopped
s6-rc: info: service fix-attrs: stopping
s6-rc: info: service fix-attrs successfully stopped
s6-rc: info: service s6rc-oneshot-runner: stopping
s6-rc: info: service s6rc-oneshot-runner successfully stopped

What logon is failing here (inverter, MariaDB, MQTT broker or PVoutput)?
I have tried to modify the inverter password but then I never reach the “Initialising…” so I guess it must be some other password.

Inverter pw

Mqtt mariadb and pvoutput are all after this point, and you can still get data without those 3.

It should be your sunny Explorer pw

Try without the sensors first it will use a different cfg file

BT Signal=7.8% 

Might be that also

Thanks for the information!
I think I have the accurate password for the inverter now, but a restart didn’t change the content of the log so I decided to make a reinstallation of HAOS-SBFspot to get a fresh start.
But now I get the message “Pulled image ghcr.io/habuild/aarch64-addon-haos-sbfspot:2022.10.2 failed on content-trust verification!” when I try to install HAOS-SBFspot again.
What can be the problem here?

Ahh that’s probably my fault.

Apologies I had tried to sign the addon. Which worked when I upgraded my test version and proper version. It did fail on fresh install though. I will have to look into that.

10.3 will resolve your issue. Codenotary has been removed for now.

I was able to install version 10.3. Thanks!

But the reinstallation didn’t solve the things a saw yesterday.

  • I’m not able to stop the service. When I press Stop I get the circular animation but when it’s finished the Stop and Restart buttons are still there.
  • When I press Restart the log becomes empty but after pressing Update after a while I see yesterdays log from 12:16. Strange.

If everything goes well am I supposed to see some entities in MQTT?
Now it looks like this.image

You should see in that MQTT window 1 device 33 entities(give or take, depends which you select)

However can you try starting without making the sensors for the moment.

So change create or purge sensors to No.

That should connect and log the data to the log window.

You can create sensors later if that is working.

Good Morning,

I get the Same error when i try to Update to haos sbfspot addon 10.3

2 Likes

Yeah. Vaguely annoying. My apologies again.

The easiest solution is just to uninstall and reinstall.

Copy and paste your config back in.

You might have to go to the addon store and hit the 3 dots then check for updates. Do a browser refresh after that.

Big Thanks! It works!

Your app is Great for people like me with an old bt inverter :wink: great to get my data into hass

1 Like

Thanks for the suggestion to not create any sensors.
But I still have the two problems:

  • Can’t stop the service
  • I can only see the log from 12:16 yesterday

I have turned off auto start of HAOS-SBFspot and restarted Home Assistant (in developer tools). But when I go to HAOS-SBFspot it’s active anyway. Very strange. Something has “frozen” my HAOS-SBFspot. Is there some kind of hard uninstall in HA that I can try?

You can use this command from the console.
Either putty or from either terminal addon.
This should remove the image too.

ha addons remove a51a23d8_haos-sbfspot

ha addons list

You can try stopping it from service call too.
This won’t remove the image though.

I also don’t usually run watchdog(vakthund) although it shouldn’t be causing issues either.

I have removed it with “ha addons remove a51a23d8_haos-sbfspot” and reinstalled it again. But I always see the log from yesterday and unable to stop and start the service with new settings.
When I run stop add-on in developer tools I see the green button with the check mark but when switch back to HAOS-SBFspot it’s green and looks like it running and shows the log from yesterday 12:16.
Even if I don’t reconfigure it after a reinstallation it looks like it’s running. :frowning:

Have you done a reboot of your host?
Not just a restart of HA.

What hardware are you using?

Also where is that yesterday log showing up? In the addon log or via settings > logs?

OK, I have just been using Restart in Developers tools. Didn’t know about Restart in System. So a real restart removed the old log and made it possible to start and stop the service again.
I have Raspberry Pi 4.
I have moved it just two meters from the inverter and I got the connection working! :smiley:
It has uploaded data to PVOutput. :smiley:
But MQTT just have 4 entities. Will more be created tomorrow when the sun goes up again?