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:
REST API
Websocket API
UDP Broadcast
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! ~
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:
Set up your account at Weatherflow.
Set up your Hub and Air, get it all working in the app.
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!
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.
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):
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:
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.
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
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:
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?
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.
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??
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?
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
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.