Page 1 of 1

SBFspot how to import database from the CSV files

Posted: Wednesday 15 June 2022 18:46
by jovo
Hi all,
I have a specific issue / question on my setup. Let me try to explain:
I have a PI with a BLE USB dongle reading my SMA converter stats and add the readings in the CSV file, per the SBFspot implementation. This is working fine.
On my Domoticz server (located elsewhere), i have the drive mounted with the CSV files from the PI and they are visible in my Domoticz server.
My objective is to use this data and make it visible as SOLARMAIN in Domoticz.

I am trying to do this by adding the SBFspot software in the domoticz server and adding the SMASpot under hardware.
Here i have two problems:
1) when running the SBFspot command, it fails because the BT is not existing. It doesnt need it, because it already has the data from the SBFspot on the PI.
2) when adding the SMAspot hardware under Domoticz hardware, there is an option to import old data. However, i dont think it takes it from the CSV files, but tries to recollect this from the Converter instead.

Bottom line: how can I import the solar data from the CSV file into domoticz?
I think if I can get it into the SQLITE database of SBFspot on the domoticz server, it will add this to the Domoticz database as well. However, this is currently not happening. the SQLITE db of SBFspot remains empty and i get this error in the Domoticz log:
Error: SMAspot: No data record found in spot file!

Hope someone can shine a light on this.

Re: SBFspot how to import database from the CSV files

Posted: Wednesday 10 August 2022 11:19
by waltervl
A little late reaction but Domoticz expects a specific SBFspot csv file on a specific location and reads the data from that csv file.
So you could create a dummy sbfSpot.cfg file on your Domoticz server with a output path pointing to your mounted drive. and use that cfg file in the configuration of the SBFSpot gateway in Domoticz.
No need to install SBFSpot on your Domoticz machine as long as the sbfspot csv file is readable from your domoticz server.


See also https://www.domoticz.com/wiki/SMASpot_M ... o_Domoticz

Re: SBFspot how to import database from the CSV files

Posted: Thursday 11 August 2022 11:32
by Doudy

Re: SBFspot how to import database from the CSV files

Posted: Thursday 13 October 2022 20:22
by roelvdh
waltervl wrote: Wednesday 10 August 2022 11:19 A little late reaction but Domoticz expects a specific SBFspot csv file on a specific location and reads the data from that csv file.
So you could create a dummy sbfSpot.cfg file on your Domoticz server with a output path pointing to your mounted drive. and use that cfg file in the configuration of the SBFSpot gateway in Domoticz.
No need to install SBFSpot on your Domoticz machine as long as the sbfspot csv file is readable from your domoticz server.


See also https://www.domoticz.com/wiki/SMASpot_M ... o_Domoticz
I tried your solution but it hasn't yet worked for me. Did I understand correctly:
1. Making a dummy cfg-file on the Domoticz-machine, containing only i.e.:
OutputPath=/home/pi/smadata/2022
2. Referring to that file in Domoticz | Settings | Hardware | SBFspot (SMA) like:
/usr/local/bin/sbfspot.3/dummy.cfg/
should do it? It doesn't yet in my case. I rsync the data from my SBFspot-machine onto the Domoticz-machine, although I understand from the above that I could have made a file link. Where am I going wrong?

Re: SBFspot how to import database from the CSV files

Posted: Saturday 12 November 2022 12:28
by Bramz
Almost the same problem here, although SBFspot and Domoticz run on the same RaspberryPi:

- SBFspot nicely puts the csv's in /home/pi/smadata/2022
- The Hardware setup in Domotics points to Location: /usr/local/bin/sbfspot.3/SBFspot.cfg
- The <SBFspot.cfg> file specifies: OutputPath=/home/pi/smadata/%Y

Yet, the log keeps on saying: Error: Solar system: No data record found in spot file!

This setup worked fine for me during a number of years until a new install of Domoticz and SBFspot after upgrading Linux from Buster to Bullseye started throwing up this error.

Re: SBFspot how to import database from the CSV files

Posted: Sunday 04 December 2022 18:51
by roelvdh
Simple, as always: the ending / should not be there, /usr/local/bin/sbfspot.3/dummy.cfg does it.