Hi,
As I already ran into an issue with a corrupt SD card on my raspberry pi for the second time, running only sbfspot, I wanted to install the latest version, with a mysql DB, running on a synology NAS
I based myself on the documentation "SBFspot V3 Quick Reference Linux EN 1.0.pdf"
Everything seems to going ok (DB connection test is also funtioning), until I run an SBFspot test ( /usr/local/bin/sbfspot.3/SBFspot -v -finq -nocsv)
It connects to the inverters, reads all data, but when trying to connect to the MYSQL DB, it fails
```
[2016-02-20 10:21:17.755] Error: Can't open MySQL db [/home/pi/smadata/SBFspot.db] : Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)_
```
for some reason, it looks like it is still trying to connect to a local SQLite DB...
Folowing is the relevant DB connection info from the SBFSpot.cfg file
```
# SQLite
# SQL_Database (Fullpath to SQLite DB)
# Windows: C:\Users\Public\SMAdata\SBFspot.db
# Linux : /home/pi/smadata/SBFspot.db
# SQL_Database=/home/pi/smadata/SBFspot.db
# MySQL
SQL_Database=SBFspot
SQL_Hostname=192.168.10.10
SQL_Username=SBFspotUser
SQL_Password=password
```
The connectionstring I used for testing the DB connection (this is working):
```
mysql --host=192.168.10.10 --user=SBFspotUser --password=password
```
Anybody an idea?
Comments: it is the output of sbfspot..... Here is the full output: ``` SBFspot V3.1.2 Yet another tool to read power production of SMA solar inverters (c) 2012-2015, SBF (https://sbfspot.codeplex.com) Compiled for Linux (LE) 32 bit Commandline Args: -v -finq -nocsv Reading config '/usr/local/bin/sbfspot.3/SBFspot.cfg' Tue Feb 23 16:20:44 2016: INFO: Starting... sunrise: 07:38 sunset : 18:06 Connecting to 00:80:25:16:64:C6 (1/10) Initializing... SUSyID: 125 - SessionID: 802260113 (0x2FD18491) SMA netID=07 Waiting for network to be built... SUSyID: 78 - SN: 2100280013 SUSyID: 78 - SN: 2100278992 BT Signal=69% Logon OK Local Time: 23/02/2016 16:20:47 TZ offset (s): 3600 - DST: Off SUSyID: 78 - SN: 2100280013 Device Name: SN: 2100280013 Device Class: PV-omvormers Device Type: SB 4000TL-20 Software Version: 03.20.01.R Serial number: 2100280013 SUSyID: 78 - SN: 2100278992 Device Name: SN: 2100278992 Device Class: PV-omvormers Device Type: SB 4000TL-20 Software Version: 03.20.01.R Serial number: 2100278992 SUSyID: 78 - SN: 2100280013 Device Status: OK SUSyID: 78 - SN: 2100278992 Device Status: OK SUSyID: 78 - SN: 2100280013 Device Temperature: 35.0°C SUSyID: 78 - SN: 2100278992 Device Temperature: 33.0°C SUSyID: 78 - SN: 2100280013 GridRelay Status: Gesloten SUSyID: 78 - SN: 2100278992 GridRelay Status: Gesloten SUSyID: 78 - SN: 2100280013 Pac max phase 1: 4000W Pac max phase 2: 4000W Pac max phase 3: 4000W SUSyID: 78 - SN: 2100278992 Pac max phase 1: 4000W Pac max phase 2: 4000W Pac max phase 3: 4000W SUSyID: 78 - SN: 2100280013 Energy Production: EToday: 7.560kWh ETotal: 24901.297kWh Operation Time: 23225.60h Feed-In Time : 22209.44h SUSyID: 78 - SN: 2100278992 Energy Production: EToday: 7.461kWh ETotal: 24180.673kWh Operation Time: 23237.45h Feed-In Time : 22056.51h SUSyID: 78 - SN: 2100280013 DC Spot Data: String 1 Pdc: 0.049kW - Udc: 267.65V - Idc: 0.188A String 2 Pdc: 0.043kW - Udc: 268.21V - Idc: 0.164A SUSyID: 78 - SN: 2100278992 DC Spot Data: String 1 Pdc: 0.033kW - Udc: 272.34V - Idc: 0.128A String 2 Pdc: 0.043kW - Udc: 268.32V - Idc: 0.164A SUSyID: 78 - SN: 2100280013 AC Spot Data: Phase 1 Pac : 0.000kW - Uac: 0.00V - Iac: 0.000A Phase 2 Pac : 0.000kW - Uac: 0.00V - Iac: 0.000A Phase 3 Pac : 0.076kW - Uac: 235.98V - Iac: 0.328A Total Pac : 0.076kW SUSyID: 78 - SN: 2100278992 AC Spot Data: Phase 1 Pac : 0.000kW - Uac: 0.00V - Iac: 0.000A Phase 2 Pac : 0.078kW - Uac: 228.98V - Iac: 0.342A Phase 3 Pac : 0.000kW - Uac: 0.00V - Iac: 0.000A Total Pac : 0.078kW SUSyID: 78 - SN: 2100280013 Grid Freq. : 49.98Hz SUSyID: 78 - SN: 2100278992 Grid Freq. : 49.98Hz SUSyID: 78 - SN: 2100280013 Current Inverter Time: 23/02/2016 15:20:57 Inverter Wake-Up Time: 23/02/2016 07:01:18 Inverter Sleep Time : 23/02/2016 15:20:59 SUSyID: 78 - SN: 2100278992 Current Inverter Time: 23/02/2016 15:21:56 Inverter Wake-Up Time: 23/02/2016 07:02:10 Inverter Sleep Time : 23/02/2016 15:21:57 [2016-02-23 16:20:49.921] Error: Can't open MySQL db [/home/pi/smadata/SBFspot.db] : Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) ******************** * ArchiveDayData() * ******************** startTime = 56CB92F0 -> 23/02/2016 00:00:00 ********************** * ArchiveMonthData() * ********************** startTime = 56AF3AB0 -> 01/02/2016 12:00:00 ********************** * ArchiveMonthData() * ********************** startTime = 56AF3AB0 -> 01/02/2016 12:00:00 Reading events: 2016-Feb-01 Tue Feb 23 16:20:51 2016: INFO: Done. ```
As I already ran into an issue with a corrupt SD card on my raspberry pi for the second time, running only sbfspot, I wanted to install the latest version, with a mysql DB, running on a synology NAS
I based myself on the documentation "SBFspot V3 Quick Reference Linux EN 1.0.pdf"
Everything seems to going ok (DB connection test is also funtioning), until I run an SBFspot test ( /usr/local/bin/sbfspot.3/SBFspot -v -finq -nocsv)
It connects to the inverters, reads all data, but when trying to connect to the MYSQL DB, it fails
```
[2016-02-20 10:21:17.755] Error: Can't open MySQL db [/home/pi/smadata/SBFspot.db] : Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)_
```
for some reason, it looks like it is still trying to connect to a local SQLite DB...
Folowing is the relevant DB connection info from the SBFSpot.cfg file
```
# SQLite
# SQL_Database (Fullpath to SQLite DB)
# Windows: C:\Users\Public\SMAdata\SBFspot.db
# Linux : /home/pi/smadata/SBFspot.db
# SQL_Database=/home/pi/smadata/SBFspot.db
# MySQL
SQL_Database=SBFspot
SQL_Hostname=192.168.10.10
SQL_Username=SBFspotUser
SQL_Password=password
```
The connectionstring I used for testing the DB connection (this is working):
```
mysql --host=192.168.10.10 --user=SBFspotUser --password=password
```
Anybody an idea?
Comments: it is the output of sbfspot..... Here is the full output: ``` SBFspot V3.1.2 Yet another tool to read power production of SMA solar inverters (c) 2012-2015, SBF (https://sbfspot.codeplex.com) Compiled for Linux (LE) 32 bit Commandline Args: -v -finq -nocsv Reading config '/usr/local/bin/sbfspot.3/SBFspot.cfg' Tue Feb 23 16:20:44 2016: INFO: Starting... sunrise: 07:38 sunset : 18:06 Connecting to 00:80:25:16:64:C6 (1/10) Initializing... SUSyID: 125 - SessionID: 802260113 (0x2FD18491) SMA netID=07 Waiting for network to be built... SUSyID: 78 - SN: 2100280013 SUSyID: 78 - SN: 2100278992 BT Signal=69% Logon OK Local Time: 23/02/2016 16:20:47 TZ offset (s): 3600 - DST: Off SUSyID: 78 - SN: 2100280013 Device Name: SN: 2100280013 Device Class: PV-omvormers Device Type: SB 4000TL-20 Software Version: 03.20.01.R Serial number: 2100280013 SUSyID: 78 - SN: 2100278992 Device Name: SN: 2100278992 Device Class: PV-omvormers Device Type: SB 4000TL-20 Software Version: 03.20.01.R Serial number: 2100278992 SUSyID: 78 - SN: 2100280013 Device Status: OK SUSyID: 78 - SN: 2100278992 Device Status: OK SUSyID: 78 - SN: 2100280013 Device Temperature: 35.0°C SUSyID: 78 - SN: 2100278992 Device Temperature: 33.0°C SUSyID: 78 - SN: 2100280013 GridRelay Status: Gesloten SUSyID: 78 - SN: 2100278992 GridRelay Status: Gesloten SUSyID: 78 - SN: 2100280013 Pac max phase 1: 4000W Pac max phase 2: 4000W Pac max phase 3: 4000W SUSyID: 78 - SN: 2100278992 Pac max phase 1: 4000W Pac max phase 2: 4000W Pac max phase 3: 4000W SUSyID: 78 - SN: 2100280013 Energy Production: EToday: 7.560kWh ETotal: 24901.297kWh Operation Time: 23225.60h Feed-In Time : 22209.44h SUSyID: 78 - SN: 2100278992 Energy Production: EToday: 7.461kWh ETotal: 24180.673kWh Operation Time: 23237.45h Feed-In Time : 22056.51h SUSyID: 78 - SN: 2100280013 DC Spot Data: String 1 Pdc: 0.049kW - Udc: 267.65V - Idc: 0.188A String 2 Pdc: 0.043kW - Udc: 268.21V - Idc: 0.164A SUSyID: 78 - SN: 2100278992 DC Spot Data: String 1 Pdc: 0.033kW - Udc: 272.34V - Idc: 0.128A String 2 Pdc: 0.043kW - Udc: 268.32V - Idc: 0.164A SUSyID: 78 - SN: 2100280013 AC Spot Data: Phase 1 Pac : 0.000kW - Uac: 0.00V - Iac: 0.000A Phase 2 Pac : 0.000kW - Uac: 0.00V - Iac: 0.000A Phase 3 Pac : 0.076kW - Uac: 235.98V - Iac: 0.328A Total Pac : 0.076kW SUSyID: 78 - SN: 2100278992 AC Spot Data: Phase 1 Pac : 0.000kW - Uac: 0.00V - Iac: 0.000A Phase 2 Pac : 0.078kW - Uac: 228.98V - Iac: 0.342A Phase 3 Pac : 0.000kW - Uac: 0.00V - Iac: 0.000A Total Pac : 0.078kW SUSyID: 78 - SN: 2100280013 Grid Freq. : 49.98Hz SUSyID: 78 - SN: 2100278992 Grid Freq. : 49.98Hz SUSyID: 78 - SN: 2100280013 Current Inverter Time: 23/02/2016 15:20:57 Inverter Wake-Up Time: 23/02/2016 07:01:18 Inverter Sleep Time : 23/02/2016 15:20:59 SUSyID: 78 - SN: 2100278992 Current Inverter Time: 23/02/2016 15:21:56 Inverter Wake-Up Time: 23/02/2016 07:02:10 Inverter Sleep Time : 23/02/2016 15:21:57 [2016-02-23 16:20:49.921] Error: Can't open MySQL db [/home/pi/smadata/SBFspot.db] : Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) ******************** * ArchiveDayData() * ******************** startTime = 56CB92F0 -> 23/02/2016 00:00:00 ********************** * ArchiveMonthData() * ********************** startTime = 56AF3AB0 -> 01/02/2016 12:00:00 ********************** * ArchiveMonthData() * ********************** startTime = 56AF3AB0 -> 01/02/2016 12:00:00 Reading events: 2016-Feb-01 Tue Feb 23 16:20:51 2016: INFO: Done. ```