Since Sept-2018 (wow) I’ve made a python-based UDP listener/publisher utility available to the WF community. In Feb-2021, I later added a minimal Hub simulator too.
Time to integrate them and catch them up a bit.
ANNOUNCEMENT:
As of today, Jan-27-2023, a new integrated ‘wfudptools’ repo is available (HERE), with this thread opened for any announcements, discussions, etc.
I’ve set the old github repos to indicate they’re deprecated, and have asked the mods here to close the threads for the two original tools.
COMPATIBILITY DETAILS:
python3 is now required
renamed existing utilities for consistency
NEW PACKAGING FEATURES
the pre-built python wheel under dist/ should download and install any needed module prerequisites for you
the python wheel is also installable as --user (no privs needed) or into a python venv if you like doing it that way
USAGE:
wfudplistener [options]
wfudpsimulator
INSTALLATION:
pip3 install wfudptools [--user]
SHORT DESCRIPTION
same stuff, better installation, more integrated/simpler installation/removal possible
Enjoy. Be sure to keep up with the README file on the github repo above for any details you’ll need to know.
PyPi package is available for download (HERE) but you should generally just use the pip3 install mechanism that will do the right thing.
update - this is available on pypi now, so a simple “pip3 install wfudptools [–user]” should do the trick. I have things set currently as version 5.0.1b1 for now. Let me know if you find unexpected ‘features’.
Uninstalling is as simple as changing ‘install’ to ‘uninstall’ above. Pretty slick.
Updated to 5.2.0 - now throws periodic lightning strikes, bumps rapid_wind and temperature occasionally, and reports a little rain so things show up if you run the wfpiconsole in UDP mode vs. the simulator.
Possible breaking change for some - I hardcoded my ST-00006021 as the station id so I can test here easier. Just look for that string near the top of the file and edit as needed for your location. Someday I’ll get around to making a commandline switch to let you set the id at runtime. Someday.
Thanks for this Vince. I just installed today using pip3. I’m trying to write the data to Influxdb2 but I keep getting this error:
File "/Users/---/Library/Python/3.9/lib/python/site-packages/wfudptools/listener.py", line 622, in influxdb2_publish from influxdb_client import InfluxDBClient, Point, WritePrecision
ModuleNotFoundError: No module named 'influxdb_client'
Thanks for the quick reply Vince! Managed to get past the influxdb-client issue with your suggestion.
Now running into an issue with numpy. But I think that’s my issue, not yours. I’m trying to run this on an Apple M1 machine and I’m getting an error about the incompatible architecture installed for numpy.
Thanks again Vince for your quick reponse. I just managed to get it to work by updating numpy to the latest version (2.0.1). Really appreciate your willingness to help!