Last followup :-)
I took a look at the extension and it already applies a group_interval to
the sunshine_time, if that helps any. I successfully got sunshine_time to
be added to the records table by copying records-table.inc.example to
records-table.inc and lightly editing it to add stanzas top and bottom for
the new data item.
--- records-table.inc.example 2025-11-01 01:34:10.666309722 +0000
+++ records-table.inc 2025-11-01 02:16:26.758608478 +0000
@@ -10,11 +10,22 @@
jQuery("#year-inTemp-min-ts").text(
moment.unix($year.inTemp.mintime.raw).format(
"$obs.label.time_records_page_full_date" ) );
jQuery("#at-inTemp-min-ts").text(
moment.unix($alltime.inTemp.mintime.raw).format(
"$obs.label.time_records_page_full_date" ) );
+ jQuery("#year-sunshine_time-min-ts").text(
moment.unix($year.sunshine_time.mintime.raw).format(
"$obs.label.time_records_page_full_date" ) );
+ jQuery("#at-sunshine_time-min-ts").text(
moment.unix($alltime.sunshine_time.mintime.raw).format(
"$obs.label.time_records_page_full_date" ) );
+
});
</script>
+ <!--- hopefully this goes into the Sun Records table we get
for free --->
+ <tr>
+ <td>Sunshine Time</td>
+ <td class="leftborder">$year.sunshine_time.min</td>
+ <td id="year-sunshine_time-min-ts"></td><!-- moment.js -->
+ <td class="leftborder"
id="at-sunshine_time-min-ts"></td><!-- moment.js -->
+ <td>$alltime.sunshine_time.min</td>
+ </tr>
-
+ <!--- this is from the example -->
<tr>
<td class="records-header"
colspan=5>$obs.label.records_inTemp_records</td>
I got the graph by similarly copying graphs.conf.example to graphs.conf and
lightly editing that to create a new graph...
--- graphs.conf.example 2025-11-01 01:34:10.666309722 +0000
+++ graphs.conf 2025-11-01 01:41:07.242480060 +0000
@@ -40,6 +40,11 @@
tooltip_date_format = "LLL"
gapsize = 300 # This should be your archive_interval from weewx.conf
+ [[chart0]]
+ title = Sunshine
+ [[[sunshine_time]]]
+ zIndex = 1
+
[[chart1]]
title = Temperature
[[[outTemp]]]
So the table looks like this.....
[image: Screenshot 2025-10-31 at 7.18.21 PM.png]
I know it's likely not exactly what you're looking for, but it should get
you going for whatever min/max/records you want to display.
On Friday, October 31, 2025 at 4:14:35 PM UTC-7 vince wrote:
> I might add that I almost certainly got the how to use the group_deltatime
> stuff wrong in my answer there, as that stuff wraps my brain around the
> axle so to speak. I can't speak to how to get the extension's
> "sunshine_time" into a group that's time related. Really makes my brain
> hurt.
>
> (but I know others here know how)
>
> On Friday, October 31, 2025 at 4:10:49 PM UTC-7 vince wrote:
>
>> Other than suggesting looking at the Upgrade Guide (link
>> <https://www.weewx.com/docs/5.2/upgrade/>), sorry no ideas here on why
>> an upgrade to 5.2 would break anything.
>>
>> At a minimum you can't just reference a magically created group_sun and
>> expect it to work. The units section of the docs Units section (link
>> <https://www.weewx.com/docs/5.2/reference/units/>) shows a
>> group_deltatime with an element daySunshineDur that can have hour as the
>> units. Perhaps set group_deltatime=hour in skin.conf and assign
>> sunshine_time to group_deltatime ?
>>
>> Rather than going hacking and slashing in Belchertown it might be
>> worthwhile to delete it completely, back out any changes in weewx.conf
>> completely, and start over and install an UN-modified vanilla version and
>> try again slow and steady. Get weewx working with the sunduration added to
>> the db before touching anything.
>>
>> Belchertown isn't too configurable for messing with the HTML but you can
>> add things to the records table by creating a records-table.inc file using
>> the .example file as a starting point. Similarly you add graphs by
>> creating a graphs.conf file from the .example file for that.
>>
>> For the records table, presumably you'd use the examples there for inTemp
>> (as one example) and use sunshine_time for the element there. Stop+restart
>> weewx afterward and I'd think it would add your records for sunshine_time
>> there hopefully. Kinda the same thing for graphs.conf to add graphs.
>>
>> On Friday, October 31, 2025 at 3:24:22 PM UTC-7 Jon B wrote:
>>
>> Thanks Vince - you're right, there are references to group_sun in
>> belchertown.py, weewx.conf and skin.conf (the latter two are just
>> "group_sun = hour"). I think I added these because I wanted to add records
>> page entries for sunniest day and sunniest month, and so I followed the
>> same format as for the calculation of the rainfall records (wettest
>> day/month), the lines for which involve group_rain and rain_unit in
>> belchertown.py. Any idea why the upgrade to weewx 5.2 would have caused
>> this to break?
>>
>>
--
You received this message because you are subscribed to the Google Groups
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion visit
https://groups.google.com/d/msgid/weewx-user/abbb5a8f-cde1-47df-b05e-db6fad3ac9b7n%40googlegroups.com.