I finally managed to put together a Custom Component that can read Weather data from a WeatherFlow Smart Home Weather station using the UDP API that this station exposes. This means that everything is running on the local network and there is no need to access anything outside Home Assistant.
For people owning such a Weather Station, you can get realtime weather data that is updated every minute for most values and every 3 seconds for Wind Speed and Wind Bearing.
Output is a set of sensors all prefixed with smartweatherudp. and where most of them are direct readings from the weather station, some of them are calculated values based on formulas and data from the station.
It has been running on my test system now for several weeks, and even though it is a continues loop in the background, I have not noticed a big spike in load on my system, so hopefully that also applies for you.
I am not a programmer by trade, so I had to learn Python, by looking at what others did, and then adapt it to my needs, so please bear with me if the code is not pretty, but at least it works on my system.
Looking forward to feedback and suggestions from the community.
You find the source and instructions how to install on Github
Great work, i was already using your API version but will switch to this one. I will test this out and come back with feedback. Are you adding a tip option somewhere to reward your hard work?
Edit:
Question 1:
Does the UDP version not combine darksky weather with the Weatherflow data just like the API version?
Question 2:
Also no binary sensors like freezing/lightning/raining?
Are you going to add above just like with the API or better remove option 1 from code and change option 2 to template sensors?
Edit:
Got an error, think something in the mapping isnât going right but will look into it tomorrow (itâs 23:32 here )
Invalid config for [sensor.smartweatherudp]: value is not allowed @ data[âmonitored_conditionsâ][12]. Got âprecipitation_last_1hrâ value is not allowed @ data[âmonitored_conditionsâ][13]. Got âprecipitation_last_24hrâ value is not allowed @ data[âmonitored_conditionsâ][14]. Got âprecipitation_yesterdayâ value is not allowed @ data[âmonitored_conditionsâ][1]. Got âfeels_like_temperatureâ. (See /config/components/sensors/custom_components.yaml, line 4). Please check the docs at https://home-assistant.io/components/sensor.smartweatherudp/
Hi @lubbertkramer, unfortunately I did an error in the documentation and had copied over the monitored_conditions from the other SmartWeather component - and the sensors are not completely the same, so that is why you get an error. I have updated the documentation so that the correct sensors are now displayed. At the same time I also added a new feature to Battery devices, so that the Icon is now displaying the Battery Status based on my experience when Batteries are full and the Unit stops sending data.
Btw. You donât have to put in monitored_conditions. If you leave that out, all Sensors are loaded by default
Question 1: No this component only gives the direct sensor values. I am considering to combine with DarkSky also. For now, you can load both components, and then just not load the Sensor component from SmartWeatherUDP, and use this instead. I want some more testing on the stability and accuracy before I start doing the other components
Question 2: Same as 1. In order to do this, I will have to do some more work and rewrite the stuff.
Finally, I will not be adding a Tip option. I understand why some people need that with all the time they spend on helping the rest of us. But I am fortunate enough, to not need it, and I enjoy doing this. But thanks for asking
Thanks for your reply, i keep getting errors thrown at me when i use the config from the readme with all the monitored conditions, when i remove that part the UDP version works fine (i see data) so i will keep it that way for now just to see how it works (works next to your weatherflow API component )
Invalid config for [sensor.smartweatherudp]: value is not allowed @ data[âmonitored_conditionsâ][2]. Got âfeels_like_temperatureâ. (See ?, line ?). Please check the docs at https://home-assistant.io/components/sensor.smartweatherudp/
I still missed 1 sensor that was wrong in the documentation. feels_like_temperature should be feels_like. README.md has been updated. I tested it and now it works.
For the other errors you see, I canât reproduce these, and from the error log it is not possible for me to dig in to the code to see where this error comes from. But please let me know if they persist. At least it seems that you are getting the data.
Great work! Thanks for the effort. I love seeing the UDP version because I want to suggest it for a friend who has spotty internet accessâŚthis way it wonât ever be unavailable due to bad internet service!!
I prefer to keep as much on the home network as I can too so I think Iâll use it as well.
I havenât had a chance to try this yet but will this weekend. BTW, if you donât already know, Weatherflow has released their solar module for the Sky, itâs currently 40% off too.
Note for all: Due to the new structure of Custom Components I have added the manifest.json file.
But unfortunately the way I implemented Custom_Updater it does not download this file. So please re-download __init__.py, sensor.py and manifest.json. The files are then modified to work with Custom_Updater going forward. There are no functional changes to the Custom Components.
@danbutter and @efleming: Looking forward to hear how it works for you.
Btw: Thanks for the tip on the Solar Module - Just ordered mine
So just installed this component, but no data seems to be populating the entities. I noted in your git it says it could be up to a minute before a UDP packet is sent, but all entities are showing as having an âunknownâ value after 10 minutes. Iâve restarted the Weatherflow bridge to see if that helped but no good. Iâve done both a manual install and a git clone, same result.
@briis Any chance you can add an optional host property to the config? My SmartWeather is on a different (isolated) subnet so broadcasts donât cross over to my HA server. I see I can edit the host within the custom_component, just wanted to see if there was a more ârespectableâ way.
Thanks for the component! Looking forward to getting it fully up and running.
I now made the change to the Integration so that you can add host as config option and specify the IP Address in stead of the default 0.0.0.0 As I donât have a setup like yours, I have not been able to test this, so please let me know if it works.
While I was messing with this, I also changed the structure on Github to add support for HACS. It is not part of the default repository, but you can add it manually, and thus both install and upgrade from HACS.
Add the following to the Custom Repository under Settings in HACS:
briis/smartweatherudp and choose Ăntegration as Category
Very nice work! Any plans to submit this as an official HA integration? WeatherFlow is currently doing a kickstarter for their new Tempest weather station, which uses the same hub (which should mean the UDP calls are all the same). Might see an increased user base for this
Hi Chris,
I neither have the skills nor the time to learn how to get this done as an official HA Integration. But I would be happy if someone with those skills would do it.
The other thing is that I am âbetween housesâ right now, so sold my old house and waiting for the new one to be finished in 4-6 month. In that time I donât even have access to the Weather Station, as this is with the other stuff in the Storage Facility.
But again, any volunteer that want to finalize the code for an Official Integration, just reach out. At that time the new sensors that are available in the updated API could also be added.
Hey Bjarne,
It seems like theyâre shipping the new weather station starting in March to the backersâI got in on the kickstarter. So, Iâm looking forward to playing with your component and happy to help out when it arrives. I havenât gone through the process of submitting anything to HA yet, but I feel like I understand enough to be helpful. Weâll see