WeeWX UDP driver for WeatherFlow station

Thank you both for hints but being new to weewx, I admit I’m completely lost in settings… Have no idea where/how to configure the database, how to set up the plots, etc.
Is it possible to do all these things from a Terminal?
Also, my plots (temperature, wind, etc.) don’t show any units. Where can I set them up?

It’s all in the weewx docs, which you need to read up on. Yes. In the config files for the skins, which you can edit to salt to taste, so to speak.

I’d suggest the weewx-users google group would be where you should ask those kinds of things, as they’re not really WF-specific in the least.

Just as an example, my weewx site using the config that I posted above is HERE if you want to see what a weewx site using the Weatherflow UDP driver looks like.

1 Like

probably blocked for Yankees fans…

Wondering if it’s possible for weewx to show both raw+RainCheck(ed) pieces of data, although I can’t see how we could grab that as it would require use of the other APIs to get the tweaked value. That would be ugly…

1 Like

Those are fighting words. :stuck_out_tongue: Ain’t no Yankees/Jets/Giants fans at my house! (I will confess to being at the 1986 World Series game where the Mets beat Boston because of Billy Buckner’s error, but most of my childhood was not in the NYC area and I have no interest in any NYC sports teams.)

The thought did cross my mind at one point to try and use the web API as a sorta Davis logger, to fill in missing UDP packet data. Adding an additional rain observation would obviously require extending the database schema. Extending the schema for more rain sources is actually something that I am thinking about doing on my own station, to plot all of my rain gauges on one Belchertown/Highcharts graph for comparison…

1 Like

Don’t extend the schema, go to a secondary db (or multiple ones). Easier to make a standalone extension and reference it in a skin.

AFAIK, the Belchertown skin’s awesome Highcharts functions cannot use more than one database. I have both Davis and WF stations logging into separate databases on one Pi, and cannot make a combined graph to overlay both sets of data onto one graph. Only the default WeeWX skin graphing tools will let you combine data from multiple databases on one graph…

That would be unfortunate. I have something like five db so far and 12+ years of records. Consolidating everything into a unified uber-db would be a pain to do, although I know Matthew has a draft big schema that tries to reach more of a many-many-sensors setup (as few people need the legacy wview schema match any more these days).

The multi-db support in weewx is fabulous. I’ll email Pat and see if this one is on his to-do list.

1 Like

Just an update for others - Pat was nice enough to jump on this one and fixed this issue, so Belchertown ‘can’ overlay data from multiple db onto one highcharts. He’ll be adding this into the next version coming out and asks that folks contact him if they need something before then (or PM me and I’ll send you the patch). Works quite nicely.

3 Likes

I hope this question belongs to this topic.
I collect data to a RPi with 2 wifi interfaces (one for the Hub, other for the internet). When the wifi router is OFF (during storms), the RPi still reads data from the Hub (both are on the UPS). When the internet connection is back again, the Hub sends all missing data to the WF server.
My weewx database, however, misses the data from the Air. All Sky data is there but majority from the Air is not.
Has anyone saw this? Is there a known reason behind?

Does anyone know if the Hub still transmits local UDP data real-time if it cannot reach the WF servers?

Does the Hub send “catch up” UDP packets from the buffered data when the WF server is reachable again???

3 Likes

Tests I have done show yes to both questions.

1 Like

Thanks for the excellent driver, it works great! I was up and running same day.

Weatherflow site: https://smartweather.weatherflow.com/station/11922/grid
WeeWx reports: http://phidauex.com/weather/

I was poking around with the driver a bit with the hope of enabling lightning, and making a few other usability enhancements, but haven’t made final progress yet.

One tip I wanted to give you for the documentation is that, while the logging raw packets or running a sniffer like Wireshark can tell you what the serial number of the SKY and AIR are, the Smart Weather app will tell you as well:

  1. Open App and select “Settings”
  2. Select “Stations”
  3. Select your station
  4. Select “Manage Devices”
  5. Select your SKY or AIR
  6. The serial number will be at the bottom of the screen, in the format “AR-000xxxxx” or “SK-00010995”

Ultimately it may not be much faster for someone who is familiar with packet logging, but for newer users making two variables in the weewx.conf configuration for serial_sky and serial_air that fill automatically into the sensor map might be easier to understand.

I’ll keep watching and am happy to do some testing on upcoming versions if needed.

3 Likes

@vreihen - I just sent you a PR with my patches to get your driver to work on current Raspbian using python 3.7.3 - nothing too big there, but I wanted to do it before I forget (again). Thanks again for the great driver.

1 Like

Afternoon - Just wondering if its possible to get the rain start notification into weewx via the driver.

I am looking to then add rain notifications to MQTT - so at the start of a rain event i can then use MQTT to trigger events.

I know its broadcast in the udp but cant see how to add it to weewx…

Hope its ok to askm

Andy

weewx schema elements are typically all floats (measurements of something) so putting something that would look like a dateTime (secs since the epoch) into the database would require you to extend your schema at a minimum. That’s a bit of a heavy lift, although likely ‘possible’ I guess.

My UDP listener ‘can’ emit MQTT for this if you run it in parallel with weewx and look for the evt_precip topic. Be sure to set the weewx driver to “share_socket = True” so that the weewx driver and my (second) listener can both listen for the incoming broadcasts. The weewx driver’s default is ‘False’ if I remember correctly.

1 Like

Thanks Vince - I have used the UDP listener and then added in a short script to publish to an MQTT topic which in turn rings a bell twice when it rains…Bell_Ringer_Small_2019-Nov-02_05-45-29PM-000_CustomizedView3509293498

Thanks for the UDP tips in other parts of the forum btw, it got me on my way… (the pic above is obviously a render, I’ll post a proper pic if anyone is interested - it looks roughly the same in rl)…

Andy

1 Like

fyi - I made a ‘slight’ update to my PR today after testing the new weewx-4.0b1 under both python2 and python3, so my patched driver should work ok under either python until @vreihen gets around to updating his official driver. Look in the PR section on his GitHub page for my tweaked version.

FWIW - I’m running python3 on my pi4 over wifi…

2 Likes

Vince, I have been trying to load your PR for weatherflowupd to get to Python3. I get this error when I run weewx:

sudo ./weewxd /etc/weewx/weewx.conf
Traceback (most recent call last):
File “./weewxd”, line 64, in
weewx.engine.main(options, args)
File “/home/mythtv/weewx/bin/weewx/engine.py”, line 886, in main
engine = StdEngine(config_dict)
File “/home/mythtv/weewx/bin/weewx/engine.py”, line 77, in init
self.setupStation(config_dict)
File “/home/mythtv/weewx/bin/weewx/engine.py”, line 100, in setupStation
import(driver)
ModuleNotFoundError: No module named ‘user.weatherflowudp’

but weatherflowudp.py is in the /usr/share/weewx/user directory

When I run weatherflowupd.py directly I get this error:

./weatherflowudp.py
Traceback (most recent call last):
File “./weatherflowudp.py”, line 144, in
import weewx.units
ModuleNotFoundError: No module named ‘weewx’

Any idea what I missed. I thought I followed all the installation instructions for weewx-4.0.1b5 correctly and Simulator seems to work OK without an error. Did I miss something that would install weewx.unit module for python3? I’ll be getting a Tempest soon after they start shipping and I wanted to set up weewx for it.

Thanks for any thoughts on this.

Kevin

Wow that’s a messed up set of pathnames.

  • Your sudo command is using paths from a dpkg installation of weewx to a Debian-like system.

    Problem is there isn’t such a variant for the v4 betas yet. Do you perhaps have a pre-existing v3 weewx installation on your pi ? If so, that’s going to have to be removed first (save the /etc/weewx tree someplace if you have edits in the .conf files therein)

  • The /home/mythtv paths are just completely unusual, and won’t work at all with weewx unless you hack it massively. The only valid paths are in the ‘where to find things’ section of http://weewx.com/docs/usersguide.htm

Regardless, the beta supports just one way to install it at this time - the setup.py method:

  • The weewx v4 betas require you to install via setup.py so your paths would all be under /home/weewx and the wfudp driver would go under /home/weewx/bin/user in a correct installation.

    I’m guessing you extracted the .tar.gz file into /home/mythtv/weewx but forgot to run the actual installation steps (http://weewx.com/docs/setup.htm)

If you want more of a one-button install, I have a github script that goes from nothing to Simulator running at https://github.com/vinceskahan/weewx-install-script and works great on current Raspbian.

If you don’t have any gear at all yet, then I’d suggest you clean up your system and remove any and all versions of weewx you might have installed someplace and stabilize a setup.py installation of the weewx beta with the Simulator driver. All the paths would be under /home/weewx for everything.

Lastly, if you ‘do’ have a air+sky station already, let me know and we can definitely get your pi cleaned up to work with that gear.

Hope this helps.

1 Like

It sounds like NOOBS installed a media streamer distro and not Raspbian…

1 Like