Author Topic: WeatherFlow UDP station driver for weewx  (Read 4357 times)

0 Members and 1 Guest are viewing this topic.

Offline vreihen

  • El Niño chaser
  • Forecaster
  • *****
  • Posts: 1216
  • K2BIG
WeatherFlow UDP station driver for weewx
« 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

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.....
WU Gold Stars for everyone! :lol:

Offline rcomito

  • Member
  • *
  • Posts: 2
Re: WeatherFlow UDP station driver for weewx
« Reply #1 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
Rick Comito

Offline pfletch101

  • Forecaster
  • *****
  • Posts: 329
    • Personal Website
Re: WeatherFlow UDP station driver for weewx
« Reply #2 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.
« Last Edit: July 04, 2018, 02:36:16 PM by pfletch101 »
Vantage Pro 2+ connected to Raspberry Pi running weewx by means of Meteo-Pi - data incorporated in domestic energy production (PV) and use monitoring system.

Offline vreihen

  • El Niño chaser
  • Forecaster
  • *****
  • Posts: 1216
  • K2BIG
Re: WeatherFlow UDP station driver for weewx
« Reply #3 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

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.....
WU Gold Stars for everyone! :lol:

Offline rcomito

  • Member
  • *
  • Posts: 2
Re: WeatherFlow UDP station driver for weewx
« Reply #4 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
Rick Comito

Offline vreihen

  • El Niño chaser
  • Forecaster
  • *****
  • Posts: 1216
  • K2BIG
Re: WeatherFlow UDP station driver for weewx
« Reply #5 on: September 09, 2018, 10:43:06 AM »
Glad to hear that it is working for you!  Enjoy your new station.....
WU Gold Stars for everyone! :lol:

Offline vreihen

  • El Niño chaser
  • Forecaster
  • *****
  • Posts: 1216
  • K2BIG
Re: WeatherFlow UDP station driver for weewx
« Reply #6 on: May 17, 2020, 04:22:36 PM »
I just pushed out a new version (v1.10) to GitHub:

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

The biggest change is adding support for the new Tempest Weather Station.

Other changes are WeeWX 4.x support, and running under Python 3.

*** Note that this version is hard-coded for Python 3.  See the changelog for lines that need to be edited to run under Python2.

Be safe and stay healthy.....
WU Gold Stars for everyone! :lol:

Offline dadzilla

  • CW8746
  • Member
  • *
  • Posts: 2
    • Kraemer Lake Weather
Re: WeatherFlow UDP station driver for weewx
« Reply #7 on: June 18, 2020, 07:03:56 PM »
Thanks for the good work - up and running on my site!

 

anything