WeeWX UDP driver for WeatherFlow station

Yes, restarted WeeWX and rebooted the RPi. Left it running overnight and it hasn’t created the HTML files.

Did you set up a sensor map? Without a sensor map, nothing will be emitted.

By the way, you are better of posting WeeWX questions to the weewx-user forum.

-tk

1 Like

Could you help me with the Sensor Map? The instructions says that if I use the --reconfigure I shouldn’t need to do anything else.

The weewx.conf has:

The weatherflowudp.py has this top section commented out:

If I scroll down, I don’t see that section. This is the closest I see:

Looks like I had to copy and paste that information in the weewx.conf. This is what I have now but I’m only getting wind being captured. I have a Tempest:

image

OK, got it working. Needed to change the sensor map from Air to Tempest by replacing the obs_air to obs_st

This is what it looks like and I’m capturing data and HTML pages are being updated:

1 Like

Hey, I recognize that sensor_map! AR-00004424 is one of my Air units!

RIP, AR-00004424. :frowning: At one point, it was one of (if not the) longest continuously-running WF devices in the world…

1 Like

I’m looking at the battery level in WeeWx and it says it is “Low”.
image

When I look at the Tempest itself, it shows a good battery voltage:

Is there anything I need to change in the config files so that WeeWx represents the Tempest battery level correctly?

What is the normal “good” range for battery in the Tempest?

Looks like they are documented here.

2 Likes

liking WeeWX so far … using the UDP driver… however…am i missing something…it limits how often visuals get refreshed. I’m using the BelcherTown skin.

I wanted the wind direction and speed and temp update more real time… with UDP pushing all the time…is there any way to make this work.

I thought about having to go about it a round about way… using
weatherflow-udp-listener
and converting to MQTT and subscribing to that MQTT information for the skin to work.

Am I overthinking this or missing a configuration somewhere?

The sample Tempest sensor_map maps these two voltage readings (decimal numeric):

    outTempBatteryStatus = battery.ST-00000025.obs_st
    windBatteryStatus = battery.ST-00000025.obs_st

Translating them into words is apparently happening in the WeeWX default “Seasons” skin:

https://groups.google.com/g/weewx-user/c/etdA36tsNFM

I don’t use the “Seasons” skin (Belchertown skin is the cat’s meow), so I will leave you take it from here…

You can use WeeWX’s MQTT plugin to push the station data to Mosquitto or another MQTT broker, and then have Belchertown grab it from there. I’m running Mosquitto on the same Raspberry Pi as WeeWX, and have 3-second updates in Belchertown from my home network. (I don’t have Mosquitto visible from the Internet by choice, so I only have 1-minute updates via browser refresh unless I fire up my VPN.)

Remember, WeeWX can do anything if you find the plugin. I just installed one a few weeks ago that feeds my WeeWX station data to my Hubitat home automation controller…

You need to look at the cheetah template code for the weewx skin. The default speaks Davis VP2 which has values of 0 or 1 for good/bad. You need to tweak the skin to code in a voltage range for what you consider good or bad (note that a Tempest has much different voltages than a Sky/Air, so you might need to salt to taste a little based on your gear).

This is another question that should be in weewx-users google group probably.

I chose to remove the battery level from the weewx display because it is meaningless to the public viewing my weather information.
cheers Ian :slight_smile:

thanks for the info.

I used the the sudo built in one that weewx had on the wiki https://github.com/weewx/weewx/wiki/mqtt

Sorry i missed one last thing I think. The UDP driver is collecting the data correct? Does that plugin rebroadcast that data to mqtt? I haven’t seen any data come through in testing. again…minor configuration issue I’m sure.

(i haven’t tied into the skin yet, just still trying to see if mqtt sees the data getting published)

I’m pretty sure that I used that MQTT plugin, and followed the Belchertown instructions for setting up Mosquitto and everything else.

The station driver takes the UDP data and feeds it into WeeWX. WeeWX stores the data into its archive database, and also forwards it to wherever you want (WU, CWOP, AWEKAS, etc.) One of those places is an MQTT server, either running locally or in the cloud.

Here are some snippets from my weewx.conf file, with a disclaimer that I am still running an early pre-release 1.0 beta of Belchertown:

[StdRESTful]

    [[MQTT]]
        server_url = mqtt://mqtt_userid:mqtt_passwd@127.0.0.1:1883/
        topic = weather
        unit_system = US
        binding = archive, loop
        aggregation = aggregate
        log_success = false

.
.
.

[[Belchertown]]
    HTML_ROOT = /var/weewx/reports/live
    skin = Belchertown
    [[[Extras]]]
        theme = dark
        belchertown_root_url = http://home.hvtraffic.com:845/weewx/live
        #logo_image = "https://belchertownweather.com/images/content/btownwx-logo-slim.png"
        site_title = The Buffer Zone
        footer_copyright_text = HVtraffic.com
        forecast_enabled = 1
        darksky_secret_key = [redacted]
        darksky_lang = en
        darksky_units = us
        forecast_stale = 3540
        forecast_alert_enabled = 1
        earthquake_enabled = 1
        earthquake_maxradiuskm = 1000
        earthquake_stale = 10740
        facebook_enabled = 0
        twitter_enabled = 0
        #twitter_owner = PatOBrienPhoto
        mqtt_websockets_enabled = 1
        mqtt_websockets_host = 192.168.1.112
        mqtt_websockets_port = 1884
        mqtt_websockets_ssl = 0
        mqtt_websockets_topic = weather/loop
        disconnect_live_website_visitor = 0
        disconnect_live_visitor = 0
        manifest_name = The Buffer Zone
        manifest_short_name = 12549
        highcharts_homepage_graphgroup = homepage

/etc/mosquitto/conf.d/myconfig.conf:

persistence false

allow_anonymous true
password_file /etc/mosquitto/passwd

acl_file /etc/mosquitto/acl

listener 1883
protocol mqtt

# websockets
listener 1884
protocol websockets

connection_messages false
log_dest none

This should get you a head start…

1 Like

after banging my head this morning…decided to look at the logs…

trying to figure out if wrong version of something got installed for the plugin.

Jul 23 10:16:14 raspberrypi weewx[1926] DEBUG weewx.engine: Loading service user.mqtt.MQTT
Jul 23 10:16:14 raspberrypi weewx[1926] CRITICAL __main__: Caught unrecoverable exception:
Jul 23 10:16:14 raspberrypi weewx[1926] CRITICAL __main__:     ****  No module named 'paho'
Jul 23 10:16:14 raspberrypi weewx[1926] CRITICAL __main__:     ****  Traceback (most recent call last):
Jul 23 10:16:14 raspberrypi weewx[1926] CRITICAL __main__:     ****    File "/usr/share/weewx/weewxd", line 148, in main
Jul 23 10:16:14 raspberrypi weewx[1926] CRITICAL __main__:     ****      engine = weewx.engine.StdEngine(config_dict)
Jul 23 10:16:14 raspberrypi weewx[1926] CRITICAL __main__:     ****    File "/usr/share/weewx/weewx/engine.py", line 75, in __init__
Jul 23 10:16:14 raspberrypi weewx[1926] CRITICAL __main__:     ****      self.loadServices(config_dict)
Jul 23 10:16:14 raspberrypi weewx[1926] CRITICAL __main__:     ****    File "/usr/share/weewx/weewx/engine.py", line 138, in loadServices
Jul 23 10:16:14 raspberrypi weewx[1926] CRITICAL __main__:     ****      obj = weeutil.weeutil.get_object(svc)(self,config_dict)
Jul 23 10:16:14 raspberrypi weewx[1926] CRITICAL __main__:     ****    File "/usr/share/weewx/weeutil/weeutil.py", line 1093, in get_object
Jul 23 10:16:14 raspberrypi weewx[1926] CRITICAL __main__:     ****      mod = __import__(module)
Jul 23 10:16:14 raspberrypi weewx[1926] CRITICAL __main__:     ****    File "/usr/share/weewx/user/mqtt.py", line 100, in <module>
Jul 23 10:16:14 raspberrypi weewx[1926] CRITICAL __main__:     ****      import paho.mqtt.client as mqtt
Jul 23 10:16:14 raspberrypi weewx[1926] CRITICAL __main__:     ****  ModuleNotFoundError: No module named 'paho'
Jul 23 10:16:14 raspberrypi weewx[1926] CRITICAL __main__:     ****  Exiting.

hold the presses…

fixed it with a python 3 install…

sudo pip3 install paho-mqtt

1 Like

closer LOL

now getting

Failed connecting to the weather station. Please try again later! Last Updated July 23, 2020, 10:50:00 AM 

message on the skin

I changed mine to indicate the actual voltage reading… edit weewx/skins/Seasons/sensors.inc starting at line 7…
## this is a conditional display of sensor data, including connectivity,
## battery status, and various voltages. if there are no data available,
## then this degenerates to nothing displayed.

#def get_battery_status($x)
#if $x > 2.3
<span class="status_ok">$current.windBatteryStatus.raw</span>
#else
<span class="status_low">$current.windBatteryStatus.raw</span>
#end if
#end def

## first see what sensor data are available

The key thing to change is line 12, which is the value for a “good” battery—a good reading will be in green and a bad will be in red. Lines 13 and 15 replace the words “OK” and “LOW” with the actual sensor reading.

Removing or renaming the output requires additional changes, if you’d like details let me know.

Station is at https://stonemeadowdevelopment.com/weewx/ if you want to peek.

2 Likes