mqtt is excellent if you have an existing mqtt interface (e.g. some home automation systems) or happy to program against mqtt API (which is callback-driven). if the need is more scripting-oriented then maybe something like https://github.com/chaunceygardiner/weewx-loopdata <https://github.com/chaunceygardiner/weewx-loopdata>
(i’m a fan of mqtt and moved all my external sensors to mqtt for weewx integration.) > On 9 Apr 2022, at 9:20 pm, Doug Jenkins <[email protected]> wrote: > > have you considered MQTT? You could setup the MQTT WeeWX Extension in which > it will push both LOOP and ARCHIVE records to a MQTT broker. I have an > Acurite 5-n-1 weather station and use MQTT to update my website as the LOOP > data changes. I get updates around every 18 seconds or so. > > In your Python program, you use Paho Python library to "subscribe" to your > MQTT host and invoke an event when you get a LOOP Record. From there evaluate > the rain values and take action with your car windows at that moment based on > the data. > > MQTT is a small, lightweight protocol that will update in near real time. It > is used a lot in IOT devices. > > > On Saturday, April 9, 2022 at 2:31:03 AM UTC-4 Graham Eddy wrote: > your Acurite driver creates a ‘loop packet’ each time it receives a reading > from the station. you can have a ’service’ immediately export selected data > from each loop packet, not wait until the end of the archive interval (which > is when database is updated). depending how you want the data exported, there > could be an existing service extension available off-the-shelf > > >> On 9 Apr 2022, at 3:23 pm, Sylvain Gagnon <[email protected] >> <applewebdata://4B83AFCD-5A5D-4249-A0C1-16C3038C321A>> wrote: >> > >> Hi, I've been using WeeWx for many years now but first time posting here. >> >> I'm writing a program in Python that queries my Acurite 5 in 1 probe through >> WeeWX for the rain rate and if it's above 0mm, then it will close the car >> windows if they are opened and the car is parked. It works well but relies >> on daily.json to fetch the rain rate and that value I believe updates at the >> archive frequency (ie, 5 minutes) but the stations sends that data every 36 >> seconds. Is there a way to fetch this value? The only other option that I >> can think of is to set the "archive_interval" to 60 instead of 300 in >> [StdArchive]. If I do that, will that mess up all the historical data >> already in the database? Any other side effects? >> >> Thanks for your help at keeping the inside of my car dry :-) >> >> > >> -- >> 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] >> <applewebdata://4B83AFCD-5A5D-4249-A0C1-16C3038C321A>. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/weewx-user/c90fb5b9-f691-4024-a00f-ab55a340fb04n%40googlegroups.com >> >> <https://groups.google.com/d/msgid/weewx-user/c90fb5b9-f691-4024-a00f-ab55a340fb04n%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] > <mailto:[email protected]>. > To view this discussion on the web visit > https://groups.google.com/d/msgid/weewx-user/1edcdb0a-4786-40f7-8506-a653275177a3n%40googlegroups.com > > <https://groups.google.com/d/msgid/weewx-user/1edcdb0a-4786-40f7-8506-a653275177a3n%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/3188D387-059B-47B3-B691-F7DBB280AB38%40geddy.au.
