WeatherFlow Smart Weather Stations - Sky and Air

WeatherFlow is working on some amazing products that will be released soon.
Here is the link to their Indigo campaign: https://www.indiegogo.com/projects/weatherflow-smart-weather-stations/x/16350374#/

They also already released the APIs to the systems: https://weatherflow.github.io/SmartWeather/api/

Will be interesting to see if anybody wants to start working on integrating them into HA.

1 Like

I’m sure someone will eventually get to this once they release their product.

One of the early backers here and also excited about the shipping closing in. The ‘smart home weather stations’ from ‘WeatherFlow’ will not only be limited to ‘Sky’ and ‘Air’ (both outdoor) connected to an accompanying hub but will also be complemented by others later, such as ‘Breathe’ (indoor).
More info at: http://weatherflow.com/smart-home-weather-stations/

As @B1tMaster indicates with his referral link, the last update revealed the APIs implemented:

  1. REST API
  2. Websocket API
  3. UDP Broadcast
  4. BLE

Here’s the excerpt from yesterday’s Indiegogo update.

We have both a REST API and Websocket API to access your data from our secure servers. For those that desire local access (directly from your station, no internet required) we also provide a secure UDP multicast service and a Bluetooth Low Energy spec (soon to be released) to access data directly from the HUB

Looking forward to the products’ release and their HA integration! ~

1 Like

Just got this in email as an update:

Hello WeatherFlow backers.
Delivery update – Our amazing field testers continue to provide outstanding feedback on the AIR & hub, resulting in countless tweaks & improvements. Following some mechanical design improvements, another new batch of SKY production samples are being manufactured overseas this week and should be in our offices by Monday. Assuming they pass our rigorous QA, field testers will receive SKY units later this month and we are still on track to start shipping to other backers in late August.

SKY: rain testing and calibration in New Smyrna Beach, Florida.

Developer tools – It’s your data - use it. Unlike other weather stations, WeatherFlow offers a range of APIs to access and use your data. We have both a REST API and Websocket API to access your data from our secure servers. For those that desire local access (directly from your station, no internet required) we also provide a secure UDP multicast service and a Bluetooth Low Energy spec (soon to be released) to access data directly from the HUB. Details here: https://weatherflow.github.io/SmartWeather/api/
This open approach to data sharing makes it infinitely possible for anyone, from the weekend hobbyist to big players like Amazon & Google, to create cool applications for your weather data (with your permission, of course). Here’s a beautiful example from Weather34.

Sonic anemometer - Curious about the update interval for wind? SKY samples the wind every second, then sends a 3 second average to the hub. The hub makes every 3 second average (speeds and direction) immediately available remotely (via web socket) and locally (via UDP multicast and BLE) so you can watch the wind change in real-time no matter where you are. These 3 second wind values are averaged and stored with your other parameters (temperature, pressure, etc.) in one-minute observations that become part of your station’s long term record. These World Meteorological Organization (WMO) standard sampling strategies mean you get a more accurate representation of the nuances in the wind field.

Sample live stations - Take a peek at live data from a test station; same station on Weather Underground.

Totally in sync. - Did you know… each individual station periodically syncs up with a Network Time Protocol (NTP) server to ensure all data is perfectly on time across all stations.

Thanks for your continued patience and support - we truly couldn’t do it without you! - the WeatherFlow team.

So I’ve got this working now via the REST API, all the values from Air are shown in my Home Assistant. Was pretty straightforward:

  1. Set up your account at Weatherflow.
  2. Set up your Hub and Air, get it all working in the app.
  3. Edit: Correction, Weatherflow have said you need to email them to get the key, and doing it the way I previously described below will just provide a Developer Key, so contact [email protected] to request it.

Previous explanation:
3) Go to Tempest API and click on the Authorize button, then tick “user” and the “Authorize”, Accept and it should generate the key.
4) Then if you use the “Get Station Observation” section on that page, stuff in your station id, click “Try” and it should generate some output.
5) Part of that is the CURL line, which contains Authorization: Bearer, the string after which is the OAuth2 key – I think!

  1. You also need to locate the device_id, which you can find from one of the entries on there (I forget which one I used now).

You now need to create a custom component for a modified REST sensor, so that we can store all the observation results in one “sensor” and then split it into individual sensors, rather than making loads of separate REST requests for each observation.

  1. Copy the following Ubuntu Pastebin into a file called jsonrest.py, and save it into the custom components folder, eg. ~homeassistant/.homeassistant/custom_components/sensor/jsonrest.py (and then visit [SOLVED] Parsing a json value from an existing entity in a template sensor - #12 by phileep and thank @mad_ady!)

  2. Now set up the sensors in Home Assistant (I have mind in a separate sensors/rest_weatherflow.yaml file, which is included in the main configuration.yaml, so you might need to tweak the below to match your set up):

‘’‘’

- platform: jsonrest
  resource: https://swd.weatherflow.com/swd/rest/observations/device/XXXX
  name: Weatherflow Air
  headers:
    Authorization: Bearer YYYYYYYYYYYYYYYYYYYYYYYYYYYY
    Accept: application/json

- platform: template
  sensors:
    weatherflow_pressure:
      friendly_name: 'Outdoor Pressure'
      unit_of_measurement: 'mb'
      value_template: '{{ states.sensor.weatherflow_air.attributes.obs[0][1] }}'
    weatherflow_temperature:
      friendly_name: 'Outdoor Temperature'
      unit_of_measurement: '°C'
      value_template: '{{ states.sensor.weatherflow_air.attributes.obs[0][2] }}'
    weatherflow_humidity:
      friendly_name: 'Outdoor Humidity'
      unit_of_measurement: '%rH'
      value_template: '{{ states.sensor.weatherflow_air.attributes.obs[0][3] }}'
    weatherflow_lightning_strikes:
      friendly_name: 'Lightning Strikes'
      value_template: '{{ states.sensor.weatherflow_air.attributes.obs[0][4] }}'
    weatherflow_lightning_distance:
      friendly_name: 'Average Strike Distance'
      unit_of_measurement: 'm'
      value_template: '{{ states.sensor.weatherflow_air.attributes.obs[0][5] }}'
    weatherflow_battery:
      friendly_name: 'Battery'
      unit_of_measurement: 'v'
      value_template: '{{ states.sensor.weatherflow_air.attributes.obs[0][6] }}'

You need to replace the XXXX with your device_id, and YYYYYYYYYYYYYYYYYYYY with the OAuth2 key from #5.

If I have remembered that all correctly, once you add them all to a group, you should end up with:
image

I’m not convinced this is the best way to do it, would be better to listen to the local UDP transmissions and keep it all local, but I wouldn’t have a clue where to start on that one!

Thanks a lot, @davefi, for the detailed description!

I chose to receive my station as a complete set when the SKY unit is ready. Hoping that somebody gets the local access going by then as I’m not much of a cloud fan. :slight_smile:

Any possibility to add this device in a next release of hass ?
That would be great as the devices are fantastic.

Apparently the jsonrest component that @mad_ady created, was broken by the latest release of HA (I’m still running an older version), so its unlikely to work right now.

I am working on a custom component that will access the hub locally and not via the REST API (so not reliant on the internet), but considering I dont have a clue about Python or Home Assistant development, I wouldn’t hold your breath!

I DO have the values read in and displayed when the sensor is first set up, but they are not updating yet. I’m doing my best though :smiley:

@davefi: I’ve pushed a fix to my github repo for that custom component. It should work with newer HA versions.

You can fetch the data with your username and password (for private stations) or just use their dev API key (authorized for individual users) if your station is public:

platform: jsonrest
resource: https://swd.weatherflow.com/swd/rest/observations/device/XXXX?api_key=20c70eae-e62f-4d3b-b3a4-8586e90f3ac8
name: Weatherflow Air
headers:
  Accept: application/json

Here is a template where I converted the units to friendlier ones:

platform: template
sensors:
  weatherflow_pressure:
    friendly_name: 'Outdoor Pressure'
    #unit_of_measurement: 'mb'
    unit_of_measurement: 'inHg'
    value_template: '{{ states.sensor.weatherflow_air.attributes.obs[0][1] * 0.02953 }}'
  weatherflow_temperature:
    friendly_name: 'Outdoor Temperature'
    #unit_of_measurement: '°C'
    unit_of_measurement: '°F'
    value_template: '{{ states.sensor.weatherflow_air.attributes.obs[0][2] * 9.0 / 5 + 32 }}'
  weatherflow_humidity:
    friendly_name: 'Outdoor Humidity'
    unit_of_measurement: '%rH'
    value_template: '{{ states.sensor.weatherflow_air.attributes.obs[0][3] }}'
  weatherflow_lightning_strikes:
    friendly_name: 'Lightning Strikes'
    value_template: '{{ states.sensor.weatherflow_air.attributes.obs[0][4] }}'
  weatherflow_lightning_distance:
    friendly_name: 'Average Strike Distance'
    #unit_of_measurement: 'm'
    unit_of_measurement: 'mi'
    value_template: '{{ states.sensor.weatherflow_air.attributes.obs[0][5] * 0.000621371 }}'
  weatherflow_battery:
    friendly_name: 'Battery'
    unit_of_measurement: 'v'
    value_template: '{{ states.sensor.weatherflow_air.attributes.obs[0][6] }}'

If they ever ship SKY and someone from the future is visiting, here’s the list of entities it will report: https://weatherflow.github.io/SmartWeather/api/swagger/#!/observations/getObservationsByDeviceId

Guys, just got my AIR. I can’t seem to OPEN the bottom of it to insert batteries. I applied all my force I have to try twist it open, but it does not give in. Any of you had this issue when it came? Any trick to untwist it open?

I assume you have it opened. But I used elastics around the top and bottom to get a good grip to open it up.

Hi guys,

Anyone successfully managed to integrate it into HA directly in the meantime?
I’m aware that it can be done via IFTTT or Weather Underground, but I would prefer it to work without internet connection as well.

I really like their hardware…and it’s a lot cheaper / seems better then Netatmo.

1 Like

Another vote for listening to the UDP broadcast and keeping it all on my local network.
Unfortunately I don’t know how to do it either. Maybe something like tcpdump??

1 Like

There’s two options right now, both from the weatherflow forums.
ArchiveSW: https://community.weatherflow.com/t/archivesw-display-data-archive-storage/790

and a simple python script that grabs the data and lets you do as you wish with it:

Good to see there is progress on listening to the local UDP stream of data, but I am still not capable of getting this into homeassistant.
Any tips or pointers on how this may be accomplished with either of the links there?

Thanks for posting

The mqtt stream would probably be the easiest way, you’d need an mqtt broker, but to get you started Home Assistant does have a built in one: https://www.home-assistant.io/docs/mqtt/broker#embedded-broker

I’m not doing this myself, I’d go with a separate broker such as mosquitto.

Hi

Im new to Home Assistant. Im trying to get this one working but I get this error in HA logs:

Can someone help me get me in the right direction :slight_smile:

Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File “/usr/local/lib/python3.6/site-packages/homeassistant/helpers/entity_platform.py”, line 352, in _async_add_entity
await entity.async_update_ha_state()
File “/usr/local/lib/python3.6/site-packages/homeassistant/helpers/entity.py”, line 310, in async_update_ha_state
self.entity_id, state, attr, self.force_update, self._context)
File “/usr/local/lib/python3.6/site-packages/homeassistant/core.py”, line 912, in async_set
context)
File “/usr/local/lib/python3.6/site-packages/homeassistant/core.py”, line 682, in init
“State max length is 255 characters.”).format(entity_id))
homeassistant.exceptions.InvalidStateError: Invalid state encountered for entity id: sensor.weatherflow_air. State max length is 255 characters.

…Something wrong with my jsonrest.py.

Got it working now.

found this project: https://github.com/briis/smartweather