On Wednesday, 12 September 2018 13:36:00 UTC+10, Thomas Carlin wrote: > > Perfect Thank you Gary! That gets me what I need. Now I just need to > reprogram all my sensors and my driver, or create another service to > collect and queue data. I'm leaning towards MQTT, for its simplicity, > speed, and scalability. This sounds more like a winter project to me! >
That's usually when the best work is done! > A couple quick questions before we wrap this up: > I have seen rumblings about MQTT drivers in the forums, but some of them > look like they are so Weewx provides MQTT data for something else. Is > there anything that you are aware of that could act as a second service > with MQTT being the data source? Has anything been blessed by the weewx > development crew? I would hate to reinvent the wheel if someone else > figured it out for me! > There is the weewxMQTT <https://github.com/morrowwm/weewxMQTT> driver that is included under drivers <https://github.com/weewx/weewx/wiki#drivers> in the wiki. Have never used it but it allows an MQTT broker to be a data source for WeeWX. Can't say it is endorsed any more or less than any other driver in the wiki but I understand a number of folks are using it. It is a driver and not a service so if you have an existing station whose data you wish to augment you will need to adapt it to be a service. A driver and a data service that both obtain data from a given source are quite the similar, usually they use exactly the same process to get the data, where the difference starts is that the driver has a method genLoopPackets() that just sits there and spits out loop packets and WeeWX and its services then do the rest. On the other hand a data service waits for loop packets and/or archive records and augments the packet/record with data, it may continue to read data from its source but it will not do anything more with WeeWX until (potentially) the next loop packet/archive record comes along. In this manner you can have WeeWX aggregate data from many sources; one driver and as many services as you like. > Second, just for my piece of mind, did i miss the NEW_LOOP_PACKET in the > documentation, or was it not mentioned? If it is the latter, I think this > would be a valuable addition. > Now you had me looking. The best I could find was the comments in bin/weewx/__init__.py <https://github.com/weewx/weewx/blob/master/bin/weewx/__init__.py#L79:L104>, though probably not easily found. There is the Notes for Developers <http://weewx.com/docs/devnotes.htm> document, though unfortunately it does not cover the WeeWX events. It probably should but as is commonly the case there are too many things to do and not enough people or time to do them. Gary -- 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.
