Tempest Weather
Use this skill to fetch current conditions from a Tempest station/device or retrieve historical station statistics (day/month/year) from the Tempest Stats API.
Run the fetch script
Use:
CODEBLOCK0
The script reads configuration from environment variables by default, if both station and device id are set device_id is used by default:
- -
TEMPEST_API_TOKEN (required) - INLINECODE1 (optional if
TEMPEST_DEVICE_ID is set) - INLINECODE3 (optional if
TEMPEST_STATION_ID is set) - INLINECODE5 (optional:
metric or us, default us)
Useful command options
CODEBLOCK1
Output behavior
- - Emit concise JSON (always)
- Include a short human summary unless
--json is used - Include timestamp and source URL for traceability
- For
--stats, return the matched historical row from stats_day, stats_month, or INLINECODE13
If data fetch fails
- - Check token validity and station/device ID
- Retry once for transient network errors
- Return a short actionable error message
Field mapping reference
For Tempest observation index mapping and response notes, read:
License
Source
- - https://github.com/wranglerdriver/tempest-weather
暴风雨天气
使用此技能从暴风雨气象站/设备获取当前天气状况,或从暴风雨统计API检索历史气象站统计数据(日/月/年)。
运行获取脚本
使用:
bash
python3 scripts/gettempestweather.py
默认情况下,脚本从环境变量读取配置,如果同时设置了气象站ID和设备ID,则默认使用设备ID:
- - TEMPESTAPITOKEN(必需)
- TEMPESTSTATIONID(如果设置了TEMPESTDEVICEID则为可选)
- TEMPESTDEVICEID(如果设置了TEMPESTSTATIONID则为可选)
- TEMPEST_UNITS(可选:metric或us,默认为us)
有用的命令选项
bash
显式指定气象站/令牌(当前观测数据)
python3 scripts/get
tempestweather.py --station-id 12345 --token $TEMPEST
APITOKEN
显式指定设备/令牌(当前观测数据)
python3 scripts/get
tempestweather.py --device-id 67890 --token $TEMPEST
APITOKEN
当前本地日/月/年的历史统计数据(默认为现在)
python3 scripts/get
tempestweather.py --stats day
python3 scripts/get
tempestweather.py --stats month
python3 scripts/get
tempestweather.py --stats year
特定目标日期范围的历史统计数据
python3 scripts/get
tempestweather.py --stats day --date 2026-02-23
python3 scripts/get
tempestweather.py --stats month --date 2026-02
python3 scripts/get
tempestweather.py --stats year --date 2025
公制单位输出
python3 scripts/get
tempestweather.py --units metric
仅输出JSON(机器友好)
python3 scripts/get
tempestweather.py --json
输出行为
- - 始终输出简洁的JSON
- 除非使用--json参数,否则包含简短的人类可读摘要
- 包含时间戳和来源URL以便追溯
- 对于--stats参数,返回来自statsday、statsmonth或stats_year的匹配历史数据行
如果数据获取失败
- - 检查令牌有效性和气象站/设备ID
- 对于临时网络错误,重试一次
- 返回简短的可操作错误信息
字段映射参考
有关暴风雨观测索引映射和响应说明,请阅读:
- - references/tempest-api.md
许可证
来源
- - https://github.com/wranglerdriver/tempest-weather