# ARC-MX/sgcc_electricity_new

HomeAssistant 国家电网电费查询

Repository: https://github.com/ARC-MX/sgcc_electricity_new
Canonical: https://ross.abutalabs.com/products/sgcc_electricity_new
Language: Python
License: Apache-2.0
License Family: permissive
Last push: 2026-08-13T08:21:49+00:00

## Health v2 (maintenance only)
Score: 89/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 97, release rhythm 95, longevity 60
- inputs: {"age_days": 847, "days_push": 20, "days_rel": 36, "gap_med": 7, "n_releases_24m": 20}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1855, forks 312 (observed 2026-08-28T04:05:44.826252+00:00)

## What it is
A Home Assistant integration (deployed via Docker) that scrapes China State Grid (SGCC) accounts to fetch electricity billing and usage data, exposing it as HA sensor entities. It uses an offline neural network to solve login captchas and can optionally store daily usage history in a SQLite database.

## Use cases
- track my home electricity usage in home assistant
- query my state grid electricity bill balance automatically
- monitor daily kwh consumption from the national grid
- store historical daily electricity usage in a database
- get notified when my prepaid electricity balance is low
- import sgcc electricity data as home assistant sensors

## When to choose
- you are a Home Assistant user in China with a State Grid (国家电网) account
- you want automated, scheduled fetching of electricity balance and usage without manual logins
- you want local/offline captcha recognition instead of a paid online API
- you want historical daily usage stored in SQLite for graphing

## When to avoid
- your utility is not China State Grid (e.g., southern grid or non-Chinese providers)
- you need real-time second-by-second consumption rather than daily/billing-cycle data
- you cannot run Docker or a Home Assistant instance
- you exceed SGCC's daily login limits and need high-frequency polling

## Facets
- artifact type: plugin
- maturity: active
- function: web-scraping, monitoring, data-science, ocr
- domain: iot, energy, self-hosted
- platform: python, self-hosted
- tags: home-assistant, state-grid, electricity-usage, energy-monitoring, captcha-recognition, china, sensor-integration, sqlite, home-automation, automation, docker

## Member repositories
- ARC-MX/sgcc_electricity_new (main) score 89

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:05:44.826252+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T03:16:42.900343+00:00, confidence not recorded.
  - readme: https://github.com/ARC-MX/sgcc_electricity_new (fetched 2026-08-28T04:05:44.826252+00:00, sha a485c628a06c)
- Data as of 2026-08-30T08:39:29.467469+00:00.
