SBFspot still creates 1970 .csv file

Topics: 1. General, 3. Feature Requests
Sep 25, 2014 at 1:25 PM
Since I have v3.0.1 running I didn't receive updates on my own website, where graphs are produced from the .csv files created by sbfspot.

Problem seems to be that V3.0.1 still produces an "Plantname-19700101.csv" and "Plantname-Spot-19700101.csv" at the start of each day, which causes problems for the software creating my graphs.

Problem solved by my cleanup script, so actually this should be an issue, but I had no idea how to describe it as issue.
Coordinator
Sep 25, 2014 at 2:03 PM
Can you provide me a full debuglog (-d5 -v5) of the beginning of the day? There may be several runs in 1 big logfile.
01-JAN-1970 is a UNIX date = 0, so it means SBFspot receives an invalid date (0) at the beginning of the day, probably just before production start
Sep 25, 2014 at 3:40 PM
I have the same issue, but the file names are different. They have a different date. I will capture the log file with the d5 and v5 options.
Sep 26, 2014 at 8:17 AM
I had earlier something like this. As I understand the Raspberry Pi gets its date/and time via the network ans it looks like this take some time.
So when I start up the Raspberry Pi I build in an hold of 15 seconds. I do not know why 15, but it works.

When you want to do (try...) this make cronjob like:
@reboot /path/to/startup.sh
And in startup.sh put at least:
sleep 15s
Succes!
Sep 26, 2014 at 9:40 AM
@fschepers: My Pi is always up and running, so I want SBFspot not to create this 1970 file ;-)

@SBF: two logfiles attached:
  • The full debuglog from when the inverter was on but not yet working (Pac=0 and in grid monitoring): 1970.log
  • A full debuglog from 3 hours later, when the inverter was at work, with little sunshine :( 1970_iw.log
How do I attach those logfiles here??
Sep 26, 2014 at 12:09 PM
Edited Sep 26, 2014 at 12:11 PM
Hi,
Just this morning SBFspot created one of those extraneous files: Squireoaksfarm-19691231.csv. Here are the contents:
sep=;
Version CSV1|Tool SBFspot3.0.0 (Linux)|Linebreaks CR/LF|Delimiter semicolon|Decimalpoint dot|Precision 3

;Squireoaksfarm;Squireoaksfarm
;SB 4000US;SB 4000US
;2002038573;2002038573
;Total yield;Power
;Counter;Analog
dd.MM.yyyy HH:mm:ss;kWh;kW



BTW: When it happens, it always happens just before sunrise.

As Snowmiss asked: How do I attach the log file?

Ron
Coordinator
Sep 26, 2014 at 12:56 PM
@rlpatton
1969-12-31 = 0xFFFFFFFF or -1 (that's also a possible value when there is no valid data yet
You can't attach files to discussions, only to issues; you can send them directly to me

@fschepers
Don't like the delay of 15 precious seconds during boot time either... Is it possible you're on WiFi? ntp service trying to synch before network connection is up?

If it's a bug I'll try to fix it
Sep 27, 2014 at 10:45 AM
@SBF,

The 15 seconds delay has nothing to do with SBFspot. So there is no bug! ;-)

My Raspberry Pi has a wired connection and is starting up every morning.
I checked it (again...): I placed the delay there to get my NAS-server out of her sleep. I will check what will happen when I remove it.

Frans
Sep 29, 2014 at 11:15 AM
The continuing story of 15 seconds delay... I did some more trials.

When I put the next lines in a script on my Raspberry Pi:
FILE="/home/pi/SBFspot/scripts/Times.txt"

START=$(date +%d-%b-%Y" "%T)$'\r'   #   get the date and time
echo "Time 1: "$START  >> $FILE     #   Append line with time 1 to file

sleep 15s   

START=$(date +%d-%b-%Y" "%T)$'\r'   #   get the date and time
echo "Time 2: "$START  >> $FILE     #   Append line with time 2 to file
and I run this script after reboot (cronjob @reboot)
I get the following in the Times.txt file:
Time 1: 29-Sep-2014 11:25:39
Time 2: 29-Sep-2014 11:28:09
Time 1 appears to be the time when the RPi was switched off!
So in the 15 seconds waiting time the RPi adjusts its time. There is no special reason for me to use 15 seconds. May be 1 second will work as well...
And probably there is an other solution to solve this problem.
The RPi has a wired connection to the router.