{"id":19916241,"url":"https://github.com/clansty/state-grid-auto-relogin","last_synced_at":"2025-05-03T05:32:45.904Z","repository":{"id":249855800,"uuid":"832735476","full_name":"clansty/state-grid-auto-relogin","owner":"clansty","description":"Home Assistant 国家电网 Token 过期自动重新登录","archived":false,"fork":false,"pushed_at":"2024-08-06T03:55:41.000Z","size":14,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-08-06T06:03:50.532Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/clansty.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-07-23T16:06:12.000Z","updated_at":"2024-08-06T03:55:44.000Z","dependencies_parsed_at":"2024-07-23T20:16:26.671Z","dependency_job_id":null,"html_url":"https://github.com/clansty/state-grid-auto-relogin","commit_stats":null,"previous_names":["clansty/state-grid-auto-relogin"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clansty%2Fstate-grid-auto-relogin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clansty%2Fstate-grid-auto-relogin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clansty%2Fstate-grid-auto-relogin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clansty%2Fstate-grid-auto-relogin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/clansty","download_url":"https://codeload.github.com/clansty/state-grid-auto-relogin/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224354775,"owners_count":17297410,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-12T21:44:56.425Z","updated_at":"2024-11-12T21:44:56.907Z","avatar_url":"https://github.com/clansty.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Home Assistant 国家电网 Token 过期自动重新登录\n\n使用 [hass-box/state-grid](https://github.com/hass-box/state-grid) 时刷新 Token 经常一天就过期了，于是结合 [pppscn/SmsForwarder](https://github.com/pppscn/SmsForwarder) 实现自动重新登录\n\n## 用法\n\n根据 \u003c/src/env.ts\u003e 设置环境变量\n\n创建自动化通知 Token 过期状态\n\n![image](https://github.com/user-attachments/assets/803495e9-3b9c-41c6-baed-9c98f686e606)\n\n然后给 Sms Forwarder 增加一个 Socket 类型的转发目标，子类型使用 mqtt\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclansty%2Fstate-grid-auto-relogin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fclansty%2Fstate-grid-auto-relogin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclansty%2Fstate-grid-auto-relogin/lists"}