Re: [weewx-user] Re: Sunshine Hours

2020-11-11 Thread karl Lutz
Great you are the best
From: gjr80 
Sent: Wednesday, November 11, 2020 3:30 AM
To: weewx-user 
Subject: [weewx-user] Re: Sunshine Hours

Hi Kalli,

Not sure how I missed clientrawextra. I've updated the template and it should 
be correct now. To use the updated template:

1. move aside your existing clientrawextra.txt.tmpl:

$ sudo mv /etc/weewx/skins/Clientraw/clientrawextra.txt.tmpl 
/etc/weewx/skins/Clientraw/clientrawextra_orig.txt.tmpl

2. download the updated clientrawextra.txt.tmpl in its place:

$ sudo wget -P /etc/weewx/skins/Clientraw 
https://raw.githubusercontent.com/gjr80/weewx-weewx-wd/master/skins/Clientraw/clientrawextra.txt.tmpl

3. No need to stop/restart WeeWX, the updated clientrawextra.txt will be 
generated when clientrawextra.txt is next updated(there is a default 10 minute 
stale age on the file so it could take 10 minutes).

Gary


On Sunday, 8 November 2020 at 00:12:05 UTC+10 Kalli wrote:

Hello
Gir80
data is written into the Sunshine data field.
but we now get the data in the Clientrawextra.txt
at position 696.

cu. kalli

  Am Montag, 26. Oktober 2020 18:16:23 UTC+1 schrieb Kalli: 

Hello i have weewx-wd. in FreshWDL the sun is displayed. unfortunately i 
can't find any settings for it at weewx. Can anybody help me further. 
-- 
You received this message because you are subscribed to a topic in the Google 
Groups "weewx-user" group.
To unsubscribe from this topic, visit 
https://groups.google.com/d/topic/weewx-user/7WiiU9J26e4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to 
weewx-user+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/c2a9932a-e75d-41e1-8d15-a97ba17ef5ban%40googlegroups.com.

-- 
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 weewx-user+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/22A13403F9224EF08340E2F09358560D%40LAPTOPCBESQ87E.


Re: [weewx-user] Re: Sunshine Hours

2020-11-06 Thread karl Lutz
Hello
i made the change.
but with WD-Live only the primeval time is displayed.
please take a look.

http://wetter-uerdingen.de/ cu. Kalli
From: gjr80 
Sent: Monday, November 2, 2020 5:10 AM
To: weewx-user 
Subject: Re: [weewx-user] Re: Sunshine Hours

Kalli,


I've added an approximation for sunshine time to WeeWX-WD. The algorithm 
involves calculating the elapsed time in seconds for which the WeeWX field 
'radiation' is above a set threshold level and storing this time in field 
'sunshine' in the WeeWX-WD database weewxwd.sdb. The default threshold level is 
120 W/m2, but can be adjusted using the sunshine_threshold config item under 
the [Weewx-WD] stanza in weewx.conf. So in an archive record if radiation is 
above the threshold value the sunshine field will be set to the interval (in 
seconds) covered by the archive record. So if your archive interval is set to 
300, field sunshine in that archive record would contain 300, if radiation was 
below the threshold value then field sunshine will be 0. Field sunshine is not 
added to loop packets, only archive records. 


You can then use field sunshine in report tags just like other WeeWX fields, 
though you will need to set the binding for each tag. For example, the sunshine 
time for today would be:

$day($data_binding='wd_binding').sunshine.sum


I have also populated the sunshine hour tags in testtags.php, so any sites/apps 
that use sunshine hours from testtags.php should now display data. I am not 
sure what FreshWDL uses, let's get WeeWX-WD working properly with sunshine then 
we can come back to FreshWDL if necessary.



Unfortunately you are going to have to upgrade to WeeWX-WD v2.1.0, adding 
'sunshine' to a WeeWX-WD v1.x version was more work than I was prepared to do. 
The upgrade process is straight forward and I have detailed the steps below.

To upgrade WeeWX-WD v1.x to v2.1.0 (the following steps are based on you having 
a package install rather than a setup.py install, if you have a setup.py 
install let me know and I will provide appropriate instructions):

1. download the v2.1.0 extension package:

$ wget -P /var/tmp 
https://github.com/gjr80/weewx-weewx-wd/releases/download/v2.1.0/weewxwd-2.1.0.tar.gz


2. stop WeeWX and backup your WeeWX and WeeWX-WD databases:

$ sudo cp /var/lib/weewx/weewx.sdb /var/lib/weewx/weewx_backup.sdb
$ sudo cp /var/lib/weewx/weewxwd.sdb /var/lib/weewx/weewxwd_backup.sdb


3. install v2.1.0:

$ sudo wee_extension --install=/var/tmp/weewxwd-2.1.0.tar.gz


4. remove some v1.x residue that the installer cannot remove:

$ sudo rm -R /etc/weewx/skins/SteelGauges
$ sudo rm /usr/share/weewx/user/imageStackedWindRose3.py*
$ sudo rm /usr/share/weewx/user/wd_database
$ sudo rm /usr/share/weewx/user/wdAstroSearchX3.py*
$ sudo rm /usr/share/weewx/user/wdSearchX3.py*
$ sudo rm /usr/share/weewx/user/wdTaggedStats3.py*
$ sudo rm /usr/share/weewx/user/weewxwd3.py*


5. edit weewx.conf and make the following changes:

- under [StdReport] delete the [[wdSteelGauges]] stanza in full
- under [DataBindings] [[wd_binding]] change:

schema = user.weewxwd3.schema

to

schema = user.wdschema.weewxwd_schema

- under [Engine] [[Services]] delete the user.weewxwd3.WdWXCalculate entry from 
process_services
- under [Engine] [[Services]] delete user.weewxwd3.WdArchive from 
archive_services


WeeWX-WD will now add a field 'sunshine' to each archive record but it will not 
be saved to database (whilst the WeeWX-WD database schema now includes field 
'sunshine' your WeeWX-WD database will not include field 'sunshine' as the 
database was created using the old WeeWX-WD schema). To add field sunshine to 
the WeeWX-WD database: 


1. use the utility wee_database to create a new copy WeeWX-WD database with the 
new schema and populate it with data from the old WeeWX-WD database:

$ sudo wee_database /etc/weewx/weewx.conf --reconfigure --binding=wd_binding


2. you will now have a new WeeWX-WD database named weewxwd.sdb_new that 
includes field sunshine, you now need to swap your old WeeWX-WD database for 
this new database:

$ sudo mv /var/lib/weewx/weewxwd.sdb /var/lib/weewx/weewxwd_orig.sdb
$ sudo mv /var/lib/weewx/weewxwd.sdb_new /var/lib/weewx/weewxwd.sdb


3. the daily summaries in the new database should be rebuilt on the next WeeWX 
startup but let's do it manually to make sure:

$ sudo wee_database /etc/weewx/weewx.conf --binding=wd_binding --rebuild-daily

You should now be able to restart WeeWX and WeeWX-WD will populate field 
sunshine in the WeeWX-WD database and the sunshine hours fields in testtags.php 
should also be populated.


Gary

On Monday, 2 November 2020 at 08:26:42 UTC+10 gjr80 wrote:

  Hi Kalli,

  Have written the code but just sorting out a couple of unrelated issues that 
are causing problems under WeeWX v3.8.0. Won't be long.

  Gary


  On Sunday, 1 November 2020 at 23:26:07 UTC+10 Kalli wrote:

Hello Gir80
I'm curious what you're doing great again.cu.Kalli

Am Dienstag, 27. Oktober 2020 22:39:17

Re: [weewx-user] Re: Sunshine Hours

2020-11-01 Thread gjr80
Kalli,

I've added an approximation for sunshine time to WeeWX-WD. The algorithm 
involves calculating the elapsed time in seconds for which the WeeWX field '
radiation' is above a set threshold level and storing this time in field '
sunshine' in the WeeWX-WD database weewxwd.sdb. The default threshold level 
is 120 W/m2, but can be adjusted using the sunshine_threshold config item 
under the [Weewx-WD] stanza in weewx.conf. So in an archive record if 
radiation is above the threshold value the sunshine field will be set to 
the interval (in seconds) covered by the archive record. So if your archive 
interval is set to 300, field sunshine in that archive record would contain 
300, if radiation was below the threshold value then field sunshine will be 
0. Field sunshine is not added to loop packets, only archive records. 

You can then use field sunshine in report tags just like other WeeWX 
fields, though you will need to set the binding for each tag. For example, 
the sunshine time for today would be:

$day($data_binding='wd_binding').sunshine.sum

I have also populated the sunshine hour tags in testtags.php, so any 
sites/apps that use sunshine hours from testtags.php should now display 
data. I am not sure what FreshWDL uses, let's get WeeWX-WD working properly 
with sunshine then we can come back to FreshWDL if necessary.

Unfortunately you are going to have to upgrade to WeeWX-WD v2.1.0, adding '
sunshine' to a WeeWX-WD v1.x version was more work than I was prepared to 
do. The upgrade process is straight forward and I have detailed the steps 
below.

To upgrade WeeWX-WD v1.x to v2.1.0 (the following steps are based on you 
having a package install rather than a setup.py install, if you have a 
setup.py install let me know and I will provide appropriate instructions):

1. download the v2.1.0 extension package:

$ wget -P /var/tmp 
https://github.com/gjr80/weewx-weewx-wd/releases/download/v2.1.0/weewxwd-2.1.0.tar.gz

2. stop WeeWX and backup your WeeWX and WeeWX-WD databases:

$ sudo cp /var/lib/weewx/weewx.sdb /var/lib/weewx/weewx_backup.sdb
$ sudo cp /var/lib/weewx/weewxwd.sdb /var/lib/weewx/weewxwd_backup.sdb

3. install v2.1.0:

$ sudo wee_extension --install=/var/tmp/weewxwd-2.1.0.tar.gz

4. remove some v1.x residue that the installer cannot remove:

$ sudo rm -R /etc/weewx/skins/SteelGauges
$ sudo rm /usr/share/weewx/user/imageStackedWindRose3.py*
$ sudo rm /usr/share/weewx/user/wd_database
$ sudo rm /usr/share/weewx/user/wdAstroSearchX3.py*
$ sudo rm /usr/share/weewx/user/wdSearchX3.py*
$ sudo rm /usr/share/weewx/user/wdTaggedStats3.py*
$ sudo rm /usr/share/weewx/user/weewxwd3.py*

5. edit weewx.conf and make the following changes:

- under [StdReport] delete the [[wdSteelGauges]] stanza in full
- under [DataBindings] [[wd_binding]] change:

schema = user.weewxwd3.schema

to

schema = user.wdschema.weewxwd_schema

- under [Engine] [[Services]] delete the user.weewxwd3.WdWXCalculate entry 
from process_services
- under [Engine] [[Services]] delete user.weewxwd3.WdArchive from 
archive_services

WeeWX-WD will now add a field 'sunshine' to each archive record but it will 
not be saved to database (whilst the WeeWX-WD database schema now includes 
field 'sunshine' your WeeWX-WD database will not include field 'sunshine' 
as the database was created using the old WeeWX-WD schema). To add field 
sunshine to the WeeWX-WD database: 

1. use the utility wee_database to create a new copy WeeWX-WD database with 
the new schema and populate it with data from the old WeeWX-WD database:

$ sudo wee_database /etc/weewx/weewx.conf --reconfigure --binding=wd_binding

2. you will now have a new WeeWX-WD database named weewxwd.sdb_new that 
includes field sunshine, you now need to swap your old WeeWX-WD database 
for this new database:

$ sudo mv /var/lib/weewx/weewxwd.sdb /var/lib/weewx/weewxwd_orig.sdb
$ sudo mv /var/lib/weewx/weewxwd.sdb_new /var/lib/weewx/weewxwd.sdb

3. the daily summaries in the new database should be rebuilt on the next 
WeeWX startup but let's do it manually to make sure:

$ sudo wee_database /etc/weewx/weewx.conf --binding=wd_binding 
--rebuild-daily

You should now be able to restart WeeWX and WeeWX-WD will populate field 
sunshine in the WeeWX-WD database and the sunshine hours fields in 
testtags.php should also be populated.

Gary
On Monday, 2 November 2020 at 08:26:42 UTC+10 gjr80 wrote:

> Hi Kalli,
>
> Have written the code but just sorting out a couple of unrelated issues 
> that are causing problems under WeeWX v3.8.0. Won't be long.
>
> Gary
>
> On Sunday, 1 November 2020 at 23:26:07 UTC+10 Kalli wrote:
>
>> Hello Gir80
>> I'm curious what you're doing great again.
>>
>> cu.Kalli
>>
>>
>>
>> Am Dienstag, 27. Oktober 2020 22:39:17 UTC+1 schrieb gjr80:
>>>
>>> Thanks Kalli, I will put something together and email you.
>>>
>>> Gary
>>>
>>> On Wednesday, 28 October 2020 at 01:52:30 UTC+10 Kalli wrote:
>>>
 Gir80 I have the weewx 3.8 weewx wd v1.3 

 

Re: [weewx-user] Re: Sunshine Hours

2020-11-01 Thread gjr80
Hi Kalli,

Have written the code but just sorting out a couple of unrelated issues 
that are causing problems under WeeWX v3.8.0. Won't be long.

Gary

On Sunday, 1 November 2020 at 23:26:07 UTC+10 Kalli wrote:

> Hello Gir80
> I'm curious what you're doing great again.
>
> cu.Kalli
>
>
>
> Am Dienstag, 27. Oktober 2020 22:39:17 UTC+1 schrieb gjr80:
>>
>> Thanks Kalli, I will put something together and email you.
>>
>> Gary
>>
>> On Wednesday, 28 October 2020 at 01:52:30 UTC+10 Kalli wrote:
>>
>>> Gir80 I have the weewx 3.8 weewx wd v1.3 
>>>
>>> tke...@gmail.com schrieb am Dienstag, 27. Oktober 2020 um 13:40:39 
>>> UTC+1:
>>>
 Never mind!

 On Tue, Oct 27, 2020 at 5:39 AM gjr80  wrote:

> Tom,
>
> I suspect that in this case FreshWDL is displaying sunshine hours as 
> measured by a sunshine recorder 
> . Some PWS software 
> approximates sunshine hours by calculating the cumulative time for a day 
> where the solar irradiance is above a given level. From memory the 
> measurement of sunshine hours has come up a couple of times here or in 
> weewx-development.
>
> Gary
> On Tuesday, 27 October 2020 at 22:25:34 UTC+10 tke...@gmail.com wrote:
>
>> The Seasons skin has something you can use. Look in the file 
>> celestial.inc. 
>>
>> If you just want amount of daylight, try something like (NOT TESTED):
>>
>> #set $sunrise_ts = $almanac.sun.rise.raw
>> #set $sunset_ts = $almanac.sun.set.raw
>> #if $sunrise_ts and $sunset_ts
>>
>> #set $today_daylight = $sunset_ts -  $sunrise_ts
>> #set $seconds = $today_daylight
>> #set $hours = $seconds //3600
>> #set $seconds %= 3600
>> #set $minutes = $seconds//60
>> #set $seconds %= 60
>> #set $daylight_str = "%d hours, %d minutes, %d seconds" % 
>> ($hours, $minutes, $seconds)
>>
>> Total daylight: $daylight_str
>>
>> #end if
>>
>> -tk
>>
>> On Mon, Oct 26, 2020 at 7:55 PM gjr80  wrote:
>>
>>> Hallo Kalli,
>>>
>>> The short answer is at the moment sunshine hours is not provided by 
>>> WeeWX or WeeWX-WD. Looking at the WeeWX-WD code it appears to be 
>>> something 
>>> I started working on but never fully implemented. Can you let me know 
>>> hat 
>>> version of WeeWX and WeeWX-WD you are running. It should be a simple 
>>> function to implement.
>>>
>>> Gary
>>>
>>> On Tuesday, 27 October 2020 at 03:16:23 UTC+10 Kalli wrote:
>>>

 Hello i have weewx-wd. in FreshWDL the sun is displayed. 
 unfortunately i can't find any settings for it at weewx. Can anybody 
 help 
 me further. 
>>>
>>> -- 
>>> 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 weewx-user+...@googlegroups.com.
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/weewx-user/884f712b-74c8-4bd4-8655-74610e4f94dcn%40googlegroups.com
>>>  
>>> 
>>> .
>>>
>> -- 
> 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 weewx-user+...@googlegroups.com.
>
 To view this discussion on the web visit 
> https://groups.google.com/d/msgid/weewx-user/3ad7fb34-745e-40bd-8e65-454da4c0c701n%40googlegroups.com
>  
> 
> .
>


-- 
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 weewx-user+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/a33866a0-bd20-4416-a016-137a3fbf12f5n%40googlegroups.com.


Re: [weewx-user] Re: Sunshine Hours

2020-11-01 Thread Kalli


Hello Gir80
I'm curious what you're doing great again.

cu.Kalli



Am Dienstag, 27. Oktober 2020 22:39:17 UTC+1 schrieb gjr80:
>
> Thanks Kalli, I will put something together and email you.
>
> Gary
>
> On Wednesday, 28 October 2020 at 01:52:30 UTC+10 Kalli wrote:
>
>> Gir80 I have the weewx 3.8 weewx wd v1.3 
>>
>> tke...@gmail.com schrieb am Dienstag, 27. Oktober 2020 um 13:40:39 UTC+1:
>>
>>> Never mind!
>>>
>>> On Tue, Oct 27, 2020 at 5:39 AM gjr80  wrote:
>>>
 Tom,

 I suspect that in this case FreshWDL is displaying sunshine hours as 
 measured by a sunshine recorder 
 . Some PWS software 
 approximates sunshine hours by calculating the cumulative time for a day 
 where the solar irradiance is above a given level. From memory the 
 measurement of sunshine hours has come up a couple of times here or in 
 weewx-development.

 Gary
 On Tuesday, 27 October 2020 at 22:25:34 UTC+10 tke...@gmail.com wrote:

> The Seasons skin has something you can use. Look in the file 
> celestial.inc. 
>
> If you just want amount of daylight, try something like (NOT TESTED):
>
> #set $sunrise_ts = $almanac.sun.rise.raw
> #set $sunset_ts = $almanac.sun.set.raw
> #if $sunrise_ts and $sunset_ts
>
> #set $today_daylight = $sunset_ts -  $sunrise_ts
> #set $seconds = $today_daylight
> #set $hours = $seconds //3600
> #set $seconds %= 3600
> #set $minutes = $seconds//60
> #set $seconds %= 60
> #set $daylight_str = "%d hours, %d minutes, %d seconds" % ($hours, 
> $minutes, $seconds)
>
> Total daylight: $daylight_str
>
> #end if
>
> -tk
>
> On Mon, Oct 26, 2020 at 7:55 PM gjr80  wrote:
>
>> Hallo Kalli,
>>
>> The short answer is at the moment sunshine hours is not provided by 
>> WeeWX or WeeWX-WD. Looking at the WeeWX-WD code it appears to be 
>> something 
>> I started working on but never fully implemented. Can you let me know 
>> hat 
>> version of WeeWX and WeeWX-WD you are running. It should be a simple 
>> function to implement.
>>
>> Gary
>>
>> On Tuesday, 27 October 2020 at 03:16:23 UTC+10 Kalli wrote:
>>
>>>
>>> Hello i have weewx-wd. in FreshWDL the sun is displayed. 
>>> unfortunately i can't find any settings for it at weewx. Can anybody 
>>> help 
>>> me further. 
>>
>> -- 
>> 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 weewx-user+...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/weewx-user/884f712b-74c8-4bd4-8655-74610e4f94dcn%40googlegroups.com
>>  
>> 
>> .
>>
> -- 
 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 weewx-user+...@googlegroups.com.

>>> To view this discussion on the web visit 
 https://groups.google.com/d/msgid/weewx-user/3ad7fb34-745e-40bd-8e65-454da4c0c701n%40googlegroups.com
  
 
 .

>>>

-- 
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 weewx-user+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/c9df13d7-dbc9-4d87-9bff-789a3259e376o%40googlegroups.com.


Re: [weewx-user] Re: Sunshine Hours

2020-10-27 Thread gjr80
Thanks Kalli, I will put something together and email you.

Gary

On Wednesday, 28 October 2020 at 01:52:30 UTC+10 Kalli wrote:

> Gir80 I have the weewx 3.8 weewx wd v1.3 
>
> tke...@gmail.com schrieb am Dienstag, 27. Oktober 2020 um 13:40:39 UTC+1:
>
>> Never mind!
>>
>> On Tue, Oct 27, 2020 at 5:39 AM gjr80  wrote:
>>
>>> Tom,
>>>
>>> I suspect that in this case FreshWDL is displaying sunshine hours as 
>>> measured by a sunshine recorder 
>>> . Some PWS software 
>>> approximates sunshine hours by calculating the cumulative time for a day 
>>> where the solar irradiance is above a given level. From memory the 
>>> measurement of sunshine hours has come up a couple of times here or in 
>>> weewx-development.
>>>
>>> Gary
>>> On Tuesday, 27 October 2020 at 22:25:34 UTC+10 tke...@gmail.com wrote:
>>>
 The Seasons skin has something you can use. Look in the file 
 celestial.inc. 

 If you just want amount of daylight, try something like (NOT TESTED):

 #set $sunrise_ts = $almanac.sun.rise.raw
 #set $sunset_ts = $almanac.sun.set.raw
 #if $sunrise_ts and $sunset_ts

 #set $today_daylight = $sunset_ts -  $sunrise_ts
 #set $seconds = $today_daylight
 #set $hours = $seconds //3600
 #set $seconds %= 3600
 #set $minutes = $seconds//60
 #set $seconds %= 60
 #set $daylight_str = "%d hours, %d minutes, %d seconds" % ($hours, 
 $minutes, $seconds)

 Total daylight: $daylight_str

 #end if

 -tk

 On Mon, Oct 26, 2020 at 7:55 PM gjr80  wrote:

> Hallo Kalli,
>
> The short answer is at the moment sunshine hours is not provided by 
> WeeWX or WeeWX-WD. Looking at the WeeWX-WD code it appears to be 
> something 
> I started working on but never fully implemented. Can you let me know hat 
> version of WeeWX and WeeWX-WD you are running. It should be a simple 
> function to implement.
>
> Gary
>
> On Tuesday, 27 October 2020 at 03:16:23 UTC+10 Kalli wrote:
>
>>
>> Hello i have weewx-wd. in FreshWDL the sun is displayed. 
>> unfortunately i can't find any settings for it at weewx. Can anybody 
>> help 
>> me further. 
>
> -- 
> 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 weewx-user+...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/weewx-user/884f712b-74c8-4bd4-8655-74610e4f94dcn%40googlegroups.com
>  
> 
> .
>
 -- 
>>> 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 weewx-user+...@googlegroups.com.
>>>
>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/weewx-user/3ad7fb34-745e-40bd-8e65-454da4c0c701n%40googlegroups.com
>>>  
>>> 
>>> .
>>>
>>

-- 
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 weewx-user+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/b257405a-93d9-4946-8b04-6e721bd56708n%40googlegroups.com.


Re: [weewx-user] Re: Sunshine Hours

2020-10-27 Thread Kalli
 Gir80 I have the weewx 3.8 weewx wd v1.3 

tke...@gmail.com schrieb am Dienstag, 27. Oktober 2020 um 13:40:39 UTC+1:

> Never mind!
>
> On Tue, Oct 27, 2020 at 5:39 AM gjr80  wrote:
>
>> Tom,
>>
>> I suspect that in this case FreshWDL is displaying sunshine hours as 
>> measured by a sunshine recorder 
>> . Some PWS software 
>> approximates sunshine hours by calculating the cumulative time for a day 
>> where the solar irradiance is above a given level. From memory the 
>> measurement of sunshine hours has come up a couple of times here or in 
>> weewx-development.
>>
>> Gary
>> On Tuesday, 27 October 2020 at 22:25:34 UTC+10 tke...@gmail.com wrote:
>>
>>> The Seasons skin has something you can use. Look in the file 
>>> celestial.inc. 
>>>
>>> If you just want amount of daylight, try something like (NOT TESTED):
>>>
>>> #set $sunrise_ts = $almanac.sun.rise.raw
>>> #set $sunset_ts = $almanac.sun.set.raw
>>> #if $sunrise_ts and $sunset_ts
>>>
>>> #set $today_daylight = $sunset_ts -  $sunrise_ts
>>> #set $seconds = $today_daylight
>>> #set $hours = $seconds //3600
>>> #set $seconds %= 3600
>>> #set $minutes = $seconds//60
>>> #set $seconds %= 60
>>> #set $daylight_str = "%d hours, %d minutes, %d seconds" % ($hours, 
>>> $minutes, $seconds)
>>>
>>> Total daylight: $daylight_str
>>>
>>> #end if
>>>
>>> -tk
>>>
>>> On Mon, Oct 26, 2020 at 7:55 PM gjr80  wrote:
>>>
 Hallo Kalli,

 The short answer is at the moment sunshine hours is not provided by 
 WeeWX or WeeWX-WD. Looking at the WeeWX-WD code it appears to be something 
 I started working on but never fully implemented. Can you let me know hat 
 version of WeeWX and WeeWX-WD you are running. It should be a simple 
 function to implement.

 Gary

 On Tuesday, 27 October 2020 at 03:16:23 UTC+10 Kalli wrote:

>
> Hello i have weewx-wd. in FreshWDL the sun is displayed. unfortunately 
> i can't find any settings for it at weewx. Can anybody help me further. 

 -- 
 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 weewx-user+...@googlegroups.com.
 To view this discussion on the web visit 
 https://groups.google.com/d/msgid/weewx-user/884f712b-74c8-4bd4-8655-74610e4f94dcn%40googlegroups.com
  
 
 .

>>> -- 
>> 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 weewx-user+...@googlegroups.com.
>>
> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/weewx-user/3ad7fb34-745e-40bd-8e65-454da4c0c701n%40googlegroups.com
>>  
>> 
>> .
>>
>

-- 
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 weewx-user+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/7decd3d2-0b13-4ef7-9a84-58e19f519117n%40googlegroups.com.


Re: [weewx-user] Re: Sunshine Hours

2020-10-27 Thread Tom Keffer
Never mind!

On Tue, Oct 27, 2020 at 5:39 AM gjr80  wrote:

> Tom,
>
> I suspect that in this case FreshWDL is displaying sunshine hours as
> measured by a sunshine recorder
> . Some PWS software
> approximates sunshine hours by calculating the cumulative time for a day
> where the solar irradiance is above a given level. From memory the
> measurement of sunshine hours has come up a couple of times here or in
> weewx-development.
>
> Gary
> On Tuesday, 27 October 2020 at 22:25:34 UTC+10 tke...@gmail.com wrote:
>
>> The Seasons skin has something you can use. Look in the file
>> celestial.inc.
>>
>> If you just want amount of daylight, try something like (NOT TESTED):
>>
>> #set $sunrise_ts = $almanac.sun.rise.raw
>> #set $sunset_ts = $almanac.sun.set.raw
>> #if $sunrise_ts and $sunset_ts
>>
>> #set $today_daylight = $sunset_ts -  $sunrise_ts
>> #set $seconds = $today_daylight
>> #set $hours = $seconds //3600
>> #set $seconds %= 3600
>> #set $minutes = $seconds//60
>> #set $seconds %= 60
>> #set $daylight_str = "%d hours, %d minutes, %d seconds" % ($hours,
>> $minutes, $seconds)
>>
>> Total daylight: $daylight_str
>>
>> #end if
>>
>> -tk
>>
>> On Mon, Oct 26, 2020 at 7:55 PM gjr80  wrote:
>>
>>> Hallo Kalli,
>>>
>>> The short answer is at the moment sunshine hours is not provided by
>>> WeeWX or WeeWX-WD. Looking at the WeeWX-WD code it appears to be something
>>> I started working on but never fully implemented. Can you let me know hat
>>> version of WeeWX and WeeWX-WD you are running. It should be a simple
>>> function to implement.
>>>
>>> Gary
>>>
>>> On Tuesday, 27 October 2020 at 03:16:23 UTC+10 Kalli wrote:
>>>

 Hello i have weewx-wd. in FreshWDL the sun is displayed. unfortunately
 i can't find any settings for it at weewx. Can anybody help me further.
>>>
>>> --
>>> 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 weewx-user+...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/weewx-user/884f712b-74c8-4bd4-8655-74610e4f94dcn%40googlegroups.com
>>> 
>>> .
>>>
>> --
> 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 weewx-user+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/weewx-user/3ad7fb34-745e-40bd-8e65-454da4c0c701n%40googlegroups.com
> 
> .
>

-- 
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 weewx-user+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/CAPq0zEAUz86KzpZCvVDPpfwFNDG_n_%2BnbM0CuXVLsy4hD4R_4g%40mail.gmail.com.


Re: [weewx-user] Re: Sunshine Hours

2020-10-27 Thread gjr80
Tom,

I suspect that in this case FreshWDL is displaying sunshine hours as 
measured by a sunshine recorder 
. Some PWS software 
approximates sunshine hours by calculating the cumulative time for a day 
where the solar irradiance is above a given level. From memory the 
measurement of sunshine hours has come up a couple of times here or in 
weewx-development.

Gary
On Tuesday, 27 October 2020 at 22:25:34 UTC+10 tke...@gmail.com wrote:

> The Seasons skin has something you can use. Look in the file 
> celestial.inc. 
>
> If you just want amount of daylight, try something like (NOT TESTED):
>
> #set $sunrise_ts = $almanac.sun.rise.raw
> #set $sunset_ts = $almanac.sun.set.raw
> #if $sunrise_ts and $sunset_ts
>
> #set $today_daylight = $sunset_ts -  $sunrise_ts
> #set $seconds = $today_daylight
> #set $hours = $seconds //3600
> #set $seconds %= 3600
> #set $minutes = $seconds//60
> #set $seconds %= 60
> #set $daylight_str = "%d hours, %d minutes, %d seconds" % ($hours, 
> $minutes, $seconds)
>
> Total daylight: $daylight_str
>
> #end if
>
> -tk
>
> On Mon, Oct 26, 2020 at 7:55 PM gjr80  wrote:
>
>> Hallo Kalli,
>>
>> The short answer is at the moment sunshine hours is not provided by WeeWX 
>> or WeeWX-WD. Looking at the WeeWX-WD code it appears to be something I 
>> started working on but never fully implemented. Can you let me know hat 
>> version of WeeWX and WeeWX-WD you are running. It should be a simple 
>> function to implement.
>>
>> Gary
>>
>> On Tuesday, 27 October 2020 at 03:16:23 UTC+10 Kalli wrote:
>>
>>>
>>> Hello i have weewx-wd. in FreshWDL the sun is displayed. unfortunately i 
>>> can't find any settings for it at weewx. Can anybody help me further. 
>>
>> -- 
>> 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 weewx-user+...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/weewx-user/884f712b-74c8-4bd4-8655-74610e4f94dcn%40googlegroups.com
>>  
>> 
>> .
>>
>

-- 
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 weewx-user+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/3ad7fb34-745e-40bd-8e65-454da4c0c701n%40googlegroups.com.


Re: [weewx-user] Re: Sunshine Hours

2020-10-27 Thread Tom Keffer
The Seasons skin has something you can use. Look in the file celestial.inc.

If you just want amount of daylight, try something like (NOT TESTED):

#set $sunrise_ts = $almanac.sun.rise.raw
#set $sunset_ts = $almanac.sun.set.raw
#if $sunrise_ts and $sunset_ts

#set $today_daylight = $sunset_ts -  $sunrise_ts
#set $seconds = $today_daylight
#set $hours = $seconds //3600
#set $seconds %= 3600
#set $minutes = $seconds//60
#set $seconds %= 60
#set $daylight_str = "%d hours, %d minutes, %d seconds" % ($hours,
$minutes, $seconds)

Total daylight: $daylight_str

#end if

-tk

On Mon, Oct 26, 2020 at 7:55 PM gjr80  wrote:

> Hallo Kalli,
>
> The short answer is at the moment sunshine hours is not provided by WeeWX
> or WeeWX-WD. Looking at the WeeWX-WD code it appears to be something I
> started working on but never fully implemented. Can you let me know hat
> version of WeeWX and WeeWX-WD you are running. It should be a simple
> function to implement.
>
> Gary
>
> On Tuesday, 27 October 2020 at 03:16:23 UTC+10 Kalli wrote:
>
>>
>> Hello i have weewx-wd. in FreshWDL the sun is displayed. unfortunately i
>> can't find any settings for it at weewx. Can anybody help me further.
>
> --
> 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 weewx-user+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/weewx-user/884f712b-74c8-4bd4-8655-74610e4f94dcn%40googlegroups.com
> 
> .
>

-- 
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 weewx-user+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/CAPq0zEDan5FKZ3rdj3LXbWFdXK%2BNLNKn3jVUznzi%2B5DTPmrwFA%40mail.gmail.com.