Did you try to add group_interval = hour   in  the [[Defaults]] [[[Units]]] 
[[[[Groups]]]] section of weewx.conf ?

> Le 22 juil. 2022 à 16:35, Jon B <[email protected]> a écrit :
> 
> Thanks. I'm using the Belchertown skin so I think things may be set up 
> slightly differently. Within this skin, a new observation type is defined for 
> rain (rainTotal), which aggregates the total rain across the observation 
> period. I've defined an equivalent for sunshine time, which I've called 
> "sunshineTotal" so I now have the total number of minutes of sun for a given 
> day/month etc. According to the documentation for that skin I should just be 
> able to define the "unit" within the graphs.conf file, but adding "unit = 
> hour" doesn't seem to make any difference. Perhaps this is something I need 
> to ask on the Belchertown github page...
> On Friday, 22 July 2022 at 12:34:08 UTC+1 [email protected] 
> <http://gmail.com/> wrote:
> @Jon B 
> 
> If you are retrieving the values using weewx tags, you can have the daily 
> total sunshine duration, in hours with the following tag : 
> $day.sunshine_time.sum.hour
> 
> You can do the same with different aggregation periods , for instance :
> $yesterday.sunshine_time.sum.hour
> $week.sunshine_time.sum.hour
> $month.sunshine_time.sum.hour
> $year.sunshine_time.sum.hour
> $alltime.sunshine_time.sum.hour
> 
> 
> Look here : 
> https://groups.google.com/g/weewx-user/c/z_hcx4deACQ/m/y9P2tF9qAwAJ 
> <https://groups.google.com/g/weewx-user/c/z_hcx4deACQ/m/y9P2tF9qAwAJ>
> 
> 
> 
>> Le 22 juil. 2022 à 11:48, Jon B <[email protected] 
>> <applewebdata://5D6C6A66-9E11-4A97-A326-3116ADE1EB37>> a écrit :
>> 
> 
>> Thanks for the fix! It's working now for me.
>> 
>> A couple of other questions about this:
>> 
>> - How can I change it so that the units are hours, rather than minutes?
>> - How can I add a total daily sunshine duration field, rather than 
>> displaying the total sunshine within the last archive period?
>> 
>> Thanks!
>> 
>> On Monday, 18 July 2022 at 15:30:26 UTC+1 [email protected] 
>> <http://gmail.com/> wrote:
>> I looked at the code in my GitHub, and it appeared that the last line 
>> 
>> schema_with_sunshine_time = schemas.wview.schema + [('sunshine_time', 
>> 'REAL')]
>> 
>> had a wrong indentation.
>> 
>> This is corrected now.   Sorry !
>> 
>> 
>>> Le 18 juil. 2022 à 15:43, Jon B <jonbe...@ <>gmail.com <http://gmail.com/>> 
>>> a écrit :
>>> 
>> 
>>> Sorry for piggybacking on this conversation, but it seemed like an 
>>> appropriate place to ask this.
>>> 
>>> I'm trying to install the sunshine duration extension 
>>> (https://github.com/Jterrettaz/sunduration 
>>> <https://github.com/Jterrettaz/sunduration>) but I'm getting an error when 
>>> trying to create the new database. I've followed the installation 
>>> instructions as follows:
>>> 
>>> - Saved sunduration.py to /usr/share/weewx/user/
>>> - Added user.sunduration.SunshineDuration to the process_services list
>>> - Changed the wx_binding schema to 
>>> user.sunduration.schema_with_sunshine_time
>>> - Stopped weewx and ran wee_database weewx.conf --reconfigure 
>>> 
>>> This gives the following error:
>>> 
>>> Using configuration file weewx.conf
>>> Using database binding 'wx_binding', which is bound to database 
>>> 'archive_sqlite'
>>> Traceback (most recent call last):
>>>   File "/usr/share/weewx/weeutil/weeutil.py", line 1155, in get_object
>>>     mod = getattr(mod, part)
>>> AttributeError: module 'user.sunduration' has no attribute 
>>> 'schema_with_sunshine_time'
>>> 
>>> During handling of the above exception, another exception occurred:
>>> 
>>> Traceback (most recent call last):
>>>   File "/usr/share/weewx/wee_database", line 1170, in <module>
>>>     main()
>>>   File "/usr/share/weewx/wee_database", line 216, in main
>>>     reconfigMainDatabase(config_dict, db_binding)
>>>   File "/usr/share/weewx/wee_database", line 439, in reconfigMainDatabase
>>>     manager_dict = weewx.manager.get_manager_dict_from_config(config_dict,
>>>   File "/usr/share/weewx/weewx/manager.py", line 727, in 
>>> get_manager_dict_from_config
>>>     manager_dict['schema'] = weeutil.weeutil.get_object(schema_name)
>>>   File "/usr/share/weewx/weeutil/weeutil.py", line 1158, in get_object
>>>     raise AttributeError(
>>> AttributeError: Module 'user.sunduration' has no attribute 
>>> 'schema_with_sunshine_time' when searching for 
>>> 'user.sunduration.schema_with_sunshine_time' 
>>> On Sunday, 17 July 2022 at 10:12:51 UTC+1 [email protected] 
>>> <http://gmail.com/> wrote:
>>> 
>>> 
>>> -- 
>>> 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/19ylVTRqbh4/unsubscribe 
>>> <https://groups.google.com/d/topic/weewx-user/19ylVTRqbh4/unsubscribe>.
>>> To unsubscribe from this group and all its topics, send an email to 
>>> weewx-user+...@ <>googlegroups.com <http://googlegroups.com/>.
>> 
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/weewx-user/e50560aa-d030-4096-97b4-7b9b614dc4cdn%40googlegroups.com
>>>  
>>> <https://groups.google.com/d/msgid/weewx-user/e50560aa-d030-4096-97b4-7b9b614dc4cdn%40googlegroups.com?utm_medium=email&utm_source=footer>.
>> 
>> 
>> -- 
>> 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/19ylVTRqbh4/unsubscribe 
>> <https://groups.google.com/d/topic/weewx-user/19ylVTRqbh4/unsubscribe>.
>> To unsubscribe from this group and all its topics, send an email to 
>> [email protected] 
>> <applewebdata://5D6C6A66-9E11-4A97-A326-3116ADE1EB37>.
> 
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/weewx-user/571f223d-9f92-4056-b9ac-8c8aff15c501n%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/weewx-user/571f223d-9f92-4056-b9ac-8c8aff15c501n%40googlegroups.com?utm_medium=email&utm_source=footer>.
> 
> 
> -- 
> 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/19ylVTRqbh4/unsubscribe 
> <https://groups.google.com/d/topic/weewx-user/19ylVTRqbh4/unsubscribe>.
> To unsubscribe from this group and all its topics, send an email to 
> [email protected] 
> <mailto:[email protected]>.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/weewx-user/adc2ed4c-ad2c-4d8f-8112-9e67da7f5ac4n%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/weewx-user/adc2ed4c-ad2c-4d8f-8112-9e67da7f5ac4n%40googlegroups.com?utm_medium=email&utm_source=footer>.

-- 
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 on the web visit 
https://groups.google.com/d/msgid/weewx-user/951AFFA2-F378-4180-B3EF-D2A2AB08130D%40gmail.com.

Reply via email to