Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

建议:能否把该项目整合进hassio-addons #63

Closed
ShiDai567 opened this issue Dec 9, 2024 · 13 comments
Closed

建议:能否把该项目整合进hassio-addons #63

ShiDai567 opened this issue Dec 9, 2024 · 13 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@ShiDai567
Copy link

No description provided.

@ShiDai567
Copy link
Author

ec955753-5e8f-4c36-94fb-7d207a1b78c1

@ShiDai567
Copy link
Author

ShiDai567 commented Dec 9, 2024

我大概写了一下,但是还没测试

name: SGCC Electricity Data Collector
description: Collects electricity data from State Grid Corporation of China and integrates it with Home Assistant.
version: "1.0.0"
slug: sgcc_electricity
repository: local

# 构建配置
build:
  from: homeassistant/amd64-base:latest
  python_version: "3.9"

# 系统配置
system:
  arch:
    - aarch64
    - amd64
    - armhf
    - armv7
  machine: all

# 容器配置
docker:
  image: arcw/sgcc_electricity:latest
  run_as_root: false

# WebUI 配置 (如果有)
# webui: "/webui -> http://127.0.0.1:8080/"

# 端口映射 (如果有)
# ports:
#   8080/tcp: 8080

# 设备访问 (如果有)
# devices:
#   - /dev/ttyUSB0

# 临时卷配置 (如果有)
# tmpfs:
#   /run: size=65536k,mode=755

# 持久化卷配置
persistence:
  - /data

# 启动顺序
startup: application

# 主机网络
host_network: false

# 主机 PID 命名空间
host_pid: false

# 环境变量
environment:
  - TZ=Asia/Shanghai

# 权限设置
options:
  username: !secret sgcc_username
  password: !secret sgcc_password
  ha_url: !secret home_assistant_url
  ha_token: !secret home_assistant_long_lived_access_token
  enable_database_storage: "true" # 可选,是否启用数据库存储,默认为 true
  database_path: "/data/homeassistant.db" # 数据库路径
  user_id: "your_user_id" # 用户 ID,如果有多户号,可以是逗号分隔的列表
  first_sleep_time: "10" # 首次运行等待时间,默认为 10 秒

# 用户可配置的选项
schema:
  username:
    type: string
    required: true
  password:
    type: string
    required: true
  ha_url:
    type: string
    required: true
  ha_token:
    type: string
    required: true
  enable_database_storage:
    type: boolean
    required: false
    default: true
  database_path:
    type: string
    required: false
    default: "/data/homeassistant.db"
  user_id:
    type: string
    required: true
  first_sleep_time:
    type: integer
    required: false
    default: 10

# 依赖关系 (如果有)
dependencies:
  - slug: samba-share # 如果需要访问外部存储

# 警告信息 (如果有)
warning: "This add-on is experimental and might not work as expected."

# 文档链接
documentation: https://github.com/ARC-MX/sgcc_electricity_new

# 看门狗配置
watchdog:
  enabled: true
  max_retry: 3
  restart_policy: always

# 自动更新配置
auto_update: false

# 日志级别
log_level: info

@ARC-MX
Copy link
Owner

ARC-MX commented Dec 10, 2024

这个想法可以,后面想想咋搞

@ShiDai567
Copy link
Author

应该只需要在你的仓库里写一个config.json文件,再把你的仓库地址放在addons源里就可以识别了

@RWDai
Copy link

RWDai commented Dec 20, 2024

期待

@ARC-MX ARC-MX pinned this issue Dec 20, 2024
@ARC-MX ARC-MX added enhancement New feature or request help wanted Extra attention is needed labels Dec 20, 2024
@ARC-MX
Copy link
Owner

ARC-MX commented Dec 20, 2024

应该只需要在你的仓库里写一个config.json文件,再把你的仓库地址放在addons源里就可以识别了

你可以测试一下,回头贡献一下,我来合并

@735876214
Copy link

期待一波

@DuanXDong
Copy link
Contributor

期待

1 similar comment
@rpeng6
Copy link

rpeng6 commented Dec 27, 2024

期待

@dldui-captain
Copy link

上线了吗 ?

@ARC-MX
Copy link
Owner

ARC-MX commented Dec 31, 2024

初步测试阶段,还未正式提交

@ARC-MX
Copy link
Owner

ARC-MX commented Jan 5, 2025

有需要的可以试试,文档在ha_addon_doc,推荐使用国内源https://gitee.com/ARC-MX/sgcc_electricity_new

@ARC-MX ARC-MX closed this as completed Jan 5, 2025
@rpeng6
Copy link

rpeng6 commented Jan 5, 2025

有需要的可以试试
地址?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

7 participants