SBFspot Bluetooth homeassistant addon

Thanks, it works now.

1 Like

with bluetoothctl and scan on does your inverter mac show up on the nuc?

Yes shows up on the NUC built in BT and if I install and external BT it will scan on that too.

I just had a look on your Github in the test-SBFspot folder. In the Config.json file you have the line
“devices”: ["/dev/ttyUSB0"],

I think mine is probably on USB1 - at least thats what it looks like to me from the details I can see in the post a couple of days ago.

technically the devices line is redundant. it’s not in the plain SBFspot. the host_network: true is supposed to pick up all devices.

I will change it to usb1 in the test version. it takes about 20 mins to compile…

You can connect to the addon container with portainer if you want to poke around. any changes you make will be lost on restart.

Tried reinstalling about 15 mins ago - still the same :frowning:
Looks like the portainer is no longer able to be installed :frowning:

Any other suggestions on how I can see whatts going on inside the container?

Alex has portainer.
He’s got a post on these forums somewhere too. 60+ addons

Do you know what architecture(that should be visible in portainer) type it installs as? Perhaps it’s missing a dependancy…

you can use apk add to add things to the container. I usually add nano to look at files etc.

1 Like

Got the portainer working and into the console of the container. But now im a bit stuck on what to check next. Was hoping that the bluetoothctl would be available in there but it doesnt appear to be.

Not sure what you mean by the arcitecture that should be visible.

try the test version again. I added some stuff. bluetoothctl works in the test version now. You will need to reinstall/reload the store.

Ok, things are improving a little.

I reinstalled the test version but still no luck with sbfspof, exactly same 10 timeouts in 10 seconds.

When I go to the docker console, i can runn bluetoothctl and it works, it sees the bluetooth device and i can scan and see the inverter and other stuff dotted around the house.

So i guess that proves that the bluetooth is gettiing into docker, its just the SMAspot app that isnt able to connect to it.

I did check in the /dev/serial folder and all i can see there is the z-wave and zigbee adapters, i cant see it mapping the bluetooth device

dumb question…
is it actually finding the configs files and are they being filled in.

Compiled for Linux (LE) 64 bit with MySQL support
Commandline Args: -v -ad0 -am0 -mqtt -finq
Reading config '/usr/bin/sbfspot/SBFspot.cfg'

try again in 20 mins(well actually the amd64 version only takes 3 mins to compile so you should be good to go). I hadn’t added the LocalBTAddress into the generateConfig.sh

No change :frowning:

Is RFComm running in the container?

What is sbfspot compiling as?

Compiled for Linux (LE) 64 bit with MySQL support?

SBFspot V3.9.5
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 -ad0 -am0 -mqtt -finq
Reading config ‘/usr/bin/sbfspot/SBFspot.cfg’
Thu Jul 28 23:45:55 2022: INFO: Starting…

1 Like

bluetoothctl list

that should list the bt controller and which is default

I did try and add in dbus to the addon earlier. so a fresh install might be needed again…

did you say the nuc had builtin BT as well as using the BT dongle? I may have misunderstood your earlier post, perhaps it only the dongle.

I’m running out of ideas. You are adding the mac in with capitals? someone mentioned that earlier, although it works with either upper or lower case for me.

I suppose if you got really excited you could pair or trust the inverter… although that isn’t normally needed.

edit: I have been meaning to try and get apparmor to work… that might potentially help. When I have tried apparmor previously I get it stuck with being unable to unload the profile. which is ok if I have host os access, not so much if it’s on a remote pi3 without host access lol.

Will try an uninstall and reinstall shortly.

The NUC has built in BT and that is the mac in the last post. I also have a USB BT dongle that I tried plugging in to see if it would work, it was the one that I used on the pi when I sucessfully ran SBFspot on the pi.

When I plug the USB BT into the NUC it shows up in the docker container and Bluetoothctl shows both and I can switch wihich is the default, powere them on and off, scan etc…

The MAC of the inverter only has one letter and it is a capital. Did try changinig to lower at one point, just in case.

I did try pairing the NUC and Inverter from Bluetoothctl within the docker container. It paired but SBFspot still didnt pick it up.

I went ant looked at the bluetooth module in SBFspot last night and see that it uses RFComm but withing the container I cant find any reference. Not sure if that is relevant or not. We have proved that the bluetooth is working in the container. Its just how SBFspot is detecting the local bluetooth that isnt working.

bash-5.1# apk add rfcomm
fetch https://dl-cdn.alpinelinux.org/alpine/v3.16/main/aarch64/APKINDEX.tar.gz
fetch https://dl-cdn.alpinelinux.org/alpine/v3.16/community/aarch64/APKINDEX.tar.gz
ERROR: unable to select packages:
rfcomm (no such package):
required by: world[rfcomm]

bash-5.1# apk search rfcomm
bluez-alsa-utils-4.0.0-r2
bluez-deprecated-5.65-r0

I can try adding alsa-utils into the container.

apk add bluez-alsa-utils
if you want to try it in portainer, it’s more pointed at audio stuff.

It shouldn’t really need that or any of the other stuff that has been added. It works without all in the other version for me…