MyWeather is a Dify weather plugin that requires no API key.
- Primary source is selectable:
open-meteoorwttr - Default primary source:
open-meteo - The non-primary source is normally used as fallback; native-script Japanese and Korean names are Open-Meteo-only
- Supports English, Simplified Chinese, Traditional Chinese, Japanese, and Korean input and output
- Automatic language detection via Unicode scripts and a bounded place-name hint table
- Native-script Japanese and Korean place names are transliterated before geocoding
English (input: London)
London, England, United Kingdom: Partly cloudy. Temp 12.0 °C, feels like 10.5 °C, humidity 72%, wind 11.0 km/h.
Localized Korean, Japanese, Simplified Chinese, and Traditional Chinese examples are in readme/README_zh_Hans.md.
Workflow: Start (city) → Weather Lookup → Output
- Install plugin
MyWeatherin Dify. - Add tool node
Weather Lookup. - Set
source_preference:open-meteo(default): Open-Meteo first, wttr fallback for supported scriptswttr: wttr first, Open-Meteo fallback- Native-script Japanese/Korean names and Chinese county/district names always use Open-Meteo directly
- Pass user location text to
location.
The plugin makes outbound HTTPS requests to three hosts and needs no API key, account, token, or other credential:
| Host | Purpose |
|---|---|
api.open-meteo.com |
Open-Meteo forecast endpoint |
geocoding-api.open-meteo.com |
Open-Meteo place-name lookup |
wttr.in |
Fallback weather source |
If the Dify deployment restricts outbound traffic, allow these three hosts. Only the place name the user typed is sent; see PRIVACY.md.
location(required): city, region, airport code, or place name. Supports English, Chinese, Japanese, and Korean.locationis limited to 200 characters to keep upstream requests and logs bounded.language(optional): output language.auto(default) detects from input — Hangul → Korean, hiragana/katakana → Japanese, recognized Taiwan / Hong Kong / Macau / Japan place names → their regional language, other CJK → Simplified Chinese, otherwise English. Setjaexplicitly for an ambiguous Japanese Han-only name; Open-Meteo is then queried with Japanese names and Japan-first filtering. Supported explicit values areen-US,zh-Hans,zh-Hant,ja, andko.units(optional):metricoruscs.source_preference(optional):open-meteo(default) orwttr.include_raw_json(optional): include the raw upstream provider payload in the JSON output, under therawkey.
Returned by weather_lookup:
source: actual provider used (wttroropen-meteo).source_display: UI-ready source label (Source: wttr.in.orSource: Open-Meteo.).language: resolved output language (en-US,zh-Hans,zh-Hant,ja, orko).location: the place the provider actually matched, not the raw query.condition: weather condition text (translated when CJK/Japanese output).temperature: current temperature in selected units.temperature_unit:°Cor°F.feels_like: feels-like temperature.humidity: relative humidity percentage.wind_speed: wind speed in selected units.wind_speed_unit:km/hormph.summary: concise weather sentence without inline source text (localized).open_meteo_compliance_notice: Open-Meteo attribution plus modification declaration (only when source is Open-Meteo).rate_limit_notice: fallback notice (only when Open-Meteo fails, including HTTP 429, and fallback is triggered).
The default text message appends source_display and, when applicable,
open_meteo_compliance_notice, so workflows that only consume the text message
still show the actual provider and required attribution.
| Language | Detection | Weather Translation | Geocoding |
|---|---|---|---|
| English (en-US) | Default | Passthrough | Standard |
| Simplified Chinese (zh-Hans) | CJK characters | Full (146 terms) | Native names |
| Traditional Chinese (zh-Hant) | Recognized TW / HK / MO names | Full (zh-Hans + override) | Latin aliases |
| Japanese (ja) | Hiragana/Katakana or recognized Japanese Han names | Full (146 terms) | Hepburn + suffix variants |
| Korean (ko) | Hangul | Full (146 terms) | Revised Romanization |
Auto-detection rules:
- Hangul Syllables (U+AC00–U+D7AF) →
ko - Hiragana (U+3040–U+309F) or Katakana (U+30A0–U+30FF) →
ja - CJK characters →
zh-Hans, unless the text names a recognized Taiwan / Hong Kong / Macau / Japan place - Otherwise →
en-US
Han-only place names can be identical across languages. Automatic detection uses a
bounded alias table for common regions and cities; set language explicitly when
the same Han name is ambiguous in context.
The providers have different indexing and localization behavior. wttr.in mostly resolves Latin and Chinese queries and can return a nearby feature for native-script Japanese or Korean names. Open-Meteo accepts English, Chinese, Japanese, and Korean results, but its coverage and preferred spelling vary. The plugin therefore sends language-matched native names, Latin transliterations, and a small set of bounded regional variants:
| Input script | Query candidates | How |
|---|---|---|
| Hangul input | Romanized and native forms | Revised Romanization; the administrative suffix is dropped |
| Kana | tokyo, sapporo, plus the native name |
Hepburn |
| Japanese kanji | Native name, bare city name, and bounded city/prefecture variants | Explicit language=ja requests Japanese names with Japan-first filtering |
| Chinese | Native name | Use the native name, with bounded regional aliases when needed |
| Taiwan / Hong Kong / Macau | Taipei, Hong Kong, plus native aliases |
The Latin alias is preferred when regional context is recognized |
Worked examples:
seoul -> seoul
busan -> busan
suwon -> suwon
tokyo -> tokyo
sapporo -> sapporo
yokohama -> Yokohama-shi, Yokohama-to
imabarishi -> Imabari, Imabarishi
beijing -> native pass-through
taipei -> Taipei
Both romanizers are deterministic — Unicode syllable decomposition for Hangul, a fixed table for kana — so no phonetic dictionary ships with the plugin. The project does keep bounded maintenance data for regional place-name detection, query-noise removal, Japanese administrative variants, and Taiwan/Hong Kong/Macau aliases. Adding broad place-name coverage should use upstream geocoding rather than expanding these tables without limit.
wttr.in cannot resolve native-script Japanese or Korean names at all: it answers the
Hangul name of Seoul with a village called Ryongsan, and the kana name of Tokyo with a
district called Takehiracho. Those inputs are therefore always resolved through
Open-Meteo, whatever source_preference says, and the reported location always
names the place the provider actually matched.
Open-Meteo:
- Resolves Chinese place names natively, and Japanese and Korean names once transliterated.
- Its localized index is not complete, so the plugin also tries the native-script name.
- When geocoding finds no match the plugin falls back to wttr.in and sets
rate_limit_notice, except for native-script Japanese and Korean names. - Weather condition text is translated in plugin logic.
- Forecast response is numeric and weather-code based.
wttr.in:
- Resolves Latin-script and Chinese place names, but maps Japanese and Korean names to a nearby feature instead of the city, so it is not used for native-script Japanese or Korean.
- Chinese county, district, township, and village names also use Open-Meteo directly; wttr.in often accepts them but resolves to a same-sounding place elsewhere.
- Can provide localized weather descriptions.
- A wttr.in result is rejected when its country conflicts with a recognized regional hint, or when a Han-only query that defaults to Simplified Chinese is matched to Hong Kong, Macau, or Taiwan. The plugin then tries the next candidate or reports failure rather than silently returning the wrong city.
Runtime dependencies in requirements.txt are exported from uv.lock with exact
versions. CI runs the same checks on every push and pull request:
The packaging commands require the Dify Plugin CLI. CI downloads the pinned
langgenius/dify-plugin-daemon 0.6.15 release binary.
uv sync --locked --group dev
uv run pytest -q
uv run ruff check .
uv run ruff format --check .
uv run pyright
uv run pip-audit --no-deps --disable-pip -r requirements.txt
cd ..
dify plugin package dify-plugin-myweather -o myweather-ci.difypkg
cd dify-plugin-myweather
uv run python scripts/verify_package.py ../myweather-ci.difypkg --source-root .The plugin itself does not log raw location text, including at debug level. The package verifier rejects development files and requires every runtime file to match the source tree byte for byte.
Release notes are maintained in CHANGELOG.md. Tagged releases
publish the versioned .difypkg as a GitHub Release asset. The Dify Marketplace
update and one-file PR process is documented in
docs/marketplace/README.md.
References:
- Open-Meteo Geocoding API: https://open-meteo.com/en/docs/geocoding-api
- Open-Meteo Forecast API: https://open-meteo.com/en/docs
- Open-Meteo License: https://open-meteo.com/en/licence
- Open-Meteo Terms: https://open-meteo.com/en/terms
- wttr.in Help: https://wttr.in/:help
- wttr.in Repository: https://github.com/chubin/wttr.in
- Source repository: https://github.com/AlexMultiAgent/dify-plugin-myweather
- GitHub profile: https://github.com/AlexMultiAgent
- GitHub Issues: https://github.com/AlexMultiAgent/dify-plugin-myweather/issues
MIT License. See LICENSE.
For the Simplified Chinese version of this document, see readme/README_zh_Hans.md.