Consulta alertas meteorológicas y predicciones oficiales de AEMET OpenData para cualquier municipio de España.
text
~/.openclaw/credentials/aemet-api-key.txt
bash
echo "TU_CLAVE_AQUI" > ~/.openclaw/credentials/aemet-api-key.txt
chmod 600 ~/.openclaw/credentials/aemet-api-key.txt
bash
sudo apt update
sudo apt install -y curl jq libxml2-utils coreutils
curl — peticiones HTTP a la API de AEMETjq — parseo de JSONxmllint — parseo XML (opcional, fallback disponible)md5sum — cacheo de respuestasbash
cd ~/.openclaw/workspace/skills/aemet
# Alertas meteorológicas por área (Madrid capital = área 72)
./aemet.sh alertas madrid
./aemet.sh alertas 72
# Predicción diaria de un municipio
./aemet.sh prediccion madrid
# Predicción horaria (24h)
./aemet.sh hourly madrid
# Buscar municipio por nombre
./aemet.sh search "Soria"
# Ayuda completa
./aemet.sh help
CiudadCódigoMadrid72Valencia94Barcelona94Sevilla91
Para otros municipios, usa ./aemet.sh search "nombre" y anota el código de 4 dígitos.
RecursoRutaAPI Key~/.openclaw/credentials/aemet-api-key.txtCache alertas~/.openclaw/cache/aemet/alertas_*Cache municipios~/.openclaw/cache/aemet/municipios_*Script principal~/.openclaw/workspace/skills/aemet/aemet.sh