Hi,

I presume you are talking about a custom service. Provided you have based 
your service on class StdService and called your class' parent __init__ 
during initialisation of your service, you should have access to the weeWX 
config dictionary (weewx.conf in a config dictionary format) through use of 
the config_dict property of your class. So archive_interval should be 
accessible as self.config_dict['StdArchive'].get('archive_interval'). Note 
this will be a string, you will need to convert it to an int or float is 
you wish to do arithmetic with the value. Have a look at the at class 
StdService in bin/weewx/engine.py.

Gary

On Monday, 26 February 2018 13:17:30 UTC+10, Tryphon Cosinus wrote:
>
> Hello,
>
> All is in the title.
>
> For example, how to call archive_interval parameter in my custom service 
> engine?
>
> (I know how to get this value with a sql request but it is not elegant ...)
>
> Other question : how to get current.dateTime in my custom service engine?
>
> Thank you.
>

-- 
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].
For more options, visit https://groups.google.com/d/optout.

Reply via email to