Skip to content
Bruce Pennypacker edited this page Jan 13, 2021 · 11 revisions

Overview

This WeatherFlow plugin provides access to weather data provided by WeatherFlow Smart Weather Stations from within Indigo. WeatherFlow collects raw weather data from thousands of home weather stations, as you can see from this map and runs the data through Continuous Learning (CL) algorithms which may apply corrections to the raw data based on results received from neighboring weather stations as well as other sources of raw data. The results from the CL algorithms are then made available through an API. More information on WeatherFlow's CL algorithms can be found on their community forum, such as this post that describes the CL algorithms for air pressure calibration. WeatherFlow also has documentation on the formulas for their derived metrics.

This plugin provides access to both the curated data based on WeatherFlow's CL algorithms as well as the raw data originating directly from any WeatherFlow Smart Home weather stations that are on your network. The plugin uses WeatherFlow's public API to receive curated data via their Websocket API and local raw data via their UDP API. The plugin specifically listens for data involving observations from SKY and AIR devices, including precipitation, lightning strikes, and wind events, and reports them to Indigo. This plugin defines different Indigo devices for accessing the WeatherFlow data via Websockets (for CL curated data) and UDP (for raw Smart Weather data).

Smart Weather Station users have the option of setting the data for each of their stations as either public or private. If you want to receive curated data from WeatherFlow (via their Websocket API) you need to set your station to be public. This plugin does not currently support receiving events from private stations.

All data returned by the WeatherFlow API is based on SI derived Units units, which means that all state values default to metric. The Plugin configuration dialog allows you to specify different units for many of the reported states if you would like to use other units for temperatures, speeds, etc. See Unit Conversion for more details.

Each Indigo device defined by this plugin includes states that can be particularly helpful when integrating them with Indigo. Each device contains a "Raw Data" state that contains the raw JSON of the most recent data received from WeatherFlow for that device. This raw JSON can be used by other Indigo plugins, python scripts, etc. to further extend how you make use of the WeatherFlow data. The "Raw Data" states are also the last state to be updated whenever a message is received by WeatherFlow. This means, for example, when a SKY event is received, which contains in excess of 16 distinct pieces of data, that all the states for those pieces of data, are updated before the "Raw Data" state is updated. So if you want to simplify your use of this plugin in Indigo you can just create a trigger for when the "Raw Data" changes and be confident that all the other data associated with that observation has already been updated in the plugin.

Getting Started

Before you start using this plugin you need to decide which type(s) of WeatherFlow data you are interested in (you can use both if you wish):

Using WeatherFlow via Websockets:

  • Gives you access to curated data based on their CL algorithms and additional data based on their derived metrics.
  • Requires you to know the Station ID WeatherFlow has assigned to your Smart Home Weather Station.
  • Requires your Smart Home Weather Station to be configured for public access.
  • Sends most weather observations approximately once a minute, with wind, precipitation, and lighting events as warranted.
  • WeatherFlow does not currently assign versions to their websocket API. Websocket support in this plugin is based on the API as it was defined in December, 2019.

Using WeatherFlow via UDP:

  • Provides access to the raw data from your Smart Home Weather Station.
  • Does not include curated data based on their CL algorithms or additional data based on their derived metrics.
  • Requires that your Smart Home Weather Station hub is on the same physical network as your Indigo server in order for it to receive UDP broadcasts from the hub.
  • Sends weather observations more often than via Websockets.
  • UDP support in this plugin is based on version 114 of their UDP API.

Using WeatherFlow via Websockets

Before installing the plugin you will need two things from the Tempest website. Create an account if you don't already have one then log into the account. The two things you need are:

  1. A Personal Use Token. Click on the Settings option in the top menu, then scroll to the bottom and click on Data Authorizations. Create a new token and name it something like "Indigo". You will be prompted for this in the plugin settings when you install the plugin in Indigo.

  2. Your Station ID. Visit the WeatherFlow map and locate your device on it. When you click on the icon for your device a window should appear with the name of your station at the top and the current weather conditions. Click on the name of your station and a new window should open that provides another view of the weather. The URL should look something like this:

    https://tempestwx.com/station/9813/grid

Your Station ID is the number in the URL, in this case 9813. You will be prompted for this in the plugin settings when you install the plugin in Indigo.

NOTE: Previous versions of the plug-in did not require a Personal Use Token because WeatherFlow had not implemented them at the time. Previously the plug-in relied on a shared development token that all WeatherFlow developers used. The plug-in will still attempt to use this developer token if you do not generate and use your own token, and will display a warning message in the Indigo log encouraging you to create your own token. The development token will eventually be deprecated and removed in a future version of the plug-in, at which time a custon Personal Use Token will be required.

Using WeatherFlow via UDP

First make sure that your Indigo server is receiving the broadcast events. To do this, either open up a terminal window on your Indigo server or SSH into it, and run the following command:

  nc -ulkw 1 50222

It may take a few seconds, but you should soon start to see text appear on the screen that looks something like this:

{"serial_number":"SK-00012345","type":"rapid_wind","hub_sn":"HB-00001234","ob":[1576703093,1.30,133]}{"serial_number":"SK-00012345","type":"rapid_wind","hub_sn":"HB-00001234","ob":[1576703096,0.85,129]}{"serial_number":"SK-00012345","type":"obs_sky","hub_sn":"HB-00001234","obs":1576703097,295,0.01,0.000000,0.00,0.44,1.48,149,3.07,1,2,null,0,3,"firmware_revision":43}{"serial_number":"SK-00012345","type":"rapid_wind","hub_sn":"HB-00001234","ob":[1576703099,0.45,140]}{"serial_number":"HB-00001234","type":"hub_status","firmware_revision":"114","uptime":425181,"rssi":-66,"timestamp":1576703101,"reset_flags":"BOR,PIN,POR","seq":36594,"fs":[1,0,15675411,524288],"radio_stats":[5,1,9,3],"mqtt_stats":[194,1]}

These are the raw messages being broadcast by your Smart Weather hub over your network. If you see these messages then there is nothing more you need to do. If you do not see these then you will need to do some troubleshooting that is beyond the scope of this documentation. In general be sure that both your hub and Indigo server are on the same network and subnet and make sure you have no firewall settings on your Indigo server that may be preventing it from receiving UDP broadcasts.

Hit ctrl+C to exit out of the above program once you have confirmed you are receiving these messages.

Configuring the plugin in Indigo

Double-click on the plugin to install it in Indigo just as you would any other plugin. The Plugin configuration dialog should appear. Simply click the appropriate checkbox(es) to enable Websockets and/or UDP. If you check the Websocket option then you will need to also enter the Station ID that you obtained above.

Whether or not you enable the Websocket or UDP options you will still be able to create both Websocket and UDP devices within Indigo. Those devices simply will not receive any notifications of any sort until you enable the options in the Plugin configuration dialog.

The Plugin configuration dialog also allows you to customize a date/time format string that is used by all the devices to provide you with formatted date/time values so you do not have to perform these conversions yourself. The formatting string uses standard Python formatting as defined here. The default formatting value of "%c" represents your locale's default date/time format (e.g. "Tue Dec 24 07:06:05 2019").

Use the Debug option sparingly as it will log all events received by the plugin as well as other low level information. Unless you are actively troubleshooting an issue it is best to leave this option disabled.

Devices

The following pages provide an overview of the Indigo states that are provided by each device in the plugin. For more specific information on each state please visit the WeatherFlow community forum and also look over WeatherFlow's public API documentation:

Clone this wiki locally