WeatherFlow UDP listener and MQTT/InfluxDB publisher utility

You did not download my listener.py from GitHub. All you did was install its prerequisites. You need to get the actual software too.

If you want to get just the listener, you could run the following from a shell window…

wget https://raw.githubusercontent.com/vinceskahan/weatherflow-udp-listener/master/listen.py

Thank you very much for this integration, I have been using it for the past couple of days with mqtt and it works flawlessly! One question, should I be able to publiush to mqtt and influx? When I use the following parameters - I only get influx (no mqtt):

-b 192.168.1.105 --mqtt --influxdb --influxdb_host=192.168.1.105 --influxdb_port=8086 --influxdb_db=weatherflow -M

Thanks again for all of your hard work!

I’m pretty sure it should work with publishing to both. You probably need to specify the option to tell it the mqtt broker’s address, as it’s doubtful the default will work for everybody. Check the top of the python script for more info.

This works for mqtt:
-b 192.168.1.105 --mqtt

and this works for influx:
--influxdb --influxdb_host=192.168.1.105 --influxdb_port=8086 --influxdb_db=weatherflow -M

but this only gets me influx:
-b 192.168.1.105 --mqtt --influxdb --influxdb_host=192.168.1.105 --influxdb_port=8086 --influxdb_db=weatherflow -M

Thank you again for this utility!

Works for me (of course you knew I’d say that).

Make sure you subscribe to the correct topic on your MQTT system. You should see the topic it publishes in the output. Also make sure that you have the db you specify defined in influxdb as well.

LOL - of course! :wink: It’s now working for me as well (actually it never was NOT working). The culprit in my case was the “-M” option that I was using along with the combined mqtt and influx arguments. That changed the mqtt topic, so I was not seeing the mqtt messages. Removed the “-M” and all is good now.

Awesome utility - thank you for sharing it!

Hi I’m having issues getting the data to influx. When I look at the influx logs nothing seems to be getting there from the app

listen.py --influxdb --influxdb_host=172.16.1.246 --influxdb_port=8086 --influxdb_db=weatherDB -M -v

is what I am running

impossible to know for certain but possibilities include:

  • your db name is wrong in the command you mentioned
  • the ip is wrong or the port is wrong (less likey)
  • perhaps you need to also specify the influxdb username+password

at a minimum I’d suggest you try just the vanilla listener to make sure it hears something, before trying to have it publish to influxdb (as a second step)

listen.py --raw 
# hit ^C a couple times to stop the process

Thanks for the quick reply

raw is outputting data and I have tried a couple different databases with and without username password. Is there a way of debuging the stream going to influx?

You’d need to run a sniffer such as ethereal/wireshark, or do something with iptables to count packets coming into the database port on the db system or out of the nic on the listener system, or possibly run your influxdb process in a high debug level (no, I don’t know how to do that). Definitely make sure the database you’re trying to exists already and that the username/password are correct. Check that you have the case matching (I don’t know if influxdb is case-sensitive when you specify a db). Normal stuff.

Would be really nice if the listener could run properly as a service. I’ve tried doing so with the exact same parameters as the CLI, but it doesn’t actually collect any data when running as a service. For now I have it running in a screen session.

Other than “Would be really nice nice if…” you have provided really nothing I can use as info to even try to help you.

  • there is a systemd example in the github repo if you wanted to use that.
  • You could also old-school it via putting something like “nohup listener.py arg1 arg2 arg3 >/dev/null 2>&1” into your rc.local file.
  • You could also do something via @boot in your crontab.
  • Likely there are a dozen other ways to do it.

Unfortunately I no longer have any WF gear, so I can’t do too much to help edge cases like this one especially with such a skeletal problem description.

The systemd example is what I tried. It gives no indication that it is working, nor does it put anything into the database, using the same CLI parameters as manually running it.

I really can’t spare any time to work this one, given there are so many viable easy alternatives.

If you eventually get it working and find errors in my code or documentation, please submit a pull request on my github site and I’ll consider merging your changes. Thanks.

Hello! Loving my Weatherflow that I just installed. Was looking to grab some direct UDP metrics and dump them into a logging framework because I couldn’t get this script to work at first runaround. Came back around and tried again and for some reason, now working great! Going to polish up some Grafana dashboards once I get a few more created but just wanted to say an early thanks to @vinceskahan and the community for the efforts!

1 Like

Adding a quick update that uses this WeatherFlow UDP collector as part of an All In One stack.

Would love any feedback on the dashboards based on other data/queries. Right now I just have one WeatherFlow Tempest - so the dashboards are geared towards a single device. But happy to make some other extensions to the dashboards as needed.

1 Like

Whats the reference for RSSI and HUB RSSI?

RSSI = Tempest to HUB (900 MHz radio)? and HUB RSSI = to the WiFi Radio?

Nice work, I like it.

A two second search for hub_rssi points to this description from WF - https://community.tempest.earth/t/air-hub-rssi-reports-zero-edited-was-sky/2037/6

A post was merged into an existing topic: A Few Grafana Dashboards for Tempest