SBFspot Bluetooth homeassistant addon

Well, from that log SBFspot isn’t connecting to your inverter. It may have connected on the 10th at 13:45

The SBFspotUpload log in the addon only searches for the latest available log. It does do an archive upload for the past 14 days. So presumably there isn’t data beyond the 10th.

The connection error is your real problem. At this point you may as well try and reinstall the addon and see if that helps with your connection issue…

There is nothing I’m aware of that would have changed to go from a working connection to a non working connection. Try moving your pi closer to your inverter if you can.

Hello HasQT,

i have uninstalled the AddOn. Then restarted the HA. Installed the AddOn. Then i allready have the old log-file in the log section. Is it possible to find the old file?

After adding the configuration information, pressing start nothing happens. MariaDB, phpMyAdmin are running. PVOutPut is running but stating: Retrying setup: PVOutput has no data available

Frank

The old log is showing under?

Settings > add-ons > HAOS-SBFspot > log

Or

Settings > system > logs > HAOS-SBFspot

Odd that the old log would show up.
Does the log in the addon show up when you start the addon? It should run through some container startup.
Does the supervisor log show the addon as being installed? Does the supervisor log give an error after trying to start the addon?

PVoutput will probably sort itself out.

Hello HasOT,

i find the old log in: Settings > add-ons > HAOS-SBFspot > log

No error in Settings > system > logs > HAOS-SBFspot
except a PVOutPut Warning.

It is an HA OS installation.

in the supervisor log i find (Never been there before …):

22-07-18 19:28:48 INFO (MainThread) [supervisor.addons] Creating Home Assistant add-on data folder /data/addons/data/a51a23d8_haos-sbfspot
22-07-18 19:28:48 INFO (SyncWorker_0) [supervisor.docker.interface] Downloading docker image ghcr.io/habuild/aarch64-addon-haos-sbfspot with tag 2022.3.5.
22-07-18 19:28:53 INFO (MainThread) [supervisor.addons] Add-on 'a51a23d8_haos-sbfspot' successfully installed
22-07-18 19:42:14 WARNING (MainThread) [supervisor.addons.addon] a51a23d8_haos-sbfspot is already running!

i get the last warning every time i try to start HAOS-sbfspot.

This is the state before i try to start HAOS-sbfspot

It looks like i am not able to kill the old …

i am not able to find the folder /data/addons/data/a51a23d8_haos-sbfspot
image

Frank

1 Like

Hello HasQT,

solved the problem. I have startet a backup of the system on a new SSD. It works now. Looks like the old log-file crashed on the file system.

Thanks for your help
Frank

1 Like

Is the Bluetooth connection working also?

yes. same position and pretty good signal: BT Signal=75.3%

1 Like

Oh btw, you don’t need to leave phpMyAdmin running. You only need it for the initial database creation, or if you want to look into the database.

Hi, I am having an issue getting the bluetooth to connect in SBFspot. Im very new to Home Assistant but so far I have managed to do everything Ive needed with all the great content here and elsewhere.

Ive installed a fresh HAOS from last week (Updates have just installed) directly onto an aging NUC DN2820FYK. When ive installed and configured the SBFspot im getting the 10 tries in less than 10 seconds and finishing with the “CRITICAL: bthConnect() returned -1” error.

Ive managed to try use bluetoothctl and it can see the NUC built in bluetooth controller and I can scan for devices and see the inverter and even pair to it. Ive also installed the Bluetooth tracker and the inverter shows up as known device.

I had a PI version of SBFspot running for a few years but the SD trashed and I never bothered setting it up again. I had kept a copy of the cfg file which i used to help populate in the HA addon.

As another check I did a quick install SPFspot on V1 Pi Raspian and was able to use a USB Bluetooth adapter to login and pull data from the inverter. I tried the same USB adapter into the NUC but no difference. It then just has 2 controllers and probably is still trying to use the built in one. The PI and NUC were beside each other and ony a couple of meters from the inverter.

Anyone got any ideas of anything to try next?

Probably my fault I think. Where is your Bluetooth listed? Only ttyAMA0 is active in the addon…


$ ll /dev/se*
lrwxrwxrwx 1 root root  5 Oct  2 12:17 /dev/serial0 -> ttyS0
lrwxrwxrwx 1 root root  7 Oct  2 12:17 /dev/serial1 -> ttyAMA0
$ ll /dev/tty*
crw-rw---- 1 root dialout 204, 64 Oct  2 12:52 /dev/ttyAMA0
crw-rw---- 1 root dialout   4, 64 Oct  2 12:17 /dev/ttyS0
crw-rw---- 1 root dialout 188,  0 Oct  2 12:17 /dev/ttyUSB0
lrwxrwxrwx 1 root root          7 Oct  2 12:17 /dev/ttyUSB01 -> ttyUSB0
lrwxrwxrwx 1 root root          7 Oct  2 12:17 /dev/ttyUSB04 -> ttyUSB1
crw-rw---- 1 root dialout 188,  1 Oct  2 12:17 /dev/ttyUSB1

edit: try the other version, the plain sbfspot in my addons. I have removed the devices, if it connects with that version it is a simple fix.

I dont see the /dev/ devices you have listed nor do i have the ll comand - im using the terminal & ssh console. Should i being using something else?

- attributes:
    BUSNUM: "001"
    DEVNAME: /dev/bus/usb/001/007
    DEVNUM: "007"
    DEVPATH: /devices/pci0000:00/0000:00:14.0/usb1/1-4
    DEVTYPE: usb_device
    DRIVER: usb
    ID_BUS: usb
    ID_MODEL: 07dc
    ID_MODEL_ENC: 07dc
    ID_MODEL_ID: 07dc
    ID_PATH: pci-0000:00:14.0-usb-0:4
    ID_PATH_TAG: pci-0000_00_14_0-usb-0_4
    ID_REVISION: "0001"
    ID_SERIAL: 8087_07dc
    ID_USB_INTERFACES: ':e00101:'
    ID_VENDOR: "8087"
    ID_VENDOR_ENC: "8087"
    ID_VENDOR_ID: "8087"
    MAJOR: "189"
    MINOR: "6"
    PRODUCT: 8087/7dc/1
    SUBSYSTEM: usb
    TYPE: 224/1/1
    USEC_INITIALIZED: "24236237"
  by_id: null
  children:
  - /sys/devices/pci0000:00/0000:00:14.0/usb1/1-4/1-4:1.0
  - /sys/devices/pci0000:00/0000:00:14.0/usb1/1-4/1-4:1.0/bluetooth/hci0
  - /sys/devices/pci0000:00/0000:00:14.0/usb1/1-4/1-4:1.0/bluetooth/hci0/rfkill1
  - /sys/devices/pci0000:00/0000:00:14.0/usb1/1-4/1-4:1.1
  dev_path: /dev/bus/usb/001/007
  name: 1-4
  subsystem: usb
  sysfs: /sys/devices/pci0000:00/0000:00:14.0/usb1/1-4

hi @bmccluskey
sorry for the delay in response. I had to rework the addon to suit the new s6 v3 requirements.
Can you give the test-sbfspot addon a go and see if you can connect and let me know.

@laurie_lewis and @nug this change might have solved your VM connection issues also.

Thanks for following up mate but my issue was definitely a range thing. I ended up putting a small PC in my garage with SBFSpot setup on that and pass that through MQTT back to my main HA VM.

1 Like

What delay?? A changed piece of code in <12 hours is lightning fast, thank you!

Now the bad news. I uninstalled the original and installed the Test one. Unfortunatly it hasnt resolved the bluetooth issue, same problem 10 goes in a a few seconds. The other thing it seem to run it a second time in quick succession. Or else the Cron hasnt cleared properly from the original version.

Wed Jul 27 09:24:16 2022: CRITICAL: bthConnect() returned -1
Wed Jul 27 09:25:09 2022: CRITICAL: bthConnect() returned -1
Wed Jul 27 09:30:09 2022: CRITICAL: bthConnect() returned -1

hmm try the test version again. I added the devices key back in for usb(i think). you will need to reload the repository.

:frowning: Still no luck.Still getting the 10 tries in < 10 secs
Not 100% on what you mean by reload the repository but here is what i did.

  • Stopped the service
  • Uninstalled - gave it a few minutes
  • Hardware reboot
  • Installed Test version
  • Put Yaml back in
  • Hardware reboot
  • Started service

Let me know if you need anything more on my side. I appreciate the efforts. Thank you.

1 Like

Is there any point trying to add the local BT address entry in the SBFspot.cfg file?

# If multiple local BT adapters are available, select the one to use
#LocalBTAddress=00:00:00:00:00:00
1 Like

I added LocalBTaddress to the plain SBFspot addon. Try that. seems to be working for me. blank or 00:00:00:00:00 or my correct mac work. incorrect controller mac won’t connect.

you can find your bluetooth controller mac using bluetoothctl command in the ssh console addons.

Hi there,
When I upgraded to 2022.7.2 SBFspot does not start.
"Fatal error for option ‘LocalBTAddress’ with type ‘?’ in SBFspot (a51a23d8_sbfspot).

When I add 00:00:00:00:00:00(or real MAC) to LocalBTAddress field the plugin does not allow to save the yaml.

try a reinstall heraldry, check for updates in the addon store. the ? was in an earlier version.