Weather Software => weewx Software => Topic started by: vreihen on March 11, 2018, 08:49:29 AM

Title: WeatherFlow UDP station driver for weewx
Post by: vreihen on March 11, 2018, 08:49:29 AM
I have just created a master branch of my WeatherFlow UDP station driver, and committed v1.00 to GitHub:

https://github.com/captain-coredump/weatherflow-udp (https://github.com/captain-coredump/weatherflow-udp)

The readme file explains the sensor_map feature and configuration.  Without a proper sensor_map in weewx.conf, this driver will not log ANY data!  The naming syntax was borrowed from Matthew Wall’s weewx-SDR driver.  I enjoyed the hours that I spent writing the readme file to explain everything, and hope that you enjoy reading it just as much when setting up the new/final version of this driver.

Before you curse me out for the added complexity of the sensor_map feature, let me explain the rationale. I have an Air unit in my basement, logging the temperature/humidity into weewx as indoor sensors to watch the furnace for failure. I also have an Air located outdoors, logging temperature/humidity/barometer/lightning as outdoor sensors for weather purposes. Using the sensor_map feature, I can decide which sensor’s data gets stored in weewx…with granularity down to the individual sensor. In addition, I can choose to ignore certain sensors, like the lightning sensor in the basement. Not sold yet? Rumor has it that making a $7.95 Arduino NodeMCU or ESP8266 send UDP packets for things like water levels and soil moisture is a trivial thing, and it would probably take less than a dozen new lines of code in this driver to bring all kinds of additional sensors into weewx beyond what are available in the Air (and soon the Sky) today.

I have been running this driver in a test weewx instance as it was developed.  Other than the socket timeout dump when my Hub was doing an upgrade (now handled properly), it has been running for a week in final form without any observed issues.

My usual disclaimer applies.  I am not a programmer by trade, and did not sleep in a Holiday Inn Express last night.  Please let me know via GitHub if you find any bugs.  Enjoy.....
Title: Re: WeatherFlow UDP station driver for weewx
Post by: rcomito on May 01, 2018, 09:26:24 AM
Thank you vreihen.   

I have a WeatherFlow Sky and Air on the way and would love
to run weewx on a Pi.

Rick Comito
Title: Re: WeatherFlow UDP station driver for weewx
Post by: pfletch101 on May 27, 2018, 09:13:30 PM
FWIW, weewx installs and runs fine on a Pi 3B+, and I am sure it would run equally well on a 3B or (probably) earlier model. I used it to save the data from my Davis on a recent trip when I was away for longer than the 5-minute data would otherwise have been preserved for - it is normally downloaded daily to my main Windows machine.

Edit: It does, indeed, run very happily on the original Pi 3B.
Title: Re: WeatherFlow UDP station driver for weewx
Post by: vreihen on July 04, 2018, 02:01:18 PM
I have just committed updated driver v1.03 to GitHub:

https://github.com/captain-coredump/weatherflow-udp (https://github.com/captain-coredump/weatherflow-udp)

One of the two changes in this revision is a more graceful handling of a specific packet corruption that caused weewx to exit.  Although it has only been reported happening once, I strongly urge everyone to update as a precaution.

The other change added a weewx.conf option share_socket, with the default False.  Driver v1.02 and earlier were greedy, and did not share their UDP socket with other apps running on the same system.  If you are running another app listening for WeatherFlow UDP packets on the same box as weewx (like a certain home automation package), feel free to set share_socket = True.  I left the default as False, to match v1.02's behavior until I get some feedback that none of the major Python server platforms have issues with sharing the socket.

As always, there are details and credits in the readme and changelog files.....
Title: Re: WeatherFlow UDP station driver for weewx
Post by: rcomito on September 09, 2018, 09:38:11 AM
Hi vreihen -

My WeatherFlow units arrived.  I had weewx installed on a Pi 3+ with your driver just waiting
the day. 

It took me a couple of tries, but I'm happy to report that weewx is now uploading to WU, PWS,
and CWOP.

Thanks for all of your hard work.

Rick Comito
Title: Re: WeatherFlow UDP station driver for weewx
Post by: vreihen on September 09, 2018, 10:43:06 AM
Glad to hear that it is working for you!  Enjoy your new station.....