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

Raspbian + WSL image 2013-05-2013

Today I have created a new image off raspbian with WSL added.

What is changed?

  • The pi home folder contains a symlink to the nginx folder
  • Updated websolarlog to the latest trunk (build 928)
  • Raspbian almost to the latest version (please do an apt-get update to get the altest)
  • Removed lots off unused files (around 600mb of files)
  • Installed an init script so WSL start after restarting the rpi

Please give any comments in de the google forums.

(Want to upgrade the old image? Information on the second page.)

After installation of the image, please run the following commands;

  1. sudo chown www-data:www-data /usr/share/nginx/www/websolarlog/
  2. sudo chmod -R 777 /usr/share/nginx/www/websolarlog/
Rasberry Pi WebSolarLog Trunk 20130531 (304.0 MiB, 3541 downloads)

md5-Checksum:
2acd4a9740072566913a70415ebac1bc

Announcement: WebSolarLog troubles in combination with SMAspot

The last days we heard from users that they have troubles with Websolarlog in combination with SMAspot.We investigated a few of these issues and our conclusion is;
WebSolarLog is not compatible with other versions then SMAspot 2.0.4We strongly advice all WebSolarLog users with SMAspot to only use “SMAspot 2.0.4” until we have solved this issue.

At the moment we work, with the SMAspot developers, on a SMAspot version which is fully compatible with WebSolarLog for now and the future.

We apologize for this issue and hope to solve it soon.

Raspbian image with WebSolarLog included

We frequently get the question from people;
Do you have a pre- installed/configured image with WebSolarLog?

And we always need to answer that with:
No we don’t have that.

Until now….

We are working on a pre- installed/configure image based on Raspbian and the recently published manual and hope to release it very soon!

The image is based Raspbian (2013-02-09-wheezy-raspbian.zip released at RaspberryPi.org) and WebSolarLog (at the moment of backing the image) build.

The image is designed for the RasperryPi 512MB model and can also be used on the 256MB model. The size of the image is 4GB (probably also for 2gb, needs testing) and can be extented with the raspi-config tool.

The image contains the following:

Be aware that the above supported inverters need some extra programs. These are not installed unless we have native support for it.

We choose these packages because of their lack for hunger on CPU and Memory resources.

The download is approximately 660MB big and you could download it from our servers.

Enjoy!

Rasberry Pi WebSolarLog Trunk 20130508 (629.5 MiB, 1835 downloads)

md5-Checksum: 
2c481b837a6361510413d902e0243ff1