WeeWX UDP driver for WeatherFlow station

FWIW, you can still use python2 with weewx4 if you are using the ‘setup.py’ installation method.

If you are on a relatively recent debian version using the apt-get packages, those will default to python3 in weewx v4, so you’ll need all your extensions and drivers to be python3 compliant.

New user of WeeWx and Weatherflow. Installed on Ubuntu 18.04 and I’m getting this error, Any ideas?

May 7 13:20:03 bs-medianuc weewx[20711] INFO weewx.engine: Starting main packet loop.
May 7 13:20:03 bs-medianuc /weewxd: weatherflowudp: MainThread: Listening for UDP broadcasts to IP address on port 50222, with timeout 90 and share_socket False…
May 7 13:20:05 bs-medianuc dhcpd[2365]: DHCPREQUEST for 172.17.18.103 from 70:f1:1c:05:0e:1e (gogogate) via eno1
May 7 13:20:05 bs-medianuc dhcpd[2365]: DHCPACK on 172.17.18.103 to 70:f1:1c:05:0e:1e (gogogate) via eno1
May 7 13:20:06 bs-medianuc weewx[20711] INFO weewx.engine: Main loop exiting. Shutting engine down.
May 7 13:20:06 bs-medianuc weewx[20711] CRITICAL main: Caught unrecoverable exception:
May 7 13:20:06 bs-medianuc weewx[20711] CRITICAL main: **** a bytes-like object is required, not ‘str’
May 7 13:20:06 bs-medianuc weewx[20711] CRITICAL main: **** Traceback (most recent call last):
May 7 13:20:06 bs-medianuc weewx[20711] CRITICAL main: **** File “/home/weewx/bin/weewxd”, line 154, in main
May 7 13:20:06 bs-medianuc weewx[20711] CRITICAL main: **** engine.run()
May 7 13:20:06 bs-medianuc weewx[20711] CRITICAL main: **** File “/home/weewx/bin/weewx/engine.py”, line 188, in run
May 7 13:20:06 bs-medianuc weewx[20711] CRITICAL main: **** for packet in self.console.genLoopPackets():
May 7 13:20:06 bs-medianuc weewx[20711] CRITICAL main: **** File “/home/weewx/bin/user/weatherflowudp.py”, line 295, in genLoopPackets
May 7 13:20:06 bs-medianuc weewx[20711] CRITICAL main: **** m0 = m[0].replace(",null",",None")
May 7 13:20:06 bs-medianuc weewx[20711] CRITICAL main: **** TypeError: a bytes-like object is required, not ‘str’
May 7 13:20:06 bs-medianuc weewx[20711] CRITICAL main: **** Exiting.

Is this a one-off error after hours/days of running normally, or a repeatable failure shortly after starting WeeWX???

shortly after starting, I nuked python3 and reinstalled weewx and the udp driver and I’m functional now. I may attempt installing on a RPi in the next day or so with Python3

Drop me an email at the address in the readme file, and I’ll send you the pre-release Python3 driver…

I have responded as requested.

Should we hold off on upgrading to v4 till the new version is released?

You can always go to v4 and still run python2.7 and you’ll be fine. You can switch to python3 when all the drivers and extensions you use are updated. No rush.

still havent see the updated plugin, did you get my email?

Sorry for the delay. I sent it an hour ago.

FYI, I am finishing up the Tempest-specific docs for the driver now, since WF officially published the new UDP API for it. (Thanks, @corrineb!) I’ll be pushing it up to GitHub in a day or so…

3 Likes

Thanks again!

I figured out what I needed to do to fix my weewx for WU… When they ask for password, what they are really asking for is the ‘device’ key…

As opposed to the section asking for the API key, which is for the wufixer app.

I’m subscribed to the weewx Google group now, but I’m wondering… is there a add-in for uploads to DarkSky? (and other weather services???)…

I do have my connection to CWOP back in, as well as PWS Weather… I’m wondering about others not mentioned by default…

BTW - Hope you’re doing well… enjoy the long holiday weekend as best you can!

Thanks again!

Tony

1 Like

Some of the community-developed uploaders are listed near the bottom of the WeeWX wiki page:

https://github.com/weewx/weewx/wiki

Search the Google group though, since it seems like uploaders to everything including your kitchen toaster are buried in the archives there.

In case you haven’t heard yet, DarkSky was bought by Apple last month and most of their services are going away…

1 Like

Thank you… I actually did find some of those resources, @GaryFunk helped me find them!

I have weewx up and running on 4.0, and Python 3 without issues, but then again, I’m only dipping my toes into using weewx…

So far so good!

Thanks! :slight_smile:

Tony

4 Likes

Took a while, but I finally got this up and running on my pi and my Tempest is reporting to PWS weather!!

3 Likes

Anyone with thoughts on why weewx and PWS are reporting different Barometer readings than my Tempest?

image

@kfite13 PWS Weather is a great weather site to upload your data, but the current conditions are normally at least five minutes behind.

Does this apply???

https://github.com/weewx/weewx/wiki/Barometer,-pressure,-and-altimeter

1 Like

You’d have to do the math, but see if the difference is the altitude correction. Mine is always off 12 mbar which lines up with my altitude here.

1 Like

Yeah, I was taking that into account.

pretty sure that is exactly what is going on.

Thanks to both of you.

1 Like

Hi everyone - I’ve got a problem, and I think it might be with my conf file but not sure and would like some advice. I got WeeWx to work perfect with the Simulator (I see the results in the terminal when I run it manually, and it creates the html files fine). I then installed the WeatherFlowUDP driver, which seemed to be successful, and edited my conf file based on the sample. Basically I copied/pasted and changed the Station ID in the sample to my Station ID, and set the conf file to use it. (I tried manually updating it, and also rebuilt it with the reconfigurations function in case I messed something up, but get the same config file both ways.) When I run WeeWx with the WF driver, I don’t get any results, and when I look at the log file, I see this error: “OSError: [Errno 49] Can’t assign requested address”

weewx[40916] INFO __main__: Initializing weewx version 4.1.1
weewx[40916] INFO __main__: Using Python 3.7.3 (default, Apr 24 2020, 18:51:23) 
[Clang 11.0.3 (clang-1103.0.32.62)]
weewx[40916] INFO __main__: Platform Darwin-19.5.0-x86_64-i386-64bit
weewx[40916] INFO __main__: Locale is 'en_US.UTF-8'
weewx[40916] INFO __main__: Using configuration file weewx.conf
weewx[40916] INFO __main__: Debug is 0
weewx[40916] INFO weewx.engine: Loading station type WeatherFlowUDP (user.weatherflowudp)
weewx[40916] INFO weewx.engine: StdConvert target unit is 0x1
weewx[40916] INFO weewx.wxservices: The following values will be calculated: pressure=prefer_hardware, altimeter=prefer_hardware, appTemp=prefer_hardware, barometer=prefer_hardware, beaufort=prefer_hardware, cloudbase=prefer_hardware, dewpoint=prefer_hardware, ET=prefer_hardware, heatindex=prefer_hardware, humidex=prefer_hardware, inDewpoint=prefer_hardware, maxSolarRad=prefer_hardware, rainRate=prefer_hardware, windchill=prefer_hardware, windrun=prefer_hardware
weewx[40916] INFO weewx.wxservices: The following algorithms will be used for calculations: altimeter=aaASOS, maxSolarRad=RS
weewx[40916] INFO weewx.engine: Archive will use data binding wx_binding
weewx[40916] INFO weewx.engine: Record generation will be attempted in 'hardware'
weewx[40916] INFO weewx.engine: Using archive interval of 300 seconds (specified in weewx configuration)
weewx[40916] INFO weewx.restx: StationRegistry: Station will be registered.
weewx[40916] INFO weewx.restx: Wunderground: Posting not enabled.
weewx[40916] INFO weewx.restx: PWSweather: Posting not enabled.
weewx[40916] INFO weewx.restx: CWOP: Posting not enabled.
weewx[40916] INFO weewx.restx: WOW: Posting not enabled.
weewx[40916] INFO weewx.restx: AWEKAS: Posting not enabled.
weewx[40916] INFO __main__: Starting up weewx version 4.1.1
weewx[40916] INFO weewx.engine: Using binding 'wx_binding' to database 'weewx.sdb'
weewx[40916] INFO weewx.manager: Starting backfill of daily summaries
weewx[40916] INFO weewx.engine: Starting main packet loop.
weewx[40916] INFO weewx.engine: Main loop exiting. Shutting engine down.
weewx[40916] CRITICAL __main__: Caught OSError: [Errno 49] Can't assign requested address
weewx[40916] CRITICAL __main__:     ****  Traceback (most recent call last):

weewx[40916] CRITICAL __main__:     ****    File "./bin/weewxd", line 154, in main

weewx[40916] CRITICAL __main__:     ****      engine.run()

weewx[40916] CRITICAL __main__:     ****    File "/Users/Mini/weewx/current/bin/weewx/engine.py", line 188, in run

weewx[40916] CRITICAL __main__:     ****      for packet in self.console.genLoopPackets():

weewx[40916] CRITICAL __main__:     ****    File "/Users/Mini/weewx/current/bin/user/weatherflowudp.py", line 298, in genLoopPackets

weewx[40916] CRITICAL __main__:     ****      s.bind((self._udp_address,self._udp_port))

weewx[40916] CRITICAL __main__:     ****  OSError: [Errno 49] Can't assign requested address

weewx[40916] CRITICAL __main__:     ****  Waiting 10 seconds then retrying...

My config file is weewx.conf.txt (22.9 KB) (.txt added to get the file to upload here)