This SmartThings Edge driver creates a SmartThings device that provides weather data from select weather data sources:
- US Government
- OpenWeather (V2 and V3)
- WeatherUnderground
- WeatherFLow Tempest
- FMI
This driver requires no SmartApp, however it does require either my Edge Bridge Server or a standard Proxy server1 running on a computer on your network. This provides the linkage for the Edge driver to reach internet endpoints which otherwise are not available to Edge drivers.
The Edge Bridge Server is a simple program you can download and run on any Windows, Linux, or Mac computer. It requires no complicated setup. Just run it on an always-on computer with internet access and that's it. An additional benefit to having this running on your network is that it enables expanded options for Edge drivers (like this one!), as well as easy integration with local apps and devices. See the Github readme for more details.
Currently, the edgeWeather driver provides 5 options for weather data, however it has been designed to be able to easily add more sources. Please request them in the SmartThings community or in the Issues tab here in Github. Provide working URLs for current data and forecast that I can use to test; email them to me if they contain personal account data.
-
SmartThings hub that supports Edge
-
SmartThings ID
-
Weather source account, if applicable
-
An always-on computer on your local network with internet access
-
Edge Bridge Server or standard Proxy server1
Download and run the Edge Bridge Server that meets your needs:
-
Open a command prompt window, navigate to the folder you downloaded the file to, and type 'edgebridge' and press enter.
-
Linux or Mac (Python 3.x required)
Open a terminal window, navigate to the directory you downloaded the file to, and type 'python3 edgebridge.py' and press enter.
-
Open a terminal window, navigate to the directory you downloaded the file to, and type 'chmod +x edgebridge4pi' and press enter (this makes the downloaded file executable). Then to run it, type './edgebridge4pi' and press enter.
Alternatively, install a standard Proxy server such as Privoxy.
-
- Select weather data source
- Separate weather data URLs for current weather conditions and forecast
- Automatically refresh on a given interval
- Choice of displayed units for temperature, pressure, precip rate, windspeed and direction
Availability of each depends on weather data source.
All data elements are available to automation routines, with the exception of Summary.
- Temperature
- Humidity
- Low, High Temp
- Dew Point
- Precipitation Rate
- Probability of Precipitation
- Atmospheric Pressure (Barometer)
- Cloud cover (percentage)
- Illuminance
- UV Index
- Wind speed
- Wind Direction (degrees and abbreviations)
- Wind gust
- Precipitation
- Summary
- Temperature
- Humidity
- Low, High Temp
- Precipitation Rate
- Probability of Precipitation
- Cloud cover
- Wind speed
- Wind gust
- Precipitation
- Summary
The driver is currently available on my test channel. Enroll your hub and select Edge Weather V1 from the list of drivers available to install. When the driver is available on your hub, initiate an Add device / Scan for nearby devices from the SmartThings mobile app. A new device will be created and found in your No room assigned or hub device room. Open the device to the device Settings screen (three vertical dot menu in upper right of Controls screen).
Choose OpenWeather, US Gov, WeatherFlow Tempest, FMI, or WeatherUnderground
The complete URL to retrieve the current weather conditions.
- Must be in the form: http(s)://<...>
- Must include any required account tokens or parameters
- https://api.openweathermap.org/data/2.5/weather?lat=nn.nnnn&lon=-nn.nnn&appid=xxxxxxxxxxxxxxxxxxxx
- https://opendata.fmi.fi/wfs?service=WFS&version=2.0.0&request=getFeature&storedquery_id=fmi::observations::weather::timevaluepair&place=helsinki
- http://api.weather.gov/stations/KBAZ/observations/latest
- https://api.weather.com/v2/pws/observations/current?stationId=XXXXXXX&format=json&units=e&apiKey=xxxxxxxxxxxxxxxxxxxxxxxxxx
- https://api.openweathermap.org/data/3.0/onecall?lat=nn.nnnn&lon=-nnn.n&appid=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
- https://swd.weatherflow.com/swd/rest/observations/?device_id=xxxxxx&token=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
- https://api.darksky.net/forecast/<usertoken>/<latitude>,<longitude>?units=si&exclude=minutely,hourly
The complete URL to retrieve the weather forecast. If the forecast data is contained in the Current Weather URL, then this can be left to 'xxxxx'.
- If provided, must be in the form: http(s)://<...>
- Must include any required account tokens or parameters
- http://api.weather.gov/gridpoints/EWX/142,70/forecast
- https://api.openweathermap.org/data/2.5/forecast?lat=nn.nnnn&lon=-nn.nnn&appid=xxxxxxxxxxxxxxxxxxxx
- https://opendata.fmi.fi/wfs?service=WFS&version=2.0.0&request=getFeature&storedquery_id=fmi::forecast::harmonie::surface::point::timevaluepair&place=helsinki
- https://api.weather.com/v3/wx/forecast/daily/5day?postalKey=nnnnn:US&format=json&units=e&language=en-US&apiKey=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
- https://swd.weatherflow.com/swd/rest/better_forecast/?station_id=xxxxx&device_id=xxxxxx&token=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
LAN address of either a standard Proxy server or the Edge Bridge Server1.
- Must be in the form: http://<IP address>:<port number>
- HTTPS is not currently supported
Choose either 'Standard Proxy Server'1 or 'Edge Bridge Server'
Use this setting to enable or disable automatic refresh feature
Provide the number of minutes between refreshes (5-1,440)
Set this value to the temperature units that is received from the weather data source (Celsius or Fahrenheit)
Set this value to the temperature units that you use in your location (Celsius or Fahrenheit)
Set this value to the barometric units that is received from the weather data source (Pascals, Kilopascal, inches of mercury, millibars)
Set this value to the barometric units that you use in your location (Pascals, Kilopascal, inches of mercury, millibars)
Set this value to the wind speed units that is received from the weather data source (m/hr, in/hr, mm/hr)
Set this value to the wind speed units that you want to use for your location (m/hr, in/hr, mm/hr)
Set this value to the wind speed units that is received from the weather data source (m/sec, knots, km/hr, mph)
Set this value to the wind speed units that you want to use for your location (m/sec, knots, km/hr, mph)
Set this value to control the display of wind directions between 8 directions (N, NE, E, etc.) and 16 directions (N, NNE, NE, ENE, E, etc.)
Values can be refreshed at any time by using the 'swipe-down' gesture.
After making any Settings changes, be sure to do a swipe-down gesture on the Controls screen to refresh the values.
Any fields that are blank or have 0 value may be due to no data available for that element from the weather source.
If forecast data is only available as hourly, then forecast data shown is typically for around noon-2pm the next day.
Use the Periodic Refresh option in device Settings to automatically update.
This field can have the following values:
- If Preciptation Rate data is available...
Precip Rate
(mm/hr) Value
------------- ----------
0 None
> 0, < 2 Light
>=2, <= 10 Moderate
>10, < 50 Heavy
>=50 Violent
- If Probability of Preciptation > 30% -or- Summary field contains terms like rain, shower, drizzle, thunderstorm, snow, or mix, value will be 'Possible precipitation'
- If none of the above, the value will be 'None'
All data elements except Summary are available to include in an IF portion of an automation routine.
There are no THEN actions you can perform on the weather device.