Hi, Joe

1. Sunrise and sunset are not stored anywhere and, instead, are calculated
on the fly. If they were cached, you'd have to arrange for something to
refresh them every day. The added complexity isn't worth it.

2. The observation variables are available by just binding to an
appropriate event. Take a look at StdPrint (in engine.py), probably the
simplest of the services. It binds to NEW_LOOP_PACKET and
NEW_ARCHIVE_RECORD and makes use of them.

Hope this helps.

-tk

On Sun, Dec 18, 2016 at 10:19 AM, jmltech <[email protected]> wrote:

> I have been playing around writing a new service to collect some home
> automation temperature and humidity readings. Nothing serious yet, just
> seeing what I can do. I saw in another thread that latitude, longitude and
> altitude values are available via object stn_info.  I also saw how to
> calcualre sunrise and sunset data ( but doesn't weewx already have this
> calculated and stored?). How do I read other sensor variables from within a
> new service, like UV, radiation or even current station temperature and
> humidity?
>
> I read the developer wiki, but this info isn't there or I completely
> missed it.
>
> Thanks,
> Joe
>

Reply via email to