← 返回
开发者工具 中文

Weather Open-Meteo

Get current weather and forecasts using Open-Meteo API (no API key required). Optimized for PowerShell environments with Chinese support.
使用 Open‑Meteo API 获取当前天气和预报(无需 API 密钥),专为 PowerShell 环境优化并支持中文。
alexfeng75
开发者工具 clawhub v1.0.0 1 版本 100000 Key: 无需
★ 0
Stars
📥 542
下载
💾 18
安装
1
版本
#chinese#latest#openmeteo#powershell#weather

概述

Weather Open-Meteo Skill

A reliable weather skill using Open-Meteo API, specifically optimized for PowerShell environments with full Chinese support.

Features

  • No API key required - Completely free to use
  • PowerShell optimized - Works well in PowerShell environments
  • Chinese support - Designed for Chinese users
  • 7-day forecast - Complete weather predictions
  • Multi-city support - Built-in Chinese major cities
  • Weather code translation - Converts WMO codes to Chinese descriptions

Quick Start

Basic Usage

# Navigate to skill directory
cd ~/.openclaw/workspace/skills/weather-openmeteo

# Get current weather (English version)
.\weather-en.ps1 -City Shanghai

# Get current weather (Chinese version)
.\weather-cn.ps1 -City Beijing

Supported Cities

  • Shanghai (上海)
  • Beijing (北京)
  • Guangzhou (广州)
  • Shenzhen (深圳)
  • Chengdu (成都)
  • Hangzhou (杭州)
  • Nanjing (南京)
  • Wuhan (武汉)
  • Xian (西安)
  • Chongqing (重庆)

Script Files

weather-en.ps1 (English Version)

  • Displays weather information in English
  • Complete weather code descriptions
  • Suitable for international users

weather-cn.ps1 (Chinese Version)

  • Displays weather information using Pinyin
  • Avoids Chinese character encoding issues
  • Suitable for Chinese users

weather-simple.ps1 (Simplified Version)

  • Basic functionality
  • Good for learning and modification

API Reference

Current Weather API

https://api.open-meteo.com/v1/forecast?
  latitude=31.2304&
  longitude=121.4737&
  current_weather=true&
  timezone=Asia/Shanghai

7-Day Forecast API

https://api.open-meteo.com/v1/forecast?
  latitude=31.2304&
  longitude=121.4737&
  daily=weathercode,temperature_2m_max,temperature_2m_min,precipitation_sum&
  timezone=Asia/Shanghai

Weather Code Reference

CodeEnglishChinese
------------------------
0Clear sky晴天
1Mainly clear主要晴朗
2Partly cloudy部分多云
3Overcast多云
45Fog
48Depositing rime fog雾凇
51-55Drizzle
61-65Rain
71-77Snow
80-86Rain showers
95-99Thunderstorm雷暴

Example Output

Current Weather

=== Current Weather - Shanghai ===
Time: 2026-03-03T17:45
Temperature: 8.7C
Wind speed: 12.0 km/h
Wind direction: 16 degrees
Weather: Overcast

Troubleshooting

1. Script Execution Error

# Set execution policy
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser

2. Network Connection Issues

  • Ensure you can access open-meteo.com
  • Check firewall settings

3. City Not Supported

Edit the $cityCoords hash table to add new cities:

"CityName" = @{ latitude = 纬度; longitude = 经度; timezone = "Asia/Shanghai" }

Files Included

  • SKILL.md - Skill description
  • README.md - Usage instructions
  • USAGE.md - Detailed usage guide
  • CREATION.md - Creation process documentation
  • weather.ps1 - Complete script (Chinese)
  • weather-en.ps1 - English version
  • weather-cn.ps1 - Chinese version (Pinyin)
  • weather-simple.ps1 - Simplified version
  • example.ps1 - Usage examples

Advantages

vs Original Weather Skill

FeatureOriginalNew Skill
------------------------------
API KeyNot neededNot needed
PowerShell SupportProblematicOptimized
Chinese DisplayLimitedFull support
City DatabaseNoneBuilt-in Chinese cities
Error HandlingBasicComprehensive

vs Other Weather Services

ServiceAPI KeyPowerShellChinese
---------------------------------------
Open-Meteo
wttr.inLimited
WeatherAPI

License

MIT License - Free to use and modify

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-03-30 12:38 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

productivity

携程酒店搜索

alexfeng75
自动搜索携程酒店,支持实时比价和详情获取。使用浏览器自动化技术,实现携程账号登录、酒店搜索、详情获取和对比分析功能。
★ 1 📥 976
developer-tools

Gog

steipete
Google Workspace 命令行工具,支持 Gmail、日历、云端硬盘、通讯录、表格和文档。
★ 921 📥 185,749
developer-tools

Github

steipete
使用 `gh` CLI 与 GitHub 交互,通过 `gh issue`、`gh pr`、`gh run` 和 `gh api` 管理议题、PR、CI 运行及高级查询。
★ 668 📥 323,878