It’s not the power/usage. Some of the virtual stuff requires uefi bios or/and win 10 pro
Ok I could follow that guide
This is the result via desktop/BT adapter using the VMWare Was 10seconds connection attempt duration.
While my Desktop connected first go.
Version | core-2022.7.7 |
---|---|
Installation Type | Home Assistant OS |
Development | false |
Supervisor | true |
Docker | true |
User | root |
Virtual Environment | false |
Python Version | 3.10.5 |
Operating System Family | Linux |
Operating System Version | 5.15.55 |
CPU Architecture | x86_64 |
Generating /usr/bin/sbfspot/SBFspot.cfg & /usr/bin/sbfspot/SBFspotUpload.cfg
[11:53:46] INFO: [Host Bluetooth MAC Address] Controller 00:43:7D:AD:45:12 homeassistant [default]
Starting daemon
Starting cron in foreground
SBFspot V3.9.5
Yet another tool to read power production of SMA solar inverters
(c) 2012-2022, SBF (GitHub - SBFspot/SBFspot: Yet another tool to read power production of SMA® solar/battery inverters)
Compiled for Linux (LE) 64 bit with MySQL support
Commandline Args: -v -ad0 -am0 -mqtt -finq
Reading config ‘/usr/bin/sbfspot/SBFspot.cfg’
Wed Aug 3 11:54:16 2022: INFO: Starting…
sunrise: 07:19
sunset : 17:32
Connecting to 00:80:25:34:D7:43 (1/10)
------ truncated and MACs edited
Connecting to 00:80:25:34:D7:43 (10/10)
Wed Aug 3 11:54:25 2022: CRITICAL: bthConnect() returned -1
Wed Aug 3 11:54:25 2022: INFO: Done.
From my desktop directly
Ugh formatting
D:\Users\User\Downloads\SBFspot>SBFspot -v -finq
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 Windows (LE) 32 bit with MySQL support
Commandline Args: -v -finq
Reading config 'SBFspot.cfg'
**Wed Aug 3 12:18:10 2022: INFO: Starting...**
sunrise: 07:19
sunset : 17:32
**Connecting to 00:80:25:34:D7:43 (1/10)**
Initialising...
SUSyID: 125 - SessionID: 904022468
SMA netID=01
Serial Nr: blanked
BT Signal=67.8%
----
----
etc etc
----
----
**Wed Aug 3 12:18:17 2022: INFO: Done.**
FYI coming in Home Assistant ver 2022.8
I am not sure how this is going to effect haos-sbfspot as yet, if at all.
This may or may not help the VMware player users
Useful for reseting dead Bluetooth. Although that was on debian 11 not haos
modprobe btusb
systemctl restart bluetooth
This was on Debian VM so Bluetooth was starting dead on reboot… Don’t ask me how I found it I don’t know.
It was related to VMX config. below was originally set to false. So bluetooth was being ignore on Boot.
usb.restrictions.defaultAllow = "TRUE"
profiles/sap/server.c:sap_server_register() Sap driver initialization failed.
This fixed it
OK
I did make some progress. I actually got a connection on VM debian 11 HA docker/supervised. Latest version of Home assistant with the new Bluetooth integration
I did have a 4-5metre extension on my usb2 realtek adapter. The bluetooth is really flakey on the VM.
I had a variety of 10s 60s and a few longer duration connection attempts. Hard to say which was related to failed Bluetooth though. the adapter keeps falling off the VM.
There is a possibility that bluetoothctl scan on helps with a connection…
It should work on a NUC though. It worked fine without the extension across my desk once the flakey BT was sorted.
bash-5.1# ./usr/bin/sbfspot/SBFspot -v -finq
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 -finq
Reading config ‘/usr/bin/sbfspot/SBFspot.cfg’
Thu Aug 4 22:22:40 2022: INFO: Starting…
sunrise: 07:18
sunset : 17:33
Connecting to 00:80:87:23:65:56 (1/10)
Connecting to 00:80:87:23:65:56 (2/10)
Connecting to 00:80:87:23:65:56 (3/10)
Connecting to 00:80:87:23:65:56 (4/10)
Connecting to 00:80:87:23:65:56 (5/10)
Connecting to 00:80:87:23:65:56 (6/10)
Connecting to 00:80:87:23:65:56 (7/10)
Connecting to 00:80:87:23:65:56 (8/10)
Connecting to 00:80:87:23:65:56 (9/10)
Connecting to 00:80:87:23:65:56 (10/10)
Thu Aug 4 22:23:42 2022: CRITICAL: bthConnect() returned -1
Thu Aug 4 22:23:42 2022: INFO: Done.
bash-5.1# /uname -a
bash: /uname: No such file or directory
bash-5.1# uname -a
Linux a51a23d8-haos-sbfspot 5.10.0-16-amd64 #1 SMP Debian 5.10.127-2 (2022-07-23) x86_64 Linux
bash-5.1#
[22:19:32] INFO: [Host Bluetooth MAC Address] Controller 00:1A:7D:DA:71:13 has64vm [default]
Starting daemon
Starting cron in foreground
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 -ad1 -am0 -ae0 -mqtt
Reading config ‘/usr/bin/sbfspot/SBFspot.cfg’
Thu Aug 4 22:20:00 2022: INFO: Starting…
sunrise: 07:18
sunset : 17:33
Nothing to do… it’s dark. Use -finq to force inquiry.
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 Aug 4 22:20:02 2022: INFO: Starting…
sunrise: 07:18
sunset : 17:33
Connecting to 00:80:87:23:65:56 (1/10)
Initialising…
BT Signal=68.6%
…
Thu Aug 4 22:20:07 2022: INFO: Done.
Hiyas
Anyone here got ethernet connection to their router? I need to test new version before I merge them.
The details of how to connect are on the link.
HAOS-SBFspot Released 2022.8.3
It should update fine over previous version. (mine did).
I do suggest copying your previous config just in case.
There are a few additional config options to cater for Ethernet connections.
I haven’t had anyone test the Ethernet part as yet, but it should work for those with an ethernet connection to their inverter.
Yaml Example.
Connection_Type: "Bluetooth" <--- New. There is a radio button to change to Ethernet
BTAddress: ""
Password: "0000"
LocalBTAddress: "00:00:00:00:00:00"
IP_Address: "255.255.255.255" <--- New for Ethernet, can be Blank for Bluetooth
Let me know either way if the Ethernet version connects. Thanks.
HAOS-SBFspot Released 2022.8.4
Minor changes to Options.
bump MariaDB deps to latest
-
Added translations to increase the detail of options.
Most of the info is also available in the Official SPFspot default configs. or
repo /usr/bin/sbfspot default configs. if you need to find a default setting. -
MQTT_enable is a defunct legacy option that has been removed.
If you have it in yaml options it will produce a warning in the supervisor logs.
It can be safely deleted from the yaml options config.
Ethernet remains untested as far as I know. It should work for ethernet or speedwire.
Hi,
I said I would get back with my experiences of trying to connect via a Synology VM.
I have added a 5m USB cable to my system but I am still unable to connect to the
SMA inverter. The Synology virtual machine appears to be working ok as far as the bluetooth dongle goes.
VM: Synology DSM7.1
Home Assistant 2022.8.7
Supervisor 2022.08.3
Operating System 8.5
Frontend 20220802.0 - latest
SbfSPOT 2022.8.4
I start up the VM and go to hardware and search for bluetooth.
BUSNUM: '002' DEVNAME: /dev/bus/usb/002/002 DEVNUM: '002' DEVPATH: /devices/pci0000:00/0000:00:04.0/usb2/2-1 DEVTYPE: usb_device DRIVER: usb ID_BUS: usb ID_MODEL: Bluetooth_Radio ID_MODEL_ENC: Bluetooth\x20Radio ID_MODEL_ID: '8771' ID_PATH: pci-0000:00:04.0-usb-0:1 ID_PATH_TAG: pci-0000_00_04_0-usb-0_1 ID_REVISION: '0200' ID_SERIAL: Realtek_Bluetooth_Radio_00E04C239987 ID_SERIAL_SHORT: 00E04C239987 ID_USB_INTERFACES: ':e00101:' ID_VENDOR: Realtek ID_VENDOR_ENC: Realtek ID_VENDOR_ID: 0bda MAJOR: '189' MINOR: '129' PRODUCT: bda/8771/200 SUBSYSTEM: usb TYPE: 224/1/1 USEC_INITIALIZED: '2899765'
This is the log from sbfSPOT
s6-rc: info: service s6rc-oneshot-runner: startings6-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)
s6-rc: info: service legacy-services successfully started
[17:09:03] INFO:
[17:09:03] INFO: Linux 5.15.60 #1 SMP Tue Aug 16 12:26:36 UTC 2022 x86_64
[17:09:03] INFO:
[17:09:03] INFO:
[17:09:03] INFO: [Host Bluetooth MAC Address] Controller 00:E0:4C:9E:CF:03 homeassistant [default]
[17:09:03] INFO:
[17:09:06] INFO:
[17:09:06] INFO:
[17:09:06] INFO: || Generating Bluetooth Configs ||
[17:09:06] INFO: || /usr/bin/sbfspot/SBFspot.cfg ||
[17:09:06] INFO: || /usr/bin/sbfspot/SBFspotUpload.cfg ||
[17:09:06] INFO:
[17:09:06] INFO: [Starting SBFspotUpload]
[17:09:06] INFO: [Starting cron in foreground]
SBFspot V3.9.5
Yet another tool to read power production of SMA solar inverters
(c) 2012-2022, SBF (GitHub - SBFspot/SBFspot: Yet another tool to read power production of SMA® solar/battery inverters)
Compiled for Linux (LE) 64 bit with MySQL support
Commandline Args: -v -ad0 -am0 -mqtt -finq
Reading config ‘/usr/bin/sbfspot/SBFspot.cfg’
Sun Aug 28 17:09:36 2022: INFO: Starting…
sunrise: 06:15
sunset : 17:33
Connecting to 00:80:25:15:44:C0 (1/10)
Connecting to 00:80:25:15:44:C0 (2/10)
Connecting to 00:80:25:15:44:C0 (3/10)
Connecting to 00:80:25:15:44:C0 (4/10)
Connecting to 00:80:25:15:44:C0 (5/10)
Connecting to 00:80:25:15:44:C0 (6/10)
Connecting to 00:80:25:15:44:C0 (7/10)
Connecting to 00:80:25:15:44:C0 (8/10)
Connecting to 00:80:25:15:44:C0 (9/10)
Connecting to 00:80:25:15:44:C0 (10/10)
Sun Aug 28 17:09:45 2022: CRITICAL: bthConnect() returned -1
Sun Aug 28 17:09:45 2022: INFO: Done.
SBFspot V3.9.5
Yet another tool to read power production of SMA solar inverters
(c) 2012-2022, SBF (GitHub - SBFspot/SBFspot: Yet another tool to read power production of SMA® solar/battery inverters)
Compiled for Linux (LE) 64 bit with MySQL support
Commandline Args: -v -ad1 -am0 -ae0 -mqtt
Reading config ‘/usr/bin/sbfspot/SBFspot.cfg’
Sun Aug 28 17:10:00 2022: INFO: Starting…
SBFspotUploadDaemon Version 3.0.1
Loglevel=2
LogDir=/data/sbfspot/log/
sunrise: 06:15
sunset : 17:33
Connecting to 00:80:25:15:44:C0 (1/10)
Connecting to 00:80:25:15:44:C0 (2/10)
Connecting to 00:80:25:15:44:C0 (3/10)
Connecting to 00:80:25:15:44:C0 (4/10)
Connecting to 00:80:25:15:44:C0 (5/10)
Connecting to 00:80:25:15:44:C0 (6/10)
Connecting to 00:80:25:15:44:C0 (7/10)
Connecting to 00:80:25:15:44:C0 (8/10)
Connecting to 00:80:25:15:44:C0 (9/10)
Connecting to 00:80:25:15:44:C0 (10/10)
Sun Aug 28 17:10:09 2022: CRITICAL: bthConnect() returned -1
Sun Aug 28 17:10:09 2022: INFO: Done.
[17:10:45] INFO: [SBFspot Upload Log Latest] [17:10:06.592] INFO: Starting Daemon…
Obviously no connection
Finally YAML setup
Connection_Type: Bluetooth
BTAddress: 00:80:25:15:44:C0
Password: “!secret SMA-Home-User-Password”
LocalBTAddress: “00:00:00:00:00:00”
IP_Address: 255.255.255.255
MIS_Enabled: 0
Plantname: Home-SMA
OutputPath: /data/sbfspot/%Y
OutputPathEvents: /data/sbfspot/%Y/events
Latitude: -30.5036
Longitude: 151.6523
CalculateMissingSpotValues: 1
DateTimeFormat: “%d/%m/%Y %H:%M:%S”
DateFormat: “%d/%m/%Y”
DecimalPoint: comma
TimeFormat: “%H:%M:%S”
SynchTime: 0
SynchTimeLow: 1
SynchTimeHigh: 3600
SunRSOffset: 900
Locale: en-US
Timezone: Australia/Sydney
BTConnectRetries: 10
CSV_Export: 0
CSV_ExtendedHeader: 1
CSV_Header: 1
CSV_SaveZeroPower: 1
CSV_Delimiter: semicolon
CSV_Spot_TimeSource: Inverter
CSV_Spot_WebboxHeader: 0
SQL_Database: SBFspot
SQL_Hostname: core-mariadb
SQL_Port: “3306”
SQL_Username: “!secret sbfspot-mariadb-user”
SQL_Password: “!secret sbfspot-mariadb-password”
MQTT_Publisher: /usr/bin/mosquitto_pub
MQTT_Host: core-mosquitto
MQTT_Port: “1883”
MQTT_Topic: homeassistant/sbfspot_{plantname}/sbfspot_{serial}
MQTT_ItemFormat: “"{key}": {value}”
MQTT_ItemDelimiter: comma
MQTT_PublisherArgs: “!secret sbfspot-mqtt-publisherargs”
MQTT_Data: >-
Timestamp,SunRise,SunSet,InvSerial,InvName,InvTime,InvStatus,InvTemperature,InvGridRelay,EToday,ETotal,GridFreq,PACTot,UDC1,UDC2,IDC1,IDC2,PDC1,PDC2
PVoutput_SID: “2100334356:92105”
PVoutput_Key: “!secret PVoutput_Key_API”
LogDir: /data/sbfspot/log/
LogLevel: info
MQTT_ENABLE: “1”
I tried it with the local BT address both filled in and blank. Same result. The bluetooth connection is also showing up in the bluetooth configuration in Home Assistant as “hci0”
Still working on my Pi.
Laurie
Yeah its pretty flakey on a VM I gotta say. I set up 2 HAOS VMs and a Deb/Docker/Supervisor using VMware player.
I can’t get either of the HAOS VMs to connect to anything bluetooth really. I can scan and trust and connect, but pairing with Bluetoothctl is pretty fruitless.
The Debian connects sometimes… mostly depending on when I put the dongle in, it doesn’t handle reboots very well. Once it connects it’s pretty consistent. Distance from my desktop to my inverter is probably 8-10 metres. A usb extension(4 or 5 meter one) didn’t improve things much.
That’s with el cheapo mini dongles that connect otherwise. Connects fine if I run SBPspot directly from windows with no extension.
On the upside the deb/docker/supervisor is good for testing the addon and doing upgrades…
The docker vm seems to handle it best if I pop the dongle in before the OS loads…
Ooohh I also usually don’t configure the bluetooth integration. It just sits waiting in auto discovery
That option has been removed. It wasn’t being used, it just throws warnings to the supervisor log.
It can be removed from options.
Thanks for building this addon, it’s something I have been looking for a while now! I have been using PV Bean Counter for a few years now running on a Win10 and uploading to PV Output. This works OK but from time to time it needs massaging to get it back to life.
I tried setting this addon up a few months ago but got busy and never really got it working. Trying again now that I have a bit more time but no matter what I do I get the error below. Even the default config throws up the error. I have tried entering the config parameters directly and also using the secrets file but get the same error. I have updated to the latest build 2022.9.1.
I’m not sure how to get setup…
Have you restarted HA since saving the secrets?
That error message is the worst, not very helpful when you can’t read it all.
Would you mind posting the yaml version (with sensitive stuff removed)?
That’s my yaml config… ignore the extended sensor, this is my test version config.
Connection_Type: Bluetooth
Sensors_HA: "No"
BTAddress: "!secret BTAddress"
Password: "!secret SBFpassword"
LocalBTAddress: "!secret LocalBTAddress"
IP_Address: 255.255.255.255
Plantname: "!secret SBFplantname"
Latitude: "!secret home_lat"
Longitude: "!secret home_long"
Timezone: "!secret Timezone"
DateTimeFormat: "'%H:%M:%S %d-%m-%y'"
SQL_Password: "!secret mariadb_pw"
MQTT_User: "!secret mqtt_user"
MQTT_Pass: "!secret mqtt_pass"
MQTT_Topic: homeassistant/sbfspot_{plantname}/sbfspot_{serial}
MQTT_Data: >-
PrgVersion,Plantname,Timestamp,SunRise,SunSet,InvSerial,InvName,InvTime,InvStatus,InvSwVer,InvClass,InvType,InvTemperature,InvGridRelay,EToday,ETotal,GridFreq,PACTot,PAC1,PAC2,PAC3,UAC1,UAC2,UAC3,IAC1,IAC2,IAC3,OperTm,FeedTm,PDCTot,PDC1,PDC2,PDC,UDC1,UDC2,UDC,IDC1,IDC2,IDC,BTSignal,InvWakeupTm,InvSleepTm,MeteringWOut,MeteringWIn,MeteringWTot
PVoutput_SID: "!secret pvoSID"
PVoutput_Key: "!secret pvoAPIkey"
LogLevel: info
Yes I have restarted HA after setting the secret file. I also tried removing the add-on and re-installing but the same error.
My config is basically the default, I’m using BT config and all the settings in the secrets file minus the LocalBTAddress.
Connection_Type: Bluetooth
Sensors_HA: "No"
BTAddress: "!secret BTAddress"
Password: "!secret SBFpassword"
LocalBTAddress: "!secret LocalBTAddress"
IP_Address: 255.255.255.255
Plantname: "!secret SBFplantname"
Latitude: "!secret home_lat"
Longitude: "!secret home_long"
Timezone: "!secret Timezone"
DateTimeFormat: "'%H:%M:%S %d-%m-%y'"
SQL_Password: "!secret mariadb_pw"
MQTT_User: "!secret mqtt_user"
MQTT_Pass: "!secret mqtt_pass"
MQTT_Topic: homeassistant/sbfspot_{plantname}/sbfspot_{serial}
MQTT_Data: >-
Timestamp,SunRise,SunSet,InvSerial,InvName,InvTime,InvStatus,InvSwVer,InvClass,InvType,InvTemperature,OperTm,FeedTm,EToday,ETotal,GridFreq,PACTot,PAC1,UAC1,IAC1,PDCTot,UDC1,UDC2,IDC1,IDC2,PDC1,PDC2,BTSignal
PVoutput_SID: "!secret pvoSID"
PVoutput_Key: "!secret pvoAPIkey"
LogLevel: info
Check if that one starts
Connection_Type: Bluetooth
Sensors_HA: "No"
BTAddress: "!secret BTAddress"
Password: "!secret SBFpassword"
LocalBTAddress: "00:00:00:00:00:00"
IP_Address: 255.255.255.255
Plantname: "!secret SBFplantname"
Latitude: "!secret home_lat"
Longitude: "50.80"
Timezone: "4.33"
DateTimeFormat: "'%H:%M:%S %d-%m-%y'"
SQL_Password: "!secret mariadb_pw"
MQTT_User: "!secret mqtt_user"
MQTT_Pass: "!secret mqtt_pass"
MQTT_Topic: homeassistant/sbfspot_{plantname}/sbfspot_{serial}
MQTT_Data: >-
Timestamp,SunRise,SunSet,InvSerial,InvName,InvTime,InvStatus,InvSwVer,InvClass,InvType,InvTemperature,OperTm,FeedTm,EToday,ETotal,GridFreq,PACTot,PAC1,UAC1,IAC1,PDCTot,UDC1,UDC2,IDC1,IDC2,PDC1,PDC2,BTSignal
PVoutput_SID: "!secret pvoSID"
PVoutput_Key: "!secret pvoAPIkey"
LogLevel: info
Should be able to do process of elimination with this, assuming that saves…
It saves fine for me. So if that doesn’t save… perhaps it’s a browser issue or something.
Connection_Type: Bluetooth
Sensors_HA: "No"
BTAddress: "null"
Password: "null"
LocalBTAddress: "null"
IP_Address: "null"
Plantname: "null"
Latitude: "null"
Longitude: "null"
Timezone: "null"
DateTimeFormat: "null"
SQL_Password: "null"
MQTT_User: "null"
MQTT_Pass: "null"
MQTT_Topic: "null"
MQTT_Data: "null"
PVoutput_SID: "null"
PVoutput_Key: "null"
LogLevel: info
I have gone back to using a pi instead of my virtual machine so that I can use this add on. I had the previous issue. tried a few browsers and same problem with each of them.
It worked with all the “null” values. I then went through and replaced the values one at a time and found which ones did not work. I tried the supplied secret names and found that if I changed any of then it would not save. Also would not save with lat and long using !secret. Not sure what the issue is/was.
My next question is about all the historical data on the inverter. I am in the process of downloading it to CSV files with a possible plan to import them. But I found someone who said they used the following command to download their data. I assumed automatically.
sudo /usr/local/bin/sbfspot.3/SBFspot -v300 -ad300 -am300 -ae300
Is there any way to do this within Home Assistant?
Lastly, it will be interesting to see how the Bluetooth proxy introduced in the latest version will work with your add-on. Might solve the issue with virtual machines.
Thanks again.
Laurie
Going backwards.
Bluetooth proxy/changes didn’t seem to improve the VM situation. I have tried directly on a rpi4 HAOS and deb/docker/supervisor. It works perfectly there. I have also tried on HAOS and deb/docker/supervisor on a win10 VM using vmware player. Out of those two I could only get deb/docker/supervisor to connect. It is probably my VM, but I couldn’t/can’t get HAOS to connect via a VM.
This is possible via portainer and connecting via the console.
Or
docker exec -it haos-sbfspot /bin/bash
I usually use portainer. You don’t need the sudo in the container. It should also take you directly to /usr/bin/sbfspot as that is the working directory. You can run any sbfspot command though…
-finq -help etc
Getting the csv files out… They go to /data/sbfspot/ usually which is a shared folder…
You probably need to add -csv if you want csv files as they are off by default so as not to clutter up drivespace or create unnecessary writes to the drive.
OK so secrets. It is designed to use those specific secrets, they are hard coded into the config. The idea being that if they are set up, you don’t actually need to save the options. You can just start the addon.
Essentially I was being lazy in testing when I was uninstalling and reinstalling a lot, instead of copy/pasting my options… I just saved the secrets.
You can use your own secrets… But you have to save them in the options. You can actually also fill out all the options if you really want. They are hidden down the bottom of options.
Lat and long… They are set to string. But for whatever reason it gets upset after more than 2 or 3 decimal places. Don’t ask me why.
So -20.12 is ok but -20.12234 it doesn’t like.
I was actually going to try to make it use homeassistant lat and long, but I didn’t figure that out yet.
As a side note while talking about options…
It’s probably best to switch the options back to No after you Create sensors. Create will make the sensors everytime the addon loads, which seems ok… But to be safe, No is probably better.
OS9 makes connecting via HAOS on x86 VM work for me…
It should be available now… or very soon!