WeatherFlow API driver to poll the WeatherFlow API.
WeatherSensorChild driver is required for child devices to work (NOTE: Same driver is used for AmbientEcowittWeather).
Now for the details:
This driver polls the WeatherFlow API for information that your weather station or another has provided. There are two pieces of required information for the driver to work. A WeatherFlow API Key and a Station ID #. Once you enter those the driver can be refreshed manually or set to a regular polling interval.
NOTE: The WeatherFlow API is not yet "open"as of May 6th, 2020. A development API Key can be obtained and used, but they are not yet providing general API Keys.
It will poll for the general station information first. If enabled, it will generate child devices for each sensor tied to the station. If you do not want child devices enabled, you do not need to, all data is represented in the main device to begin with.
- Add the driver(s) to your Drivers Code. They can be copy/pasted in or Imported using the links above (which will always be the latest version). Then Save the driver.
- "Add Virtual Device" from your device list.
- Give it a Device Name then select WeatherFlow from the bottom of the Type dropdown (where user drivers show up).
- Select "Save Device".
- Enter the API Key you have obtained from WeatherFlow into the "API Key for WeatherFlow" field.
- Enter the Station ID you want to be using into the "Station ID to be checked".
- Make any other preferences changes you may desire.
- Select "Save Preferences".
At this point your device is now ready. Unless you set it otherwise it will start polling the API regularly every 5 minutes (the default).
Other Preferences and what they mean:
- Data Refresh Rate = Frequency the driver will poll the WeatherFlow API for information regarding the Station ID. The default value is 5 minutes but it can be set for 1, 5, 15, 30, or Manual refreshes.
- Measurement Standard = Determines whether the driver will attempt to populate all units in Metric or Imperial standard. Default value is Metric (most stations report Metric by default, even in typically Imperial areas such as the United States).
- Wind Direction Method = While degrees are useful most people think of wind coming from the points on a compass. This allows you to select which method will be represented in the WindDirectionString data. It allows a variety of choices from repeating the degree value (ex: 330°) to full words for all 16 points (ex: North-North-West).
- Enable Child Devices = This will enable child devices, creating additional virtual devices using the WeatherSensorChild driver. There will be one created for each device tied to the station in the WeatherFlow data. Children are automatically created when this is enabled and a new device is detected in the data. Children will be deleted if this feature is disabled. The main benefit to this feature is that the children will contain their specific data. For example: an outdoor sensor can provide "temperature" and "humidity" attributes for use in the Dashboard or Rules that the API might otherwise note as "temp1" and "humidity1" or some other representation that would require using custom attributes and make things more complicated. Children are named based on the device ID provided in the data received.
- Enable Logging = This sets what level of logging is provided to the Hubitat log from the driver. It defaults to Info, which only provides very basic logging for events. There are also options for None (only Errors would be provided) and Debug (which provides a fairly large amount of log entries and is only recommended when debugging a problem).
- Show All Preferences = This sets whether the other Preferences are displayed on the device page. As there are a number of preferences and most will be set once and never changed, this allows a bit of screen area to be recovered by hiding the preferences, if desired. Hiding preferences has no impact on their values.
Hope everyone finds this driver useful. Please let me know any feedback you might have in this topic, whether problems, feature requests, or even if you just want to say "hi".