Fix a corrupt WSL database

Fix a corrupt WSL database

In this article we describe how to fix a corrupt WebSolarLog SQLite database.
This guide is only for SQLite databases, please see your Admin::Diagnostics to see on which database type your WebSolarLog is running.
1.

First WE NEED TO MAKE a BACKUP of the database

Go to the WebSolarLog/database directory on your server/host

Stop WSL;
WebSolarLog/scripts/wsl.sh stop
Creat backup of wsl.sdb;
cp wsl.sdb wsl_backup.sdb

Move the original database;
mv wsl.sdb wsl_original.sdb

2.

Lets do it!

Assuming that you are still in the WebSolarLog/database/ directory, run the following commands;
sqlite3 wsl_backup.db

We first run the following integrity command to make sure the database needs some repairs. On the SQLite prompt you run:
pragma integrity_check;

If the result is OK, the database is not corrupted and needs no further actions.

you can quit SQLite by :
.quit

restore the old database;
mv wsl_original.sdb wsl.sdb

If you have error messages you could proceed to Next Steps.

3.

Export Data to plaintext file

To export the WebSolarLog data to an plaintext sql file, run the following commands:

echo .dump | sqlite3 wsl_backup.sdb > wsl_plaintext.sql

Now we have a plaintext file with readable SQL data/commands. You could read the file;
nano wsl_plaintext.sql
4.

Create a new WSL database

Now we have a plaintext file with the data, we need to create a new database

To create a new WSL database, just run the following command:

cat wsl_plaintext.sql | sqlite3 wsl.sdb

This command creates a new WSL database with the original data from the corrupt database.

5.

We are Ready!

If there are no errors, then we could start WSL;

WebSolarLog/scripts/wsl.sh start

For further support, please visite our support group;
https://groups.google.com/forum/#!forum/websolarlog

Weather Forecast: after rain comes sunshine

Recently we added support for the free “OpenWeatherMap – free weather data and forecast API” to WebSolarLog.

With the data from OWM we can do a lot of cool stuff;

  • Display the current weather conditions
  • Display the weather forecast for X days
  • Solar calculations based on the “real(time)” outside temperature
  • Push your local weather condition to PVoutput
  • Maybe a kWh forecast based on cloud conditions
  • and many many more

How to configure WebSolarLog for OWM:

  1. Go to the Admin
  2. Go to the General tab
  3. Fill the Lat and Long field
  4. Save the General settings
  5. Go to the Inverters tab
  6. Click the button “new inverter” i know it is odd, we do some magic and change the “inverter” into a weather station 😉 )
  7. Give the “inverter” a name, example; “Weather Station”
  8. Change Device Api into “Open Weather Map”
  9. Change Device type info “Weather”
  10. Save the inverter
  11. We are done with the configuration of the Weather station.

From now WebSolarLog will retrieve every 5 minutes the realtime weather conditions for your location based on the location you gave in Admin::General

At the moment WebSolarLog doesn’t show the weather data, but this will change in de near feature.

Support for SMA Sunny Boy BlueTooth

Today we added full support for the SMA Sunny Boy BlueTooth solar inverters.
This means that WebSolarLog can log the Sunny Boy inverters with a BlueTooth connection.

The connection with the inverter is made by SMA-spot version 2.0.4 only.
Follow the installation guide of SMA-spot and add the Full path of SMA-spot to the WebSolarLog admin in the Advanced tab and WSL now logs your SMA BlueTooth inverter.

We have tested the WebSolarLog SMA blueTooth support with the following inverters:

  • SMA SB3000-TL21
  • SMA SB2000-HF30
  • SMA SB2500-TLST-21

Planned support for Effekta solar inverters

Currently we are working on the support for the Effekta ES solar inverter series.

We hope to support the following inverters:

  • ES2200 – 2000watt
  • ES3300 – 3000watt
  • ES4200 – 4000watt
  • ES5000 – 5000watt
  • ES 5000 – 2000Watt – 2 MPPT
  • ES 5000 – 3000Watt – 2 MPPT

The support for the Effekta will be added in version 1.1 and we hope to release this version soon. With this release it is possible to log your Effekta inverter with WebSolarLog and it gives you a very powerfull online webbased solar logger.

If you have any questions, suggestions or what so ever regarding this post, feel free to post on our google support forum:
http://www.websolarlog.com/index.php/help-support/