Page 1 of 1

Sunshine readings from solar panels?

Posted: Sat 19 May 2012 9:33 pm
by rwg
It occurred to me the other day that although my weather station (Oregon WMR180) doesn't have a solar monitor, I do have solar readings from my solar PV array, which I have some scripts monitoring in real time via the bluetooth functionality of the inverter. When I look at the graph of output over the day, it's fairly easy to pick out the sunny intervals from the cloudy ones, which got me thinking could I somehow feed this information into Cumulus?

Now, as far as I can see, Cumulus talks to one weather station and that is it's only source of data, but I thought I'd just post here to check in case I'm wrong or if someone has any ideas about how this sort of hook up might be done.

The only thing that I can think of so far is to have a script that edits the monthly log file after Cumulus writes each new set of data to it. Would this work? Does Cumulus lock that file while it is running? If I write changes to it, will they reflected in the UI or does Cumulus ignore the contents if it is running because it already has the data in memory?

Any ideas welcome!

cheers,

Robin

Re: Sunshine readings from solar panels?

Posted: Sat 19 May 2012 10:35 pm
by steve
Adding solar data to the logs would mean that you could create a graph of it in Select-A-Graph. It wouldn't be displayed on the main screen, and it wouldn't be used for the sunshine hours calculation.

Re: Sunshine readings from solar panels?

Posted: Sat 26 May 2012 7:08 pm
by rwg
Thanks Steve, that makes sense. I'm afraid I didn't get back to this topic until now because I forgot to tick the 'notify me of replies' box when posting :(

I will try writing the script and see if I can make that bit work.

cheers,

Robin

Re: Sunshine readings from solar panels?

Posted: Sat 26 May 2012 7:30 pm
by steve
It occurs to me that you could use the input method for the Blake-Larsen sun recorder (enabled by the 'Use B/L' setting in the station settings) . If you can automatically create a file in the Cumulus data folder called SRsunshine.dat, Cumulus will read it once a minute and take the value of whether the sun is currently shining or not, and the number of sunshine hours today. The file needs to have four lines (or more) and Cumulus uses the 3rd and 4th lines.

<Not used by Cumulus>
<Not used by Cumulus>
Hours of sunshine so far today
The four characters "True" if the sun is currently shining, anything else if it is not.

Any use?

Re: Sunshine readings from solar panels?

Posted: Sat 26 May 2012 8:16 pm
by rwg
That sounds like it should do the trick :-)

My main solar scripts run in perl so I should have no problem calculating the total sunshine hours and writing the file then copying it into place. Might take awhile to get a chance to actually do it, but will report back when I have.

Cheers,

Robin

Re: Sunshine readings from solar panels?

Posted: Sun 27 May 2012 8:30 am
by rwg
Can you post a sample of the SRSunshine.date file? I tried the following :

Code: Select all

Blah 
Blah
1.0
True
and also just 1 instead of 1.0. In both cases I got 'Error reading SRsunshine.dat: Invalid numeric input' in the log file.

cheers,

Robin

Re: Sunshine readings from solar panels?

Posted: Sun 27 May 2012 8:54 am
by steve
Sorry, I've misread my code. I couldn't find the email where Ole defined the format he wanted to use, so looked at my code, and got it wrong. I blame this damned heat! The correct spec is:

Hours of sunshine so far today
<Not used by Cumulus>
<Not used by Cumulus>
The four characters "True" if the sun is currently shining, anything else if it is not.