From cd31a500985a5a9d8becac3c425fbd4f14d52a4c Mon Sep 17 00:00:00 2001 From: bohdan-s Date: Fri, 9 Dec 2022 14:36:42 +1100 Subject: [PATCH] Initial HA Support (testing..) --- .gitignore | 2 +- Dockerfile | 9 ++++++++- config.yaml | 36 ++++++++++++++++++++++++++++++++++++ 3 files changed, 45 insertions(+), 2 deletions(-) create mode 100644 config.yaml diff --git a/.gitignore b/.gitignore index cd33ed3..990b257 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ -config.yaml +SunGather/config.yaml *.log.* # Byte-compiled / optimized / DLL files diff --git a/Dockerfile b/Dockerfile index ba9408e..f5f2995 100644 --- a/Dockerfile +++ b/Dockerfile @@ -19,4 +19,11 @@ COPY SunGather/config-example.yaml /config/config.yaml USER sungather -CMD [ "python", "sungather.py", "-c", "/config/config.yaml", "-l", "/logs/" ] \ No newline at end of file +CMD [ "python", "sungather.py", "-c", "/config/config.yaml", "-l", "/logs/" ] + +LABEL \ + io.hass.name="SunGather" \ + io.hass.description="Extract Sungrow data from local Inverter" \ + io.hass.version=${BUILD_VERSION} \ + io.hass.type="addon" \ + io.hass.arch=${BUILD_ARCH} \ No newline at end of file diff --git a/config.yaml b/config.yaml new file mode 100644 index 0000000..03850dd --- /dev/null +++ b/config.yaml @@ -0,0 +1,36 @@ +name: SunGather +version: "0.3.9" +slug: modbus_inverter +description: Extract Sungrow data from local Inverter +url: "https://github.com/bohdan-s/SunGather" +arch: + - armhf + - armv7 + - aarch64 + - amd64 + - i386 +init: false +startup: application +boot: auto +services: + - "mqtt:need" +options: + Inverter_host: "" + Inverter_port: 502 + Inverter_model: "" + Smart_meter: false + Connection: "Modbus" + Scan_level: "STANDARD" + Scan_interval: 30 + Scan_timeout: 5 + Log_level: "INFO" +schema: + Inverter_host: str + Inverter_port: port + Inverter_model: str + Smart_meter: bool + Connection: "list(Sungrow|Modbus|HTTP)" + Scan_level: "list(BASIC|STANDARD|DETAIL|ALL)" + Scan_interval: int(10,600) + Scan_timeout: int(3,60) + Log_level: "list(INFO|WARNING|ERROR|DEBUG)"