WeatherFlow2MQTT for Home Assistant

This project monitors the UDP socket (50222) from a WeatherFlow Hub, and publishes the data to a MQTT Server. Data is formatted in a way that, it supports the MQTT Discovery format for Home Assistant, so a sensor will created for each entity that WeatherFlow sends out, if you have MQTT Discovery enabled.

Everything runs in a pre-build Docker Container, so installation is very simple, you only need Docker installed on a computer and a MQTT Server setup somewhere in your network. If you run the Supervised version of Home Assistant, you will have easy access to both.

There is support for both the AIR & SKY devices and the TEMPEST device.

For installation and configuration instructions look at Github

2 Likes

Thank you for this. I had been looking for an off-line integration for HA to backup SmartWeather (Thanks for that too) but the UDP custom integration is not getting any love and I don’t use Node Red. In any case, all your great work has elevated you to the top of my list of favorite people!

I have been up and running for a day or so and mostly working great, but there are a few things I can’t yet explain. This is my first MQTT integration in HA, so the oddities may be on my end. I came to the forum to see what I could learn and found this post. I will log my observations on GitHub.

Thanks again, and these guys should really find a way to get you a Tempest device!

Thank you Charles. Please post anything you find in the issues section on Github, and I will do my best to help/fix.

And WeatherFlow has been very helpfull, so I will get the possibility to get my hands on a Tempest station

Any chance of a version to run on ARM? :slight_smile:

I just tried installing this, but only have a PI here at the moment. Will have to see if I can get something else to run it on.

Cheers
Simon

Hi Simon,
I am learning all that Docker stuff at the moment, so I am not exactly sure how I build for a different platform, but I will figure it out.

Could you add an issue to Github, so I won’t forget?

In the meantime, you could try and build the container yourself, by doing the following, in a terminal on your PI:

  1. Download the source from Github to your PI.
  2. Unpack the ZipFile, and go to the directory where you find the file Dockerfile
  3. Build the container locally by issuing this command: docker build -t weatherflow2mqtt .
  4. Now follow the instructions from README on Github, with 1 exception: Whenever you see ghcr.io/briis/hass-weatherflow2mqtt replace this with weatherflow2mqtt. This will ensure you use the container you just build.

As I said, I am learning how to really deploy things in Docker, so I am not sure it is enough just to build on a PI, to make it run on a PI, but it is worth a try.

Let me know how this goes

1 Like

Many thanks for the instructions and the integration. I managed to get it working within the Home Assistant OS docker environment.

I’ve added comments over on Github.

Cheers
Simon

THANKS for this Simon. I have copied your instructions to the Discussions on the Github, and you can all find them here

1 Like

Figured I might as well post here since this is probably better then having a discussion in GitHub
From GitHub post:

The below are the only inputs allowed for HA weather condition. Currently this is pulled from the web API. I was toying with the idea of expanding my weather condition template to pull this locally. I understand I can't get the forecast local only; but I like as much self-hosted as possible. I think the only things I can't verify is clear-night, due to light conditions at night. Thoughts below:
‘clear-night’ can't check if fog at night since no light level to compare to (open to ideas)
‘cloudy’ can get a base line lux amount and compare and if not any other precipitation
‘fog’ same as cloudy but with window below a determined temperature
‘hail’ sensor for this
‘lightning’ sensor for this (maybe any number in last 3 hours)
‘lightning-rainy’ combine sensors for this
‘partlycloudy’ same as cloudy, with maybe a trend/derivative sensor to determine intermittent light levels
‘pouring’ Rain Rate > 0.31 in/hr (7.8 mm/hr)
‘rainy’ sensor for this
‘snowy’ a little more complicated but maybe temperature combined with blocked UV sensor and rain sensor
‘snowy-rainy’ same as snowy but easier to assume around 0C / 32F
‘sunny’ easiest just base on UV/lux level
‘windy’ wind speed >25mpg (11.17 m/s) without clouds
‘windy-variant’ windy with clouds
‘exceptional’ dewpoint between 50-60F, temperature between 68-77F, UV below 2.5 index, not any of the above (except sunny).

So...the actual point of this... should I make my condition template and then PR to the readme example or should we incorporate this to give another calculated sensor output? I'm leaning toward a sensor, but this would add a lot more code and wanted to run it past you before a PR without a big change with any other info. I would keep the current web api returned status as you have it and create some other named sensor. Thoughts?

So I am working on the order to determine conditions but I have some things to start. Not in yaml format yet, just working thru the logic.

Fog is likely when:
Air Temperature - Dew Point < 4.5F (2.5C)
Relative Humidity > 95%
Wind Speed < 10 knots / 11.5 mph / 5.14 m/s

*** near seawater >70% Relative Humidity and wind speed <10 knots (5.14 m/s)could cause fog
Need more conditions for fog, it looks like this might throw a lot of false fog.
There is some trends for heating/cooling but most would not have a derivative sensor for air temperature.
windy:
Wind Speed > 25mph (11.17 m/s)
Pouring
Rain Rate > 0.31 in/hr (7.8 mm/hr)

Need to get real world data, but this is a start for figuring out cloudy day & night. Might need to import ‘astral’ into the code. Astral is a python library for Sun & Moon position, we need sunrise/sunset times without pulling from an external source (maybe). There might be other ways.

0.0001 lux – Moonless, overcast night sky.
0.002 lux – Moonless clear night sky with airglow.
0.27–1.0 lux – Full moon on a clear night.
3.4 lux – Dark limit of civil twilight under a clear sky.
100 lux – Very dark overcast day.
400 lux – Sunrise or sunset on a clear day.
1000 lux – Overcast day
10000–25000 lux – Full daylight (not direct sun).
32000–100000 lux – Direct sunlight.

More to follow.

Just updating this post for now.
Exceptional does not appear to be used by some weather integrations. I looked at the code for the animated weather card and ‘exceptional’ does not reference an icon.