From 51120357eb9f4666f55b60120a0d083ffbe479ae Mon Sep 17 00:00:00 2001 From: redchupa Date: Thu, 14 May 2026 03:23:23 +0900 Subject: [PATCH] docs: add English README for international / expat audience MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adds README.en.md alongside the existing Korean README, tailored for: - Korean residents (including foreigners living in Korea) running HA - Korean expats abroad monitoring family-home utilities or alerts - Anyone integrating Korean weather / air-quality data into a global HA setup The English version is not a literal translation β€” it's restructured for readers who: - Are fluent in HA terminology but may be new to Korean public services - Need Korean GUI labels left untranslated (they appear as-is in HA) with English explanations alongside - Need agency-name disambiguation (NMC, KMA, KECO, NEIS, MOIS) since multiple Korean government portals are involved Same 5-minute quickstart, same direct portal search deep links (clickable πŸ‘‰ links that land users on each portal's search-results page with the Korean keyword pre-filled), same honest known-limitations disclosure. Top of README.md now carries a πŸ‡°πŸ‡· / πŸ‡¬πŸ‡§ language toggle pointing at README.en.md. Co-Authored-By: Claude Opus 4.7 --- README.en.md | 450 +++++++++++++++++++++++++++++++++++++++++++++++++++ README.md | 2 + 2 files changed, 452 insertions(+) create mode 100644 README.en.md diff --git a/README.en.md b/README.en.md new file mode 100644 index 0000000..357810e --- /dev/null +++ b/README.en.md @@ -0,0 +1,450 @@ +# πŸ‡°πŸ‡· KR Component Kit + +> **A Home Assistant integration for Korean residents** β€” KEPCO electricity, Seoul water, city gas, KMA weather, government disaster alerts, pharmacy info, school meals, real-time public transit, air quality, fuel prices, and earthquake warnings β€” 13 Korea-only public services bundled in one package. + +πŸ‡°πŸ‡· [ν•œκ΅­μ–΄ README](README.md) Β· πŸ‡¬πŸ‡§ **English (this page)** + +[![hacs][hacsbadge]][hacs] +[![GitHub Release][releases-shield]][releases] +[![GitHub Activity][commits-shield]][commits] +[![License][license-shield]](LICENSE) +[![Stargazers][stars-shield]][stars] + +[![Open your Home Assistant instance and open a repository inside the HACS.](https://my.home-assistant.io/badges/hacs_repository.svg)](https://my.home-assistant.io/redirect/hacs_repository/?owner=redchupa&repository=kr_component_kit&category=integration) + +--- + +## Why this exists + +Korean public services don't have a standard OpenAPI surface like utilities elsewhere. Each agency runs its own portal (`data.go.kr`, `safetydata.go.kr`, `opinet.co.kr`, `open.neis.go.kr`, `data.seoul.go.kr`), with its own signup, its own dataset-by-dataset ν™œμš©μ‹ μ²­ (use application), and its own quirks. + +This integration wraps the 13 most useful Korea-only services into one Home Assistant integration, with a unified config flow, native HA entities (sensors, weather, event, calendar), and an optional LLM tool surface for natural-Korean voice queries. + +**Who this is for:** +- Korean residents (citizens, expats, or international residents) running Home Assistant +- Korean expats abroad monitoring family-home utilities or disaster alerts back home +- Anyone integrating Korean weather/air-quality data into a global HA setup + +--- + +## πŸš€ 5-minute quickstart + +### Step 1. Install (2 min) + +Click the **`MY` HACS badge** at the top β€” your Home Assistant opens automatically, lands on the HACS download screen β†’ **DOWNLOAD** β†’ **restart Home Assistant**. + +*No HACS yet? β†’ [HACS official setup guide](https://www.hacs.xyz/docs/setup/download/) first.* + +### Step 2. Register your first service (1 min) β€” **no API key needed** + +**Settings β†’ Devices & Services β†’ + Add Integration** +β†’ Search `ν•œκ΅­ μ»΄ν¬λ„ŒνŠΈ ν‚€νŠΈ` *(the Korean name; English domain `kr_component_kit` also works)* +β†’ Select **🚨 μ•ˆμ „μ•Œλ¦Ό (Safety Alert)** β†’ pick μ‹œλ„ (province) / μ‹œκ΅°κ΅¬ (city/district) / 읍면동 (town) β†’ Submit. + +### Step 3. Verify (30 sec) + +**Developer Tools β†’ States** β†’ search for the friendly name `μ΅œμ‹  μ•ˆμ „μ•Œλ¦Ό` ("Latest Safety Alert") β†’ state shows the most recent Korean government safety bulletin for your area. + +### Step 4. Add more services + +When ready, follow the [πŸ”‘ API Key Guide](#-api-key-guide) below to add the other 12 services one by one. + +--- + +## πŸ“‹ The 13 services at a glance + +| Service | Category | API key | Notes | +|---|---|---|---| +| πŸ’Š **Pharmacy** (μ•½κ΅­) | Living | βœ… data.go.kr | Pharmacies near you with "open now" flag | +| 🚨 **Safety Alert** (μ•ˆμ „μ•Œλ¦Ό) | Safety | ❌ none | Government safety alerts (scraping) | +| πŸ“’ **Disaster Alert** (μž¬λ‚œλ¬Έμž) | Safety | βœ… safetydata.go.kr | Emergency text broadcasts in real time | +| πŸŒͺ️ **Weather Warning** (κΈ°μƒνŠΉλ³΄) | Safety | βœ… data.go.kr | 12 advisory types (rain, wind, cold, heat…) | +| 🌍 **Earthquake** (μ§€μ§„) | Safety | βœ… data.go.kr | Radius + magnitude filters | +| β›… **KMA Forecast** (λ™λ„€μ˜ˆλ³΄) | Weather | βœ… data.go.kr | Native HA Weather card | +| 🌫️ **AirKorea** (에어코리아) | Weather | βœ… data.go.kr (Γ—2) | PM10/PM2.5 + KHAI air-quality index | +| ⚑ **KEPCO** (ν•œκ΅­μ „λ ₯) | Utility | ❌ (own login) | Electricity usage + bill | +| πŸ’§ **Arisu** (μ„œμšΈ μƒμˆ˜λ„) | Utility | ❌ (account number) | Seoul tap water only | +| 🏠 **GasApp** (κ°€μŠ€μ•±) | Utility | ❌ (mobile-app token) | Packet capture required (advanced) | +| β›½ **Fuel** (μœ κ°€) | Living | βœ… opinet.co.kr | Province-level avg / lowest-price stations | +| 🏫 **School** (학ꡐ) | Living | βœ… open.neis.go.kr | Lunch menu, schedule, calendar | +| 🚌 **Transit** (λŒ€μ€‘κ΅ν†΅) | Living | Partial | Subway: Seoul key / Bus: no key (KakaoMap) | + +> πŸ’‘ **All services are free.** Korean public APIs are gratis; this integration adds no payment of its own. + +--- + +## πŸ”‘ API Key Guide + +> ⚠️ **Three common pitfalls** +> - Disaster alerts use `safetydata.go.kr` (Safety Data Portal) β€” **a different site** from `data.go.kr` (Public Data Portal). Separate signup. +> - Even within `data.go.kr`, each dataset needs **its own ν™œμš©μ‹ μ²­ (use application)** β€” a key approved for pharmacies returns 403 when called against weather warnings. +> - After applying, expect **1–2 hours of activation lag** (especially agency-issued keys). + +Each "πŸ‘‰ Direct search" link below lands on the portal's search-results page with the Korean keyword pre-filled. + +### πŸ’Š Pharmacy (μ „κ΅­ μ•½κ΅­ 정보) + +| Field | Value | +|---|---| +| 🌐 Portal | [Public Data Portal (data.go.kr)](https://www.data.go.kr) | +| πŸ”Ž Direct search | [πŸ‘‰ Open pharmacy search](https://www.data.go.kr/tcs/dss/selectDataSetList.do?searchKeyword=μ „κ΅­%20μ•½κ΅­) | +| Search keyword | `μ „κ΅­ μ•½κ΅­` or `μ•½κ΅­ 정보` | +| Operating agency | National Medical Center (NMC) β€” code `B552657` | +| Exact dataset name | **κ΅­λ¦½μ€‘μ•™μ˜λ£Œμ›_μ „κ΅­ μ•½κ΅­ 정보 쑰회 μ„œλΉ„μŠ€** | +| Endpoint called by code | `apis.data.go.kr/B552657/ErmctInsttInfoInqireService/getParmacyListInfoInqire` | + +**Steps:** Sign up at the portal (Korean OAuth via Naver/Kakao works) β†’ click the direct-search link β†’ pick the dataset β†’ **ν™œμš©μ‹ μ²­** (Use Application) β†’ My Page β†’ Open API β†’ Auth Key list β†’ copy the **Decoding** form β†’ paste into HA pharmacy field. + +--- + +### πŸ“’ Disaster Alert (μž¬λ‚œλ¬Έμž) + +| Field | Value | +|---|---| +| 🌐 Portal | [Safety Data Portal (safetydata.go.kr)](https://www.safetydata.go.kr) | +| πŸ”Ž Direct search | Search box at top β†’ type `μž¬λ‚œλ¬Έμž` | +| Search keyword | `μž¬λ‚œλ¬Έμž` | +| Operating agency | Ministry of the Interior and Safety | +| Endpoint | `safetydata.go.kr/V2/api/DSSP-IF-00247` | + +> ⚠️ Safety Data Portal and Public Data Portal are **separate sites** even though both are government-run. Sign up separately even if you already have a `data.go.kr` account. + +--- + +### πŸŒͺ️ Weather Warning + 🌍 Earthquake + β›… Short-term Forecast (3 KMA datasets, same key) + +All three live under `data.go.kr`, operating agency **Korea Meteorological Administration (KMA)**, agency code `1360000`. **One auth key per account** β€” but each dataset still needs its own ν™œμš©μ‹ μ²­. + +| Service | Direct search | Keyword | Endpoint | +|---|---|---|---| +| πŸŒͺ️ Weather warning | [πŸ‘‰ Search](https://www.data.go.kr/tcs/dss/selectDataSetList.do?searchKeyword=κΈ°μƒνŠΉλ³΄) | `κΈ°μƒνŠΉλ³΄` | `1360000/WthrWrnInfoService` | +| 🌍 Earthquake | [πŸ‘‰ Search](https://www.data.go.kr/tcs/dss/selectDataSetList.do?searchKeyword=지진정보) | `지진정보` | `1360000/EqkInfoService` | +| β›… Short-term forecast | [πŸ‘‰ Search](https://www.data.go.kr/tcs/dss/selectDataSetList.do?searchKeyword=λ‹¨κΈ°μ˜ˆλ³΄) | `λ‹¨κΈ°μ˜ˆλ³΄` | `1360000/VilageFcstInfoService_2.0` | + +--- + +### 🌫️ AirKorea (Air Quality) β€” **two datasets required** + +`data.go.kr`, operating agency **Korea Environment Corporation**, agency code `B552584`. Both datasets must be applied for separately. + +| Dataset | Direct search | Keyword | Endpoint | +|---|---|---|---| +| Station info | [πŸ‘‰ Search](https://www.data.go.kr/tcs/dss/selectDataSetList.do?searchKeyword=에어코리아%20μΈ‘μ •μ†Œ) | `에어코리아 μΈ‘μ •μ†Œ` | `B552584/MsrstnInfoInqireSvc` | +| Pollution data | [πŸ‘‰ Search](https://www.data.go.kr/tcs/dss/selectDataSetList.do?searchKeyword=에어코리아%20λŒ€κΈ°μ˜€μ—Ό) | `에어코리아 λŒ€κΈ°μ˜€μ—Ό` | `B552584/ArpltnInforInqireSvc` | + +> πŸ’‘ If station-info is missing, the station dropdown in HA setup will be empty. + +> ⚠️ **Optional β€” Living Weather Index (UV / air stagnation)**: code calls the `V4` endpoint, but the portal seems to have moved to `V5`. Live operation unverified. If you want these sensors, search `μƒν™œκΈ°μƒμ§€μˆ˜` and apply; check HA logs (`Settings β†’ System β†’ Logs`, search `LivingWthrIdx`) for actual behavior. PM10/PM2.5 (the required two) are unaffected. + +--- + +### β›½ Fuel (Opinet) + +| Field | Value | +|---|---| +| 🌐 Portal | [πŸ‘‰ Opinet API signup page](https://www.opinet.co.kr/user/api/empApiInfo.do) | +| Process | Free signup β†’ API application β†’ immediate issuance | +| Endpoint | `opinet.co.kr/api/avgAllPrice.do`, `lowTop10.do` | + +> πŸ’‘ Opinet is a **separate portal** from the Public Data Portal. + +--- + +### 🏫 School (NEIS) + +| Field | Value | +|---|---| +| 🌐 Portal | [πŸ‘‰ NEIS Education Open Portal](https://open.neis.go.kr) | +| Process | Sign up β†’ request auth key β†’ check My Page "Application Status" | +| Endpoint | `open.neis.go.kr/hub/...` | + +> πŸ’‘ NEIS is also a **separate portal**. The HA config flow auto-searches schools by name β€” just type your school's Korean name into the dropdown. + +--- + +### 🚌 Transit β€” keys depend on scenario + +| Use case | Key needed | Where | +|---|---|---| +| Subway arrivals | Seoul Open Data Plaza key | [πŸ‘‰ data.seoul.go.kr](https://data.seoul.go.kr) β†’ apply for `μ§€ν•˜μ²  μ‹€μ‹œκ°„ 도착정보` | +| Bus arrivals | **None needed** | KakaoMap's unofficial endpoint; just enter the stop ID | +| Transfer path search (optional) | Seoul transfer-route API key | [πŸ‘‰ data.go.kr](https://www.data.go.kr/tcs/dss/selectDataSetList.do?searchKeyword=λŒ€μ€‘κ΅ν†΅ν™˜μŠΉκ²½λ‘œ) β†’ `λŒ€μ€‘κ΅ν†΅ν™˜μŠΉκ²½λ‘œ` | + +**Finding a KakaoMap bus stop ID** *(for bus registration)*: +[KakaoMap](https://map.kakao.com) β†’ search for the stop β†’ click it β†’ URL becomes `?busstopid=03171&...` β†’ **copy the value after `busstopid=`** (e.g., `03171`, `BS09013700`). + +--- + +## βš™οΈ Registration & reconfiguration + +### Adding a new entry +Settings β†’ Devices & Services β†’ **+ Add Integration** β†’ `ν•œκ΅­ μ»΄ν¬λ„ŒνŠΈ ν‚€νŠΈ` β†’ pick service. + +> One integration menus 13 services β€” add them one at a time. **Same service can be registered multiple times for different regions** (e.g., pharmacy for your district + your in-laws' district = 3 separate entries). + +### Changing API keys / regions after setup +The relevant entry's **"Configure"** button β†’ edit. *(No need to delete-and-reregister; entities and automations preserved.)* + +### Where to get each non-API-key input + +| Service | Where | +|---|---| +| ⚑ **KEPCO** | Your KEPCO website ID / password (2FA not supported) | +| πŸ’§ **Arisu** | Paper bill or [Arisu Cyber Customer Center](https://i-arisu.seoul.go.kr) β†’ μš”κΈˆμ‘°νšŒ (Bill Inquiry) β†’ left sidebar shows μˆ˜μš©κ°€λ²ˆν˜Έ (customer number) + 고객λͺ… (customer name) | +| 🏠 **GasApp** | Contract number from the GasApp mobile app β†’ My Info. Token + member ID via packet capture (mitmproxy / Charles) of the mobile-app HTTPS request headers `X-Token` / `X-Member` (⚠️ advanced) | +| 🌍 **Earthquake coordinates** | Defaults to Seoul City Hall (`37.5665, 126.978`). **Set your home coordinates.** Default radius 200 km / minimum magnitude 3.0 | + +--- + +## 🎁 Entities you'll get + +> Entity IDs are auto-romanized from Korean (e.g., device `μ•½κ΅­ - μ‹œν₯μ‹œ` + entity `운영 μ•½κ΅­ 수` β†’ `sensor.yaggug_siheungsi_unyeong_yaggug_su`). To find the exact ID, search by **friendly name** in Developer Tools β†’ States. + +| Service | Friendly names | Key attributes | +|---|---|---| +| πŸ’Š Pharmacy | `운영 μ•½κ΅­ 수` ("Operating Pharmacy Count") | `pharmacies[]` (up to 50: name/address/phone/lat/lon/today_hours/`open_now`/duty_time), `total`, `shown`, `open_now_count` | +| 🚨 Safety Alert | `μ΅œμ‹  μ•ˆμ „μ•Œλ¦Ό`, `μ•ˆμ „μ•Œλ¦Ό 수`, `였늘 μ•ˆμ „μ•Œλ¦Ό μ—¬λΆ€` (binary), `μ•ˆμ „μ•Œλ¦Ό 이벀트` (event) | `latest`, `alerts[]`, `count` | +| πŸ“’ Disaster Alert | `μ΅œμ‹  μž¬λ‚œλ¬Έμž`, `μž¬λ‚œλ¬Έμž 수`, `μž¬λ‚œλ¬Έμž 이벀트` (event) | `level`, `area`, `disaster_type` | +| πŸŒͺ️ Weather Warning | `호우 특보`/`강풍 특보`/`ν•œνŒŒ 특보`/... (12 event entities) | state: `advisory`/`warning`/`pre_*`/`cancelled`/`none`, `start_time`, `end_time` | +| 🌍 Earthquake | `μ§€μ§„ 경보` (event) | `magnitude`, `location`, `distance_km`, `datetime` | +| β›… Forecast | Single weather entity β€” compatible with HA's standard Weather card | hourly/daily forecast service | +| 🌫️ AirKorea | `PM10 λ―Έμ„Έλ¨Όμ§€`, `PM2.5 μ΄ˆλ―Έμ„Έλ¨Όμ§€`, `O₃ 였쑴`, `NOβ‚‚`, `SOβ‚‚`, `CO`, `ν†΅ν•©λŒ€κΈ°μ§ˆμ§€μˆ˜` + binary `λŒ€κΈ°μ§ˆ 경보` + event + calendar `λŒ€κΈ°μ§ˆ 예보` | Grade attribute attached | +| ⚑ KEPCO | `ν˜„μž¬ μ‚¬μš©λŸ‰` (kWh), `μ§€λ‚œλ‹¬ μš”κΈˆ` (KRW), `μ˜ˆμƒ μš”κΈˆ`, `고객번호`, `μ „λ ₯ꡬ뢄` | β€” | +| πŸ’§ Arisu | `μˆ˜λ„ μš”κΈˆ` (KRW), `μ‚¬μš©λŸ‰` (γŽ₯), `청ꡬ월` | `billing_month`, `customer_info`, `arrears_info` | +| 🏠 GasApp | `청ꡬ 제λͺ©`, `총 μš”κΈˆ` (KRW) | β€” | +| β›½ Fuel | `μ „κ΅­ 평균가`, `μ΅œμ €κ°€` (per sido Γ— fuel-type combo) | `ranking[]` (top 5 stations) | +| 🏫 School | `급식` ("Lunch"), `학ꡐ 정보` + calendar entities for academic schedule and timetable | Lunch: `menu`, `calorie`, `allergy_codes` | +| 🚌 Transit | ` ... 도착` (TIMESTAMP β€” HA auto-shows "N min later") | β€” | + +--- + +## πŸ€– Natural-language queries (LLM, optional) + +If you expose this integration to HA's **Assist + LLM** (OpenAI / Google / Ollama / etc.), you can ask in natural Korean: + +| Query | Service | +|---|---| +| "μ§€κΈˆ μ˜μ—…μ€‘μΈ κ°€κΉŒμš΄ μ•½κ΅­ μ•Œλ €μ€˜" ("Find nearby pharmacies open now") | πŸ’Š Pharmacy | +| "였늘 λ―Έμ„Έλ¨Όμ§€ μ–΄λ•Œ?" ("How's the air quality today?") | 🌫️ AirKorea | +| "내일 λΉ„ 와?" ("Will it rain tomorrow?") | β›… KMA | +| "였늘 급식 뭐야?" ("What's for school lunch today?") | 🏫 School | +| "λ‹€μŒ λ²„μŠ€ μ–Έμ œ 와?" ("When's the next bus?") | 🚌 Transit | + +Without LLM exposure, regular sensor/event/weather entities work as normal β€” no extra setup required. + +--- + +## ❓ FAQ + +
+Do I have to register all 13 services? + +No. Register only what you want. Services you don't register create zero entities and consume no resources. +
+ +
+Are any of these paid? + +**All free.** Korean government / public-corporation OpenAPIs; this integration adds no cost of its own. Each API has daily call quotas (typically 10,000 – 1,000,000/day) β€” never an issue for single-household use. +
+ +
+I'm intimidated by API key signups. What can I try first? + +**Four services work without any API key**: +- 🚨 **Safety Alert** β€” pick a region (scraping-based) +- ⚑ **KEPCO / πŸ’§ Arisu / 🏠 GasApp** β€” your own account (not an API key) +
+ +
+I live outside Seoul. Does this work? + +Most services work nationwide. **Seoul-only**: Arisu (water), Seoul subway real-time arrivals. Everything else is countrywide. +
+ +
+How do I change my API key or region after setup? + +Settings β†’ Devices & Services β†’ **ν•œκ΅­ μ»΄ν¬λ„ŒνŠΈ ν‚€νŠΈ** card β†’ that entry's **Configure** button β†’ edit. No delete-and-reregister needed; entities + automations preserved. +
+ +
+Can I register the same service multiple times for different regions? + +Yes. Register the pharmacy service for your district + your in-laws' district + your parents' district β€” three independent device/entity sets. +
+ +
+How do I send phone notifications when an alert comes in? + +Combine HA Automation with the Companion app's `notify.mobile_app_*` service. Minimal example: + +```yaml +automation: + - alias: "Disaster alert β†’ phone push" + trigger: + - platform: state + entity_id: sensor. + condition: + - condition: template + value_template: "{{ trigger.to_state.state not in ['μ—†μŒ', 'unknown', 'unavailable'] }}" + action: + - service: notify.mobile_app_ + data: + title: "🚨 Disaster Alert" + message: "{{ trigger.to_state.state }}" +``` + +Look up entity IDs by friendly name in Developer Tools β†’ States. +
+ +
+Where are my credentials stored? + +In Home Assistant's internal storage (`.storage/`) only. Passwords are sent only to the respective service's official login page (e.g., KEPCO / Arisu). See [Disclaimer](#️-disclaimer). +
+ +
+How do I update? + +HACS shows a red dot on **HACS β†’ Integrations β†’ KR Component Kit** when a new release is available. Click β†’ UPDATE β†’ restart HA. Existing config + entities preserved. +
+ +
+My new-build apartment isn't in the district dropdown. + +Government administrative codes occasionally lag for newly-built areas. Pick the nearest adjacent district. KMA forecasts are 5 km Γ— 5 km grids anyway, so the actual weather data is nearly identical. +
+ +--- + +## πŸ”„ Update intervals + +| Category | Service | Interval | +|---|---|---| +| Real-time | Bus / Subway | 1–2 min | +| Safety | Disaster, Safety Alert, KEPCO | 5 min | +| Safety | Earthquake, Weather Warning | 10–15 min | +| Environment/Utility | GasApp, KMA Forecast, AirKorea | 20–30 min | +| Living | Arisu, Pharmacy, Fuel | 1 hour | +| Living | School (meals/timetable) | 6 hours | + +> πŸ’‘ Pharmacy `open_now` (currently open) is **recomputed live each dashboard render** independently of data refresh. + +--- + +## ⚠️ Known limitations (honest disclosure) + +Some services use non-official paths (HTML scraping, mobile-app APIs). External-site changes can temporarily break them. All known weak spots: + +| Service | Limit | +|---|---| +| 🚨 **Safety Alert / πŸ“’ Disaster Alert** | `safekorea.go.kr` HTML scraping / `safetydata.go.kr` API. May break during government-site maintenance. Disaster Alert uses 5-profile Chrome impersonation rotation; Safety Alert uses single `chrome120` profile | +| ⚑ **KEPCO** | Login-success URL markers are hardcoded β€” if KEPCO renames its post-login page, detection fails. 2FA not supported. Look for `KEPCO login: unknown redirect` in HA logs to debug | +| πŸ’§ **Arisu** | HTML scraping of `i121.seoul.go.kr` β€” Seoul city website structure changes can break parsing. Assumes 9-digit customer number | +| 🏠 **GasApp** | Uses the mobile-app internal API. Token extraction requires packet-capture tooling (mitmproxy / Charles) β€” high barrier for non-technical users | +| 🌫️ **AirKorea Living Index (UV / air stagnation)** | Code calls `V4` endpoint, but the portal seems upgraded to `V5` β€” live operation unverified. Required pollution datasets are unaffected | +| 🏫 **NEIS** | `INFO-200` (no-data, normal) is currently treated as an error β€” log noise possible on school holidays / vacation periods (no functional impact) | + +> βœ… **Verified working** as of release `v4.2.17`: Pharmacy (live HA query showed sensor state=20 with full attribute payload). Safety Alert (cascading district registration successful). + +> πŸ› **Something broke after a site change?** Open a [GitHub issue](https://github.com/redchupa/kr_component_kit/issues) and a fix PR is usually quick. + +--- + +## πŸ› Troubleshooting + +### API key auth failures +- After applying, expect **1–2 hours** of activation lag (especially agency-issued keys) +- Within `data.go.kr`, **each dataset needs its own ν™œμš©μ‹ μ²­** β€” a pharmacy-approved key returns 403 against weather warnings +- Disaster Alert needs `safetydata.go.kr` specifically β€” `data.go.kr` keys do not work +- `401` = wrong key, `403` = right key but no application approval for that dataset +- Hit daily quota? Check My Page traffic stats + +### Login failures (KEPCO / Arisu / GasApp) +- Confirm the website itself lets you log in normally +- Accounts with 2FA enabled are not supported +- GasApp tokens expire frequently β€” re-extract from the app + +### Empty data (Safety Alert / Disaster Alert) +- If no recent messages in your area, state shows `μ—†μŒ` ("none") β€” normal +- Government site maintenance? Wait and it auto-recovers + +### Still stuck + +1. **Check logs** β€” Settings β†’ System β†’ Logs β†’ search `kr_component_kit` +2. **Open an issue** β€” [GitHub Issues](https://github.com/redchupa/kr_component_kit/issues) β€” include: + - Which service (e.g., "Pharmacy β€” Seoul Gangnam-gu") + - HA version + this integration version + - Error log (mask any personal info / keys) + - Steps you've tried + +> πŸ’¬ Both English and Korean issues welcome β€” responses in your language. + +--- + +## πŸ“‹ Requirements + +- **Home Assistant** 2023.1.0 or later +- **Python** 3.11+ (HA's own requirement) +- Internet connection (each service hits its respective API) +- Auto-installed Python packages: `curl_cffi>=0.7.0`, `beautifulsoup4>=4.12.0` (declared in manifest.json) + +--- + +## ⚠️ Disclaimer + +- This integration uses **authenticated web scraping or mobile-app internal APIs** rather than official OpenAPIs for KEPCO, Arisu, GasApp, and Safety Alert +- Provider policy changes may break these services without warning +- A few government-site clients use `verify=False` (TLS-verification bypass) to work around the sites' TLS configuration quirks β€” review the source if this concerns you +- All credentials (IDs, passwords, tokens, API keys) are stored only in Home Assistant's local storage. Nothing is sent externally +- This is an **unofficial third-party integration** β€” not affiliated with the Korean government or any of the listed agencies. Use at your own risk. + +--- + +## 🀝 Contributing & License + +- **License**: [MIT](LICENSE) β€” free to use, modify, and redistribute +- Issues and PRs welcome: +- Suggestions for new Korean services to add are very welcome + +--- + +## ⭐ Star if useful + +A single Star ⭐ at the top right goes a long way. More stars β†’ higher chance of HACS Default Repository acceptance β†’ more Korean users can discover this. + +[![Star History Chart](https://api.star-history.com/svg?repos=redchupa/kr_component_kit&type=Date)](https://star-history.com/#redchupa/kr_component_kit&Date) + +--- + +## β˜• Donations + +If this saved you time, a coffee would be appreciated πŸ™ + + + + + + +
+ Toss (Korean)
+ Toss donation QR +
+ PayPal
+ PayPal donation QR +
+ +--- + +**Made with ❀️ for Korean Home Assistant users** + +[hacs]: https://github.com/hacs/integration +[hacsbadge]: https://img.shields.io/badge/HACS-Custom-orange.svg?style=for-the-badge +[releases-shield]: https://img.shields.io/github/release/redchupa/kr_component_kit.svg?style=for-the-badge +[releases]: https://github.com/redchupa/kr_component_kit/releases +[commits-shield]: https://img.shields.io/github/commit-activity/y/redchupa/kr_component_kit.svg?style=for-the-badge +[commits]: https://github.com/redchupa/kr_component_kit/commits/main +[license-shield]: https://img.shields.io/github/license/redchupa/kr_component_kit.svg?style=for-the-badge +[stars-shield]: https://img.shields.io/github/stars/redchupa/kr_component_kit.svg?style=for-the-badge +[stars]: https://github.com/redchupa/kr_component_kit/stargazers diff --git a/README.md b/README.md index 98b53e7..e1d0cab 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,8 @@ > **ν•œκ΅­ 거주자λ₯Ό μœ„ν•œ Home Assistant 톡합** β€” μ „κΈ°Β·μˆ˜λ„Β·κ°€μŠ€Β·λ‚ μ”¨Β·μž¬λ‚œΒ·μ•½κ΅­Β·ν•™κ΅ κΈ‰μ‹Β·μ‹€μ‹œκ°„ λŒ€μ€‘κ΅ν†΅κΉŒμ§€, ν•œκ΅­μ—μ„œλ§Œ μ“Έ 수 μžˆλŠ” 13κ°€μ§€ 곡곡 μ„œλΉ„μŠ€λ₯Ό ν•œ νŒ¨ν‚€μ§€λ‘œ. +πŸ‡°πŸ‡· **ν•œκ΅­μ–΄ (이 νŽ˜μ΄μ§€)** Β· πŸ‡¬πŸ‡§ [English README](README.en.md) + [![hacs][hacsbadge]][hacs] [![GitHub Release][releases-shield]][releases] [![GitHub Activity][commits-shield]][commits]