Saltar al contenido principal

Integración domótica National Weather Service, gratuita y de código abierto

Integración National Weather Service para Gladys Assistant

Official US forecasts and alerts from the National Weather Service.

info

La documentación de esta integración la escribe su autor y, por ahora, solo está disponible en inglés.

This integration brings the forecasts and official alerts of the National Weather Service (NWS), the weather service of the United States, to Gladys. It feeds the dashboard weather widget, the assistant and the alert-driven scenes, and adds three widgets.

Community integration, not affiliated with or endorsed by the National Weather Service or NOAA.

Ready to use​

No configuration is needed: the NWS API is free and keyless. Install the integration and it works right away.

The NWS covers the United States and its territories only (Alaska, Hawaii, Puerto Rico, Guam…). For a house elsewhere, Gladys automatically uses another weather provider.

Set the location of each house in its settings: the alert watch, the scene actions and the widgets need it.

What the integration provides​

  • Current conditions measured at the nearest weather station (temperature, feels-like, humidity, dew point, pressure, wind, gusts, visibility). When no station reported recently, the forecast of the running hour is used.
  • Hourly forecast for 24 hours: temperature, feels-like, humidity, cloud cover, wind and gusts, rain amount and chance.
  • Daily forecast for 6 to 7 days: high of the day, low of the following night, sky, chance of rain, amount, wind and gusts.
  • Sunrise and sunset, computed locally.
  • Official alerts (watches, warnings, advisories) with their full text and instructions.

The NWS publishes no UV index.

Alert levels​

LevelMeaning
Warningthe hazard is happening or imminent: take action now
Watchconditions are favorable for it: be prepared
Advisorya less serious hazard that may cause inconvenience
Statementinformation or follow-up

Alert-driven scenes​

Gladys already offers the generic "Weather alert raised" and "Weather alert ended" triggers. Gladys checks the alerts every 30 minutes; this integration additionally watches them every minute and tells Gladys as soon as one changes, so your scene fires within seconds.

The integration adds its own, finer triggers under National Weather Service in the scene editor:

TriggerFires when…Filters
NWS alert issueda new watch, warning or advisory covers the househouse, kind of alert, level, severity
NWS alert endedan alert expired or was cancelledhouse, kind of alert, level

Kinds: tornado, hurricane / tropical storm, severe thunderstorm, flood, winter storm, cold, heat, wind, fire weather, fog, air quality, marine, other.

For instance, to be told about a tornado: trigger NWS alert issued, kind Tornado, level Warning, then a send-message action with the Summary and Instructions variables.

Good to know:

  • The House field must hold the house name exactly as shown in Gladys, case included. Empty = every house.
  • The NWS never edits an alert: it issues a new one replacing the previous. The integration follows these updates: an extended or amended alert does not fire your scene again.
  • An alert that changes level (a Hurricane Watch replaced by a Hurricane Warning, for example) counts as a new alert: NWS alert ended for the old one, NWS alert issued for the new one.
  • Alerts already in force when the integration starts fire nothing: only new ones do.
  • An alert ends as soon as its end time has passed, or once it is missing from two checks in a row and for at least 5 minutes. If it comes back afterwards, it fires NWS alert issued again: every end is followed by a new start, never by a second end.

Scene actions​

ActionReturns
Get the NWS alertsnumber of alerts, warnings, watches and advisories, list of events, the most serious one (kind, level, instructions, end), a summary
Get the NWS forecast of a daytoday to 6 days ahead: high, low, sky, chance of rain, wind, the forecaster's text (day and night), a summary
Get the current NWS conditionstemperature, feels-like, humidity, dew point, pressure, wind, gusts, visibility, sky, station, a summary

Every action has a Summary output, a sentence ready to send in a message.

Dashboard widgets​

WidgetContent
NWS alertswarnings / watches / advisories counters, then each alert; tap one for its full text and instructions. Refreshed as soon as an alert changes.
NWS text forecastthe forecaster's narrative, period by period (Tonight, Saturday, Saturday Night…), with the NWS icons
NWS next hours12, 24 or 48 hours as a curve: temperature and feels-like, chance of rain, or wind and gusts

Each widget has a House setting (empty = first located house), written exactly as in Gladys.

Configuration (optional)​

SettingDefaultRole
Contact email—the NWS asks every application to identify itself; your email lets it reach you before blocking traffic it finds abusive
Cache duration (s)600how long a forecast is reused (the NWS refreshes them about once an hour)
Alert check interval (s)60how often the alerts of your houses are checked, 30 to 900 seconds

Parámetros de configuración​

Estos son los parámetros que National Weather Service te pide en su pantalla de configuración en Gladys.

ParámetroTipoObligatorioDescripción
Ready to usesectionNoForecasts and alerts work with no configuration: the National Weather Service API is free and needs no key. It covers the United States and its territories only — a house elsewhere gets its weather from another provider.
Contact email (optional)stringNoAdded to the identification the NWS requires from every application, so it can reach you before blocking traffic it finds abusive. Never shared with anyone else.
Cache duration (s)numberNoIn seconds, between 0 and 3600. How long a forecast is reused before calling the NWS again. The NWS refreshes its forecasts about once an hour: the default of 600 (10 min) costs no freshness. Set to 0 to always call the API. Alerts are not affected: they are checked on their own schedule.
Alert check interval (s)numberNoIn seconds, between 30 and 900. How often the official alerts of your houses are checked, for the scene triggers and the alerts widget. A Tornado Warning lasts about 30 minutes: the default of 60 s fires your scenes within a minute of its issuance.

Cómo instalar National Weather Service en Gladys​

  1. En Gladys, abre Integraciones: National Weather Service aparece en el catálogo junto a las integraciones nativas, con una insignia de comunidad.
  2. Haz clic en Instalar. Gladys descarga la imagen Docker (ghcr.io/william-de71/gladys-national-weather-service:1.0.0), la ejecuta en un entorno aislado del núcleo y genera la interfaz de la integración (dispositivos, descubrimiento y configuración).
  3. Abre la pantalla de Configuración de la integración, rellena los parámetros y guarda.
  4. También puedes instalarla directamente desde la URL de su repositorio: https://github.com/William-De71/gladys-national-weather-service.

National Weather Service requiere Gladys >=5.1.1. El catálogo de Gladys se actualiza cada hora, así que una nueva versión está disponible como máximo una hora después de publicarse.

¿Todavía no usas Gladys? Es gratuito y de código abierto: sigue la guía de instalación para empezar.

Sobre las integraciones externas​

National Weather Service es una integración externa: una integración comunitaria empaquetada como contenedor Docker y publicada en GitHub. Gladys la instala con un clic y la ejecuta en un entorno aislado del núcleo. La publica y mantiene William-De71, no el equipo principal de Gladys.

Suscríbete a la newsletter de Gladys Assistant

Unos pocos correos al mes sobre nuevas versiones y novedades del proyecto. Enviados por Pierre-Gilles Leymarie, fundador del proyecto. Puedes darte de baja cuando quieras 🙂