slackbot-tempestweather

A Slack bot to interact with a Tempest weather station, bringing local weather data into your favorite Slack channels.


Project maintained by zaskem Hosted on GitHub Pages — Theme by mattgraham

Tempest WeatherBot Help

The Tempest WeatherBot responds to a number of arguments. When provided no argument (e.g. /weather)` the bot will respond with current conditions.

Example commands (e.g. /weather [argument])

Command Description
/weather <blank> Display current conditions
/weather now Display current conditions
/weather private Display current conditions privately
/weather alerts Display current weather alerts
/weather Tuesday Display the forecast for Tuesday
/weather 8 hour Display the forecast +8 hours from now
/weather 85 hours Display the forecast 85 hours from now
/weather 3 days Display the forecast three days from now
/weather next 5 days Display the five-day forecast
/weather today Display forecast or summary for today
/weather yesterday Display summary for yesterday
/weather last month Display summary for last month

Bot Keywords

The Tempest WeatherBot also responds to unique keywords:

The private keyword can be appended to the end of any command to privately respond to the calling user. This keyword must be the last argument in all commands.

Detailed help topics are also supported.

Command Description
/weather 6 hours private Display the forecast 6 hours from now with a private response
/weather help Display general help information
/weather help conditions Help regarding current conditions
/weather help forecast Help regarding station forecasts
/weather help history Help regarding history summaries

Current Conditions

The Tempest WeatherBot’s default behavior is to display the current/most recent conditions:

Command Description
/weather <blank> Display current conditions
/weather now Display current conditions
/weather private Display current conditions privately
/weather alerts Display current weather alerts
/weather alerts [force,refresh] Display current weather alerts and override any cached alert data

Forecast Commands and Range

The Tempest WeatherBot can respond to forecast inquiries up to 10 days from the current time. Arguments (hours, days, and week) should fall within the specified ranges:

Command Argument Range
/weather X hour[s] X can range 0 to 240. Display the forecast for the specified hour
/weather X day[s] X can range 0 to 10. Display the hour-specific forecast +X day[s]
/weather X week X can only be 1

When providing a numeric request (e.g. X hours) the hour-specific forecast will be returned based on the request time. However, an X days request made at 5 p.m. will return the daily forecast for X days from now.

Relative keywords (today, tomorrow, next, and weekday names) can also be used:

Command Description
/weather today forecast Display forecast for the current day
/weather tomorrow Display forecast for tomorrow
/weather Tuesday Display forecast for Tuesday
/weather next 24 hours Display forecasts for the next 24 hours
/weather next 10 days Display forecasts for the next 10 days

When providing a numeric relative request (e.g. next X [hours/days/week]) X must fall in the ranges identified above. Relative day and week requests will return daily forecasts for the period. Relative hour forecasts will generate dynamically-appropriate intervals for the period, generally not to exceed 10 individual forecasts per request.

The relative request today without additional argument, when invoked before 4 p.m., will display the day’s forecast; after 4 p.m. will display the day’s history.


History Commands and Range

The Tempest WeatherBot can respond with daily station history summaries on or after the $bot_historyStarts date.

Specify a specific date or date range. dateString should be in YYYY-MM-DD or DD-MM-YYYY format:

Command Argument Range
/weather X hour[s]/day[s]/week[s]/month[s] X is a negative number within range. Display summary for the matching date
/weather dateString Display summary for the matching date
/weather dateString to dateString Display summary for the submitted period

Relative keywords (today, yesterday, last, and this) can also be used:

Command Description
/weather today history Display summary for the current day
/weather yesterday Display daily summary for yesterday
/weather last 4 hour[s] Display summary for the previous 4 hour period
/weather last 2 day[s] Display summary for the previous 2 day period
/weather last week/month/year Display summary for the requested period
/weather this week/month/year Display summary for the requested period (through the current day).

The relative request today without additional argument, when invoked before 4 p.m., will display the day’s forecast; after 4 p.m. will display the day’s history.

Note: weeks are relative to Mondays.


Example Responses in Slack

Current Conditions

/weather <blank> or /weather now:

Example current conditions response

example response for current conditions with alert


Active NWS Weather Alert

/weather alerts:

Example alert detail response


Weather Forecasts

/weather Thursday:

Example "Thursday" forecast

/weather 110 hours:

Example +110-hour forecast

/weather 2 days:

Example +2 day forecast

/weather next 3 days:

Example three-day forecast

/weather tomorrow private:

Example "tomorrow" forecast with a private response


Weather Summaries (history)

/weather yesterday:

Example daily summary

/weather last month:

Example month summary

/weather 2020-11-15:

Example day summary for November 15, 2020

/weather 2020-10-10 to 2020-10-11:

Example two consecutive day summary for October 10-11, 2020


Bot Home Tab

The bot has an available home tab which, if optionally enabled, provides for a condensed single-page view of current conditions and alerts, four-hour forecast, and five-day forecast.

Example bot home tab view