SBFSpot stopped uploading

I installed SBFspot a few weeks ago using the sbfspot-config script on a Raspberry Pi. It worked fine for 6 days. Then I shut the pi down, and created a copy of the SD card (using dd on a mac). I started the Pi with the new SD card (the original one had been in service for a while, and I wanted to prevent potential corruption). Everything works, except the upload to PVOutput.

I checked the status

$ sudo systemctl status SBFspotUpload
● SBFspotUpload.service - SBFspot Upload Daemon
   Loaded: loaded (/usr/local/bin/sbfspot.3/SBFspotUpload.service; enabled; vendor preset: enabled)
   Active: active (running) since Sat 2019-08-03 09:53:22 PDT; 4 days ago
 Main PID: 457 (SBFspotUploadDa)
    Tasks: 1 (limit: 4915)
   Memory: 8.2M
      CPU: 38min 7.139s
   CGroup: /system.slice/SBFspotUpload.service
           └─457 /usr/local/bin/sbfspot.3/SBFspotUploadDaemon

Warning: Journal has been rotated since unit was started. Log output is incomplete or unavailable.

And I’m getting data in the /home/pi/smadata/logs folder, but none of the PV data is showing up on the PVoutput website. I have a RainForest Eagle uploading data as well, and the consumption data looks fine on the PVoutput website.

I am missing about 4 days of data so far.

Any suggestions?


What is in the daemon log file?
Are the records available?

select * from vwPvoData;

It looks like there is a corrupt value, which is tripping up the upload:
[09:46:30] ERROR: Uploading 38 datapoints, starting with 20190803,06:40,1386229,16634760 Bad request 400: Power value [16634760] too high for system size [4095]

This is from the database:
2019-08-03 06:45:00|SB3.8-1SP-US-40 377|Sunny Boy 3.8|1990039377|1386229|0|||||||||||
2019-08-03 06:40:00|SB3.8-1SP-US-40 377|Sunny Boy 3.8|1990039377|1386229|16634760|||||||||||
2019-08-02 20:00:00|SB3.8-1SP-US-40 377|Sunny Boy 3.8|1990039377|1386229|12|||0.0|121.96|||||||1

Unfortunately it has been stuck for 5 days at this point, because it keeps trying to upload the corrupt value and it gets rejected.

Is there a way to drop that record from the table?


Sure, have a look at this thread
Once fixed, the daemon will upload all missing data.

Thanks, that worked. All the missing data has been uploaded. Excellent!