Low sunshine hours calculation

Well if there was an issue with low angles, then I wouldn’t be getting 100% or more plotted in the chart??
My sensor sits inside a ping-pong ball which ensures homogenous illumination no matter how low or high the angle is. It’s not perfect, but it serves the purpose.

Can it be a problem with some obsolete setting in the log file, for example? I could post it here if it would help.

when the calculated solar % is above the threshold you have set for bright sun, WD should be increasing the sunshine hours
is that happening or ?

That is happening except for early mornings / late evenings. Could you please revise the code whether there is no other condition built in the calculation?

how early/late are you meaning exactly?
(example?)

Please look back to reply #3 in this thread. You will find a screenshot there with the captured problem. Facts on the main screen: Snapshot taken at 8:45am (see time), full sun since 6am (see yellow radiation line even over red max solar curve), just 5 mins of sunshine calculated (left top corner). Should be 1:45 instead…

I am not seeing that problem here myself

what I can do is add in some debug code to see what is and what is not happening for in your situation/setup

Yep, that would be great Brian. What should I do?

one thing I do see that you have ticked
is
apply to sun hours as well
in the set time to set icon

try unticking that

for starters

I have added some debug code
to view, debug info
if you have ticked
setup, advanced/misc, log the raw data
to the latest .zip update…

I checked the latest build 8. There is something wrong indeed, check the two screens attached. They are both taken at the same time - 19:30. While the main screen shows 55,4% of solar radiation, debug info just 4% raw! Maybe that’s why it doesn’t add up sunshine hours.


debug_info.png

try another .zip update of WD, ready now…

Still no change. Measured a while ago. Time 6:58am, 00:00 cumulative sunshine calculated, 100% solar rad on the main screen, 30% raw in the debug log. Now I think I know where the problem in the math is.
Sunshine hours are calculated just from the raw % which is shown in the debug log. The raw reading in the “Current readings” screen was 21.5 mV which is exactly 30% of the 70 mV I have set in the “Max solar…” setup screen. This 30% is also shown in the debug log and it is still lower than 48% I have set in the “Thresholds…” screen. Shortly said, WD calculates sunshine hours from the absolute max mV, not from the relative % measured during the day.


debug.png

current_readings.png

what I will need to do is try and duplicate the problem in the running code
if you could .zip and email me your settings files

Find it attached. Thanks.

I deleted the attachment. It’s not a good idea to post all that information, that’s why the author asks for it to be emailed.

The instructions are in the FAQ here which lists the required files (I did not see the .reg file in your zip.)

I was a bit slow on that one, sorry Niko, i did see it as soon as he posted it but didnt think to let ya know #-o
Anyhooo, thought you’d retired :smiley:

I have your settings files centor

I notice in the solar setup you have set to use sensor #1 from a labjack…but you do not have labjack sensors…
and you have ticked to use solar from a wh3081 station…but I dont think you have that station type

anyhow…investigating…

@centor
I have found and fixed a bug if you had set to plot this %
in the solar setup, 1 wire setup

use the latest .zip update…and it should work as expected now

Looks good, Brian! I will do a thorough testing tomorrow, but already today I got some evening sunshine calculated!

Everything works fine here. Thank you Brian for all the effort. You can close this bug.