WeeWX UDP driver for WeatherFlow station

Hey, yeah - definitely was - no issues writing to MySQL - it was just writing mostly Nulls.

I woke up this morning pleasantly surprised to see that my database is being populated as expected! The only thing that I changed was the indentation on the sensor_map options - wondering if that had an affect? Nothing in weewx logs suggested that was a problem though.

Python is EXTREMELY picky about indenting, mixing tabs/spaces, etc…

I suspect that you had some unprintable character on a line in there someplace, or perhaps a Windows end-of-line or the like. I’ve never seen an issue related to indenting in weewx.conf

But glad it’s working !

It absolutely *is* an issue in weewx.conf…especially with nested blocks like the sensor_map:

One missing space (or using a tab instead of spaces) will kick the pressure setting (and probably everything after it) out of the sensor_map child block and into the WeatherFlowUDP parent block where it does absolutely nothing…

Wow. That’s either a bug in how you did configobj parsing in your driver, or in how Tom did it at the weewx level.

But spaces/tabs are not ‘supposed’ to make any difference. It’s all supposed to be based on the bracket levels.

Definitely worth a bug report on the weewx side if you can cook up a generic test case they can do regression testing against.

After several hours spent reading previous posts in this thread, I’m at a standstill to figure out why I can’t get data into weewx from my Tempest. I have checked and rechecked my sensor map, and ensured data is being posted across the network via UDP. Everything checks out.

I will add that I’m swapping over from a Davis VP2 to my Weatherflow unit in weewx. My VP2 has been running fine and uploading to my site every update.

I’ve attached my sensor map and settings below…as well as a screenshot showing the UDP data. Hoping I’ve missed something simple here.

Your serial number for the Tempest in weewx.conf does not match the serial number in the UDP broadcasts. You need to edit weewx.conf to reflect your actual sensor id.

3 Likes

Thank you! I for some reason thought the station ID went there, but obviously it needed the tempest sensor ID (duh!).

1 Like

I had an old WH1080-type weather station using the FineOffsetUSB driver before my Tempest arrived. I was preparing myself for hours of work tweaking weewx so that my database would receive data from my new weather station.

It took 4 minutes. It would have taken 1 minute if I wasn’t a tool and skipped past the section informing me to change the station ID to mine in the sensor map section.

Just wanted to say thanks. Awesome driver @vreihen

3 Likes

I’m trying to get the WeatherFlow integrated with WeeWx that I was using with an Ultimeter station. I replaced the driver / udp_address, I enabled the log_raw_packets to find the sensors ID but not sure if there is something that needs to be enabled in the Tempest HUB so it can start sending data because I’m not seeing anything in the syslog coming from the Tempest. Any help will be appreciate.

The HUB seems to be broadcasting;

root@weewx-vm:~# sudo tcpdump -n udp port 50222

tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on ens160, link-type EN10MB (Ethernet), capture size 262144 bytes
15:16:41.149228 IP 192.168.20.251.50222 > 255.255.255.255.50222: UDP, length 105
15:16:41.191064 IP 192.168.20.251.50222 > 255.255.255.255.50222: UDP, length 101
15:16:44.294620 IP 192.168.20.251.50222 > 255.255.255.255.50222: UDP, length 105
15:16:44.336589 IP 192.168.20.251.50222 > 255.255.255.255.50222: UDP, length 101

This is what I’m getting from WeeWx after start it;

Dec  1 15:19:05 weewx-vm systemd[1]: Starting LSB: weewx weather system...

Dec 1 15:19:05 weewx-vm weewx[2167]: * Starting weewx weather system weewx
Dec 1 15:19:05 weewx-vm weewx[2181] INFO main: Initializing weewx version 4.2.0
Dec 1 15:19:05 weewx-vm weewx[2181] INFO main: Using Python 2.7.12 (default, Oct 5 2020, 13:56:01) #012[GCC 5.4.0 20160609]
Dec 1 15:19:05 weewx-vm weewx[2181] INFO main: Platform Linux-4.4.0-193-generic-x86_64-with-Ubuntu-16.04-xenial
Dec 1 15:19:05 weewx-vm weewx[2181] INFO main: Locale is ‘en_US.UTF-8’
Dec 1 15:19:05 weewx-vm weewx[2181] INFO main: PID file is /var/run/weewx.pid
Dec 1 15:19:05 weewx-vm weewx[2167]: …done.
Dec 1 15:19:05 weewx-vm systemd[1]: Started LSB: weewx weather system.

You have provided very little to go on for us to try to help.

Best guess is that you didn’t edit the sensor map in weewx.conf to tell it the serial number of your tempest in your [weatherflowUDP] [[sensor_map]] section. A sample one is at https://github.com/captain-coredump/weatherflow-udp/blob/master/sample_Tempest_sensor_map but be sure to edit your ST-nnnnnnnn number in so it listens for ‘your’ tempest.

Just got it working I followed the WeeWx wiki about install the new driver and after 3 attempts I got it working. Thanks.

When WU rapid fire is enabled in WeeWx the Wind Gust stat gets disabled, anyway to get the gust with rapidfire at the same time?

Answered in weewx-users. Lets pick one place to work it please…

Hello,

I’ve been working on some improvements on the Weewx driver. I’ve just pressed the ‘release’ button and there’s now a version 1.12. It is based on Tom Keffer’s version.

This is the first time I work with Python code, so that’s interesting. I’ve been developing it with Python 3.8.6 but my prod environment is on Python 2.7.15 so even though I have no idea what the differences between the two are (I’m pretty new, I told you…) it seems it still works on both, so that’s good I suppose…

The changes are:

  • Added support for fetching Archive records from the REST interface
  • Made the sensor map optional, fetching the info from the REST interface
  • Let the hardware name function return the actual type of devices
  • Don’t fill the log file with messages “Unknown packet type: ‘light_debug’”.

To install take a look at the documentation here: weatherflow-udp/Readme.md at 1.12 · jjvdgeer/weatherflow-udp · GitHub

You can download the driver here: https://github.com/jjvdgeer/weatherflow-udp/releases/download/1.12/weatherflow-udp-master-1.12.zip

And of course, take care, I don’t accept any responsibility and so on and so forth… :slight_smile:

PS: I probably should have contacted the original author, but it seems that Tom Keffer made a pull request that was not reacted on at all and me and somebody else created an issue that was also not reacted on, so it seems he’s not too interested.

Good luck!
Jan-Jaap

4 Likes

Most software packages that people actually use have queued up ‘issues’ and pull requests. You shouldn’t interpret lack of clearing a backlog of such things as lack of interest. People have a life.

If you want to be polite to the original author, you should fork his repo and submit a PR for your additions/improvements. Tom doesn’t even have any WF gear any more so complaints vs. Tom’s fork aren’t going anywhere. You really need to do a PR to @vreihen’s repo to get the core code enhanced someday when/if he gets around to it.

I’d also suggest renaming your variant so folks aren’t confused whose code they’re running. At a minimum change the version string or something so wee_extension reports a version that doesn’t look like it’s Arthur’s code. They somebody could use wee_extension to update to your variant safely and leave the right traces behind so folks know what they have.

Lastly, looking at the official version, it doesn’t throw any errors you complained about in the issue you opened there. He just silently ignores things like the debug_whatever messages that WF adds and deletes in their firmware. You should close your issue vs @vreihen’s repo as it’s not applicable to that code anyway.

1 Like

I am having issues trying to get the Tempest UDP Driver sorted out.
any chance of some assistance from someone who has it up and running…??

When I look at weewx config I can not find any sensor map…do I just paste it in…??

I have installed TCP/UDP Test Tool on my Android phone & found the Serial to be ST-0002
I have edited the sample sensor map, just not sure where to put it.

(The edited Sensor Map - ready to put “somewhere”)

[[sensor_map]]

outTemp = air_temperature.ST-0002.obs_st
outHumidity = relative_humidity.ST-0002.obs_st
pressure = station_pressure.ST-0002.obs_st
#lightning_strikes = lightning_strike_count.ST-0002.obs_st
#avg_distance = lightning_strike_avg_distance.ST-0002.obs_st
outTempBatteryStatus = battery.ST-0002.obs_st
windSpeed = wind_speed.ST-0002.rapid_wind
windDir = wind_direction.ST-0002.rapid_wind
#luxXXX = illuminance.ST-0002.obs_st
UV = uv.ST-00000025.obs_st
rain = rain_accumulated.ST-0002.obs_st
windBatteryStatus = battery.ST-0002.obs_st
radiation = solar_radiation.ST-0002.obs_st
#lightningXXX = distance.ST-0002.evt_strike
#lightningYYY = energy.ST-0002.evt_strike

---------------Snip from weewx.conf----------------------------------------

This section is for information about the station.

[Station]

# Description of the station location
location = Woodside SA

# Latitude in decimal degrees. Negative for southern hemisphere
latitude = -34.95694444
# Longitude in decimal degrees. Negative for western hemisphere.
longitude = 138.88000000

# Altitude of the station, with unit it is in. This is downloaded from
# from the station if the hardware supports it.
altitude = 389, meter

# Set to type of station hardware. There must be a corresponding stanza
# in this file with a 'driver' parameter indicating the driver to be used.
station_type = WeatherFlowUDP

# If you have a website, you may specify an URL
#station_url = http://www.example.com

# The start of the rain year (1=January; 10=October, etc.). This is
# downloaded from the station if the hardware supports it.
rain_year_start = 1

# Start of week (0=Monday, 6=Sunday)
week_start = 6

##############################################################################

[WeatherFlowUDP]
driver = user.weatherflowudp

##############################################################################

[Simulator]

This section is for the weewx weather station simulator

# The time (in seconds) between LOOP packets.
loop_interval = 2.5

# The simulator mode can be either 'simulator' or 'generator'.
# Real-time simulator. Sleep between each LOOP packet.
mode = simulator
# Generator.  Emit LOOP packets as fast as possible (useful for testing).
#mode = generator

# The start time. Format is YYYY-mm-ddTHH:MM. If not specified, the default
# is to use the present time.
#start = 2011-01-01T00:00

# The driver to use:
driver = weewx.drivers.simulator

##############################################################################

This section is for uploading data to Internet sites

----------------End Snip from weewx.conf-----------------------------------------------

Firstly, your serial number looks wrong. I doubt you have serial number 2 of the tempest, and there aren’t enough digits there in the serial number.

You need to download and install the driver (top message in this thread) and follow the procedure for enabling the driver (lhow-to is linked in the driver’s docs), then edit in the stanza and restart weewx.

But it won’t work if you don’t put the correct serial number in for the Tempest, and your example looks pretty clearly incorrect.

Just go to your Station’s Status page to get the serial numbers.

Yes - I did download the & install the driver, followed the procedure, read the doc’s etc.
Thanks for the heads up on the Serial number (yes I thought 0002 was unusual - but it was shown) The Status page is a much better option, perhaps it could be added to the doc’s.
My Serial No. is ST–00023084. So that one is solved.
I still do not know where to “put” the sensor map.
Thanks for the help so far - I will be off working remotely the next day or so, but will have another play at the end of the week.