Bad request 400: Power value too high

Topics: 5. Support
Aug 21, 2016 at 8:22 AM
I hope someone can help I am running the latest version of SBFspot and everything has been running fine until I returned from holiday to find the on the 15/8/2016 @ 13:35 everything stopped.

I have checked through the logs and found that there are around 100 uploads that are failing because I have the error "Bad request 400: Power value [2147483647] too high"

I though that this had be fixed in previous versions can some one help me get this uploads going again ?

Thanks in advance

Simon
Marked as answer by simonbeswick on 8/21/2016 at 6:14 AM
Aug 21, 2016 at 1:14 PM
All sorted found the corrupt DB entry and removed working again
Coordinator
Aug 22, 2016 at 7:28 AM
To avoid this in the future you can use the workaround described in issue 132
In your case, use 3600 as max value
CASE WHEN dd.Power > 3600
THEN 0
ELSE dd.Power
END AS V2,
Sep 18, 2016 at 10:44 PM
Edited Sep 18, 2016 at 11:24 PM
@simonbeswick
Can you point out for me were to look for a corrupt db and/or the name of that db? (found it
Thanks, Hein

Strange however that the upload to PVoutput failed and all other data are correct.
Domoticz displays everything correct.

Maybe I have found a simple solution.
renamed SBFspot.db to SBFspot-old.db
created new SBFspot.db
see what tomorrow will bring and see if the output to PVoutput is restored.
Sep 22, 2016 at 12:41 PM
Sorry for the delay. To resolve the problem you will need a copy of
winscp (http://winscp.net/download/WinSCP-5.9.1-Setup.exe)

Once this is installed configure a connection to your raspberry pi

Right had panel you will need to navigate to /home/pi/smadata

here you will find the file SBFspot.db

Download this to PC you can do this by dragging the file to the left
and releasing in the folder of your choice I would recommend your
desktop for now.

Once you have the DB on you PC you will need to open it for this you
will need SQL Lite browser (http://sqlitebrowser.org/)

Install this application and open the database you save to your desktop earlier

Click on the browse data tab

Underneath select the table DayData

Click on the column power so that the data is sorted in a descending order

Click on the record(s) that has the corrupt data in and on the top
line click the delete record button.

Once this is done

Click on file and write changes.

Close the SQL Lite browser

and copy the file back to the Pi by reversing the procedure above this
time dragging the database from the desktop to the /home/pi/smadata
folder

restart the Pi and you should be good to go

Hope this helps

Regards

Simon