SBFspot how to import database from the CSV files

Moderator: leecollings

Post Reply
jovo
Posts: 15
Joined: Thursday 12 March 2015 16:57
Target OS: Linux
Domoticz version:
Contact:

SBFspot how to import database from the CSV files

Post 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.
User avatar
waltervl
Posts: 5847
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: SBFspot how to import database from the CSV files

Post 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
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Doudy
Posts: 246
Joined: Tuesday 09 August 2016 9:09
Target OS: -
Domoticz version:
Contact:

Re: SBFspot how to import database from the CSV files

Post by Doudy »

RaspberryPi - RFLink - Zwave - WH2600
Domoticz : 2020.2 | Dashticz : V3.12 Master | dzvents : 3.0.2 | Python : 3.7.3
roelvdh
Posts: 37
Joined: Saturday 18 January 2020 13:40
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.7
Location: NL
Contact:

Re: SBFspot how to import database from the CSV files

Post 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?
Bramz
Posts: 8
Joined: Wednesday 01 October 2014 14:28
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: NL
Contact:

Re: SBFspot how to import database from the CSV files

Post 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.
RPi B, RFXtrx 433e, KaKu switches, P1-Smart Meter cable v2, CO2 sensor, 1Wire-WirelessMultiSensor, SBFspot/PV-output
roelvdh
Posts: 37
Joined: Saturday 18 January 2020 13:40
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.7
Location: NL
Contact:

Re: SBFspot how to import database from the CSV files

Post by roelvdh »

Simple, as always: the ending / should not be there, /usr/local/bin/sbfspot.3/dummy.cfg does it.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest