Publishing aggregate data, the topic is TOPIC/loop?

42 views
Skip to first unread message

Rui Pinto

unread,
Sep 3, 2019, 12:59:44 PM9/3/19
to weewx-user
Hello!! 

These are my configurations for transmitting data through Weewx to the MQTT broker:

[StdRESTful]
    ...
    [[MQTT]]
        server_url = mqtt://username:password@localhost:1883/
        topic = weather/default/default/VantagePro2/
        unit_system = METRIC
        aggregation = aggregate   
why the data is published to the TOPIC/loop? Is it because i'm publishing aggregate data so all the observations are pusblished in one go to the loop level?

Best Regards

Pat

unread,
Sep 3, 2019, 2:28:33 PM9/3/19
to weewx-user
Yes, aggregate will publish all loop data as a single json array to the /loop topic. 

If you want individual observations published to their individual topic, use aggregation = individual. 

If you want a mixture of both, use aggregation = individual,aggregate

Pat

unread,
Sep 3, 2019, 2:41:39 PM9/3/19
to weewx-user
The aggregate topic is hard-coded to /LOOP because weewx operates on the LOOP method. You can read more about that in the User Guide.

Greg Troxel

unread,
Sep 3, 2019, 3:45:43 PM9/3/19
to Pat, weewx-user
Pat <p...@obrienphoto.net> writes:

> The aggregate topic is hard-coded to /LOOP because weewx operates on the
> LOOP method. You can read more about that in the User Guide
> <http://www.weewx.com/docs/usersguide.htm>.

And it's still /loop if you are publishing aggregate information based
on archive records (the default, I think), even though that's confusing.

To Rui: I would suggest separating trying to understand how things
behave from why someone chose to make it behave that way.
Understanding how lets you get things done, and the why is much less
useful :-)

Rui Pinto

unread,
Sep 4, 2019, 5:39:02 AM9/4/19
to weewx...@googlegroups.com, Greg Troxel
Thanks @Greg Troxel and @Pat!!

You were very helful... I just wanted to understand why is like the that.

Best Regards

--
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/rmisgpd88pp.fsf%40s1.lexort.com.
Reply all
Reply to author
Forward
0 new messages