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

configure log path and max number of daily log files #243

Merged
merged 22 commits into from
Dec 17, 2024

Conversation

s-allius
Copy link
Owner

No description provided.

@s-allius
Copy link
Owner Author

  • The path for the log files is now configurable like the path for the config file. For the add-on I set the path to /homeassistant/tsun-proxy/logs. The sub directory tsun-proxy should be the slug-name from the config.yaml. Maybe the name is available as an environment variable in the HA setup.
  • At midnight the logging system creates new log files (proxy-log and trace.log) and add a timestamp to the name of the old files. Now we can configure how many of these files will be kept in the log folder. For now I set the number to two. And the oldest will be delete at midnight to reduce storage usage.

@mime24 : Can you check if this approach work in your setup? Maybe we have to adapt the rights for the log files or folders. And it will be very useful if you can check if the slug is available, for using in the run.sh file

@mime24
Copy link
Collaborator

mime24 commented Dec 14, 2024

Sure. Tomorrow, I will have a look to all the changes and feedbacks.

@mime24
Copy link
Collaborator

mime24 commented Dec 15, 2024

Hallo Stefan,
leider läuft die aktuelle version bei mir nicht. bekomme nen Fehler, welcher auf die virtuelle Umgebung hindeutet.

2024-12-15 16:31:06.646 INFO (MainThread) [supervisor.docker.addon] Starting build for local/aarch64-addon-tsun-proxy:dev
2024-12-15 16:31:19.245 ERROR (MainThread) [supervisor.docker.addon] Can't build local/aarch64-addon-tsun-proxy:dev: The command '/bin/ash -o pipefail -c apk add --no-cache build-base=0.5-r3 &&     python -m pip install --no-cache-dir wheel==0.45.1 &&     python -OO -m pip wheel --no-cache-dir --wheel-dir=/root/wheels -r /root/requirements.txt' returned a non-zero code: 1
2024-12-15 16:31:19.246 ERROR (MainThread) [supervisor.docker.addon] Build log: 
Step 1/21 : ARG BUILD_FROM="ghcr.io/hassio-addons/base:stable"
Step 2/21 : FROM $BUILD_FROM AS base
 ---> 99cfb7802076
Step 3/21 : RUN apk add --no-cache python3=3.12.8-r1 py3-pip=24.3.1-r0
 ---> Using cache
 ---> 8f037c1296a1
Step 4/21 : FROM base AS builder
 ---> 8f037c1296a1
Step 5/21 : COPY rootfs/requirements.txt /root/
 ---> Using cache
 ---> a3b2fb7cd1c2
Step 6/21 : RUN apk add --no-cache build-base=0.5-r3 &&     python -m pip install --no-cache-dir wheel==0.45.1 &&     python -OO -m pip wheel --no-cache-dir --wheel-dir=/root/wheels -r /root/requirements.txt
 ---> Running in a7d00acf89b3
fetch https://dl-cdn.alpinelinux.org/alpine/v3.21/main/aarch64/APKINDEX.tar.gz
fetch https://dl-cdn.alpinelinux.org/alpine/v3.21/community/aarch64/APKINDEX.tar.gz
(1/18) Installing jansson (2.14-r4)
(2/18) Installing binutils (2.43.1-r1)
(3/18) Installing libmagic (5.46-r0)
(4/18) Installing file (5.46-r0)
(5/18) Installing libgomp (14.2.0-r4)
(6/18) Installing libatomic (14.2.0-r4)
(7/18) Installing gmp (6.3.0-r2)
(8/18) Installing isl26 (0.26-r1)
(9/18) Installing mpfr4 (4.2.1-r0)
(10/18) Installing mpc1 (1.3.1-r1)
(11/18) Installing gcc (14.2.0-r4)
(12/18) Installing libstdc++-dev (14.2.0-r4)
(13/18) Installing musl-dev (1.2.5-r8)
(14/18) Installing g++ (14.2.0-r4)
(15/18) Installing make (4.4.1-r2)
(16/18) Installing fortify-headers (1.1-r5)
(17/18) Installing patch (2.7.6-r10)
(18/18) Installing build-base (0.5-r3)
Executing busybox-1.37.0-r8.trigger
OK: 305 MiB in 85 packages
error: externally-managed-environment
× This environment is externally managed
╰─> 
    The system-wide python installation should be maintained using the system
    package manager (apk) only.
    If the package in question is not packaged already (and hence installable via
    "apk add py3-somepackage"), please consider installing it inside a virtual
    environment, e.g.:
    python3 -m venv /path/to/venv
    . /path/to/venv/bin/activate
    pip install mypackage
    To exit the virtual environment, run:
    deactivate
    The virtual environment is not deleted, and can be re-entered by re-sourcing
    the activate file.
    To automatically manage virtual environments, consider using pipx (from the
    pipx package).
note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
hint: See PEP 668 for the detailed specification.
 ---> Removed intermediate container a7d00acf89b3

bezüglich der Logs
ich finde die beschriebene Lösung gut. ich würde dann den entsprechenden Ordner per config.yaml mounten. (commit folgt). wenn Bedarf besteht könnte man die Anzahl der Tage für das aufbewahren der logs auch über eine option im UI konfigurieren.

zum slug name
ich weiß zwar inzwischen wie sich dieser zusammensetzt aber noch nicht wie die variable lautet in der es gespeichert ist. es gibt zwar ne option wie man per API ne liste aller addons und deren slug bekommt aber weiter bin ich noch nicht gekommen.
wenn wir den Ordner (egal wie wir ihn nennen wollen) unter Homeassistant OS mounten wird er immer unter dem slug Namen gemounted (57ce88f2_tsun-proxy bzw. local_tsun-proxy).

@s-allius
Copy link
Owner Author

s-allius commented Dec 15, 2024

Interessant, keine Ahnung warum das bei mir durchläuft. Dann setze ich jetzt doch noch ein pyenv im Container auf.

@s-allius
Copy link
Owner Author

@mime24 : Probier mal ob es jetzt wieder geht. Habe python nun in opt/vent/ installiert.

@s-allius
Copy link
Owner Author

Im dev-0.12 branch erzeuge ich die config.yaml aus einem Template. Dazu gibt es jetzt im Verzeichnis ha_addons/templates ein config.jinjaFile, welches je nach Stage (rel,dev, debug) mit den Werten aus den *_data.json files ausgefüllt wird.
Ich merge das jetzt hier in den Branch zurück und übernehme deine Ändert an der config.yaml in die config.jinja

@mime24
Copy link
Collaborator

mime24 commented Dec 15, 2024

ja geht.

@s-allius
Copy link
Owner Author

So, der merge aus dem dev-0.12 in diesen Branch ist auch durch. Somit ist jetzt alles auf einen einheitlichen Stand

@s-allius
Copy link
Owner Author

@mime24 Ich habe jetzt noch die Werte advanced und stage in der config.yaml gesetzt. Damit dürften im Repository die Debug und Dev Versionen nur noch angezeigt werden, wenn der Anwender Advanced Mode eingeschaltet hat.

Der Proxy hat auch einen Health check und diesen kann man vermutlich auch im add-on nutzen. Ich kann es hier aber nicht testen. Auf dem Port 8127 läuft ein kleiner Webserver, der den Status ausgibt. Vermutlich muss so eine Zeile in die config.jinja Datei:

watchdog: "http://127.0.0.1:8127/-/healthy"

Da es keine weiteren Webseiten auf dem Port gibt, kann der vermutlich auch aus der ports Liste in der config.jinja raus. Der Watchdog sollte dann trotzdem noch laufen

@mime24
Copy link
Collaborator

mime24 commented Dec 15, 2024

Watchdog ist eingebaut und wird bei mir auch erkannt.
Port ist im Mapping dann nicht mehr erforderlich.

Habe jedoch seltsame Fehlermeldungen wenn ich das Addon gezielt stoppe. Muss mal vergleichen

@mime24
Copy link
Collaborator

mime24 commented Dec 15, 2024

hmm. bei anderen addon passiert dieser Fehler nicht.

2024-12-15 20:24:46.863 INFO (SyncWorker_1) [supervisor.docker.manager] Stopping addon_local_tsun-proxy application
2024-12-15 20:24:50.483 INFO (SyncWorker_1) [supervisor.docker.manager] Cleaning addon_local_tsun-proxy application
2024-12-15 20:24:50.496 ERROR (MainThread) [asyncio] Task exception was never retrieved
future: <Task finished name='Task-14254838' coro=<Addon.watchdog_container() done, defined at /usr/src/supervisor/supervisor/addons/addon.py:1491> exception=AddonsJobError('Rate limit exceeded, more than 10 calls in 0:30:00')>
Traceback (most recent call last):
  File "/usr/src/supervisor/supervisor/addons/addon.py", line 1505, in watchdog_container
    await self._restart_after_problem(event.state)
  File "/usr/src/supervisor/supervisor/jobs/decorator.py", line 291, in wrapper
    raise on_condition(
supervisor.exceptions.AddonsJobError: Rate limit exceeded, more than 10 calls in 0:30:00

@s-allius
Copy link
Owner Author

Das. sieht so aus, dass der Proxy nicht stopped und nach 10 Sekunden der Supervisor ihn abschaltet. Eigentlich müsste da ein Signal SIGINToder SIGTERMan den Proxy geschickt werden. Dies bekommt die aber nur, wenn er mit der PID 1 läuft. Wenn das nicht so ist müssen wir dies im Entrypoint run.sh fixen.

Läuft der Proxy im Container bei dir mit PID 1? Ist dies bei den anderen AddOns anders?

@s-allius
Copy link
Owner Author

Ich habe mal geschaut, wie es aussieht auf einem normalen Server (ohne HA), da gestartet der Proxy. Aber auch hier läuft er nicht mit der PID 1 was aber anscheinend durch das Basis Image gelöst wird:

MQTT not found
Start Proxyserver...
'2024-12-15 20:41:40  INFO | root | Server "proxy - 0.12.0-dev" will be started'
'2024-12-15 20:41:40  INFO | root | config_path: /homeassistant/tsun-proxy/'
'2024-12-15 20:41:40  INFO | root | json_config: /data/options.json'
'2024-12-15 20:41:40  INFO | root | toml_config: None'
'2024-12-15 20:41:40  INFO | root | log_path:    /homeassistant/tsun-proxy/logs/'
'2024-12-15 20:41:40  INFO | root | log_backups: 2 days'
'2024-12-15 20:41:40  INFO | root | LOG_LVL    : INFO'
'2024-12-15 20:41:40  INFO | root | ******'
'2024-12-15 20:41:40  INFO | root | Read from default_config.toml => ok'
'2024-12-15 20:41:40  INFO | root | Read from Read environment => ok'
'2024-12-15 20:41:40  INFO | root | Read from /homeassistant/tsun-proxy/config.json => n/a'
'2024-12-15 20:41:40  INFO | root | Read from /homeassistant/tsun-proxy/config.toml => n/a'
'2024-12-15 20:41:40  INFO | root | Read from /data/options.json => ok'
'2024-12-15 20:41:40  INFO | root | ******'
'2024-12-15 20:41:40  INFO | mqtt | start MQTT: host:mqtt  port:1883  user:None'
'2024-12-15 20:41:40  INFO | root | HTTP server listen on port: 8127'
'2024-12-15 20:41:45  INFO | mqtt | MQTT is unconfigured; Check your config.toml!'
s6-rc: info: service legacy-services: stopping
s6-rc: info: service legacy-services successfully stopped
s6-rc: info: service legacy-cont-init: stopping
s6-rc: info: service legacy-cont-init successfully stopped
s6-rc: info: service fix-attrs: stopping
s6-rc: info: service base-addon-log-level: stopping
s6-rc: info: service fix-attrs successfully stopped
s6-rc: info: service base-addon-log-level successfully stopped
s6-rc: info: service base-addon-banner: stopping
s6-rc: info: service base-addon-banner successfully stopped
s6-rc: info: service s6rc-oneshot-runner: stopping
s6-rc: info: service s6rc-oneshot-runner successfully stopped
'2024-12-15 20:41:46  INFO | root | Shutdown due to SIGTERM'
'2024-12-15 20:41:46  INFO | root | Proxy disconnecting done'
'2024-12-15 20:41:46  INFO | root | HTTP server cancelled'
'2024-12-15 20:41:46  INFO | root | Event loop is stopped'
'2024-12-15 20:41:46  INFO | root | Close MQTT Task'
'2024-12-15 20:41:46  INFO | root | Finally, exit Server "proxy"'
s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service base-addon-banner: starting
curl: (6) Could not resolve host: supervisor
[20:42:02] ERROR: Something went wrong contacting the API
s6-rc: info: service base-addon-banner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service base-addon-log-level: starting
s6-rc: info: service fix-attrs successfully started
s6-rc: info: service base-addon-log-level successfully started
s6-rc: info: service legacy-cont-init: starting
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service legacy-services: starting
s6-rc: info: service legacy-services successfully started
Add-on environment started
check for Home Assistant MQTT
MQTT not found
Start Proxyserver...
'2024-12-15 20:42:03  INFO | root | Server "proxy - 0.12.0-dev" will be started'
'2024-12-15 20:42:03  INFO | root | config_path: /homeassistant/tsun-proxy/'
'2024-12-15 20:42:03  INFO | root | json_config: /data/options.json'
'2024-12-15 20:42:03  INFO | root | toml_config: None'
'2024-12-15 20:42:03  INFO | root | log_path:    /homeassistant/tsun-proxy/logs/'
'2024-12-15 20:42:03  INFO | root | log_backups: 2 days'
'2024-12-15 20:42:03  INFO | root | LOG_LVL    : INFO'
'2024-12-15 20:42:03  INFO | root | ******'
'2024-12-15 20:42:03  INFO | root | Read from default_config.toml => ok'
'2024-12-15 20:42:03  INFO | root | Read from Read environment => ok'
'2024-12-15 20:42:03  INFO | root | Read from /homeassistant/tsun-proxy/config.json => n/a'
'2024-12-15 20:42:03  INFO | root | Read fr

Die Timeout bei mir kommen wohl weil ich keine Supervisor laufen habe...

@mime24
Copy link
Collaborator

mime24 commented Dec 15, 2024

Wenn ich es recht verstehe läuft PID 79. da spielt aber das base Image und das s6 noch eine entscheidende Rolle.

Schalte ich den Watchdog in der Add-On Konsole aus. Kommt die Meldung jedoch nicht und alles scheint korrekt beendet zu werden.

@s-allius
Copy link
Owner Author

Ok, die PID sollte auch egal sein, da der S6-rc die Signale weiterleitet. Evtl erwartet der Watchdog eine Statewechsel? Da muss man ja was finden, wie es laufen soll

@mime24
Copy link
Collaborator

mime24 commented Dec 15, 2024

Bin da heute nicht mehr weitergekommen

@s-allius
Copy link
Owner Author

Vielleicht sollten wir denn Watchdog für die erste Version erstmal deaktivieren.

@s-allius
Copy link
Owner Author

Ich habe den watchdog erstmal disabled und ein ticket angelegt:
#249

@s-allius s-allius merged commit 181a22c into dev-0.12 Dec 17, 2024
6 checks passed
@s-allius s-allius deleted the s-allius/issue215 branch December 17, 2024 21:09
s-allius added a commit that referenced this pull request Dec 22, 2024
* add ha_addons repository to cscode workspace

* Issue220 ha addon dokumentation update (#232)

* initial DOCS.md for Addon

* links to Mosquitto and Adguard

* replaced _ by . for PV-Strings

* mentioned add-on installation method in README.md

* fix most of the markdown linter warnings

* add missing alt texts

* added nice add repository to my Home Assistant badges

---------

Co-authored-by: Michael Metz <[email protected]>
Co-authored-by: Stefan Allius <[email protected]>

* S allius/issue216 (#235)


* improve docker run

- establish multistage Dockerfile
- build a python wheel for all needed packages
- remove unneeded tools like apk for runtime

* pin versions, fix hadolint warnings

* merge from dev-0.12

---------

Co-authored-by: Michael Metz <[email protected]>

* Issue220 ha addon dokumentation update (#245)

* revised config disclaimer

* add newline at end of file to fix linter warning

---------

Co-authored-by: Michael Metz <[email protected]>

* 238 ha addon repository check (#244)

* move Makefile and bake file into parent folder

* build config.yaml from template

* use Makefile instead of build shell script

* ignore temporary or created files

* add rules for building the add-on repository

* add rel version of add-on

* add  jinja2-cli

* ignore inverter replays which a older than 1 day (#246)

* S allius/issue7 (#248)

* report alarm and fault bitfield to ha

* define the alarm and fault names

* configure log path and max number of daily log files (#243)

* configure log path and max number of daily log files

* don't use a subfolder for configs

* use make instead of a build script

* mount /homeassistant/tsun-proxy

* Add venv to base image

* give write access to mounted folder

* intial checkin, ignore SC1091

* set advanced and stage value in config.yaml

* fix typo

* added watchdog and removed Port 8127 from mapping

* fixed typo and use new add-on repro

- change the install button to install from
 https://github.com/s-allius/ha-addons

* add addon-rel target

* disable watchdog due to exceptions in the ha supervisor

* update changelog

---------

Co-authored-by: Michael Metz <[email protected]>

* Update README.md (#251)

install `https://github.com/s-allius/ha-addons` as repro for our add-on

* add german language file (#253)

* fix return type get_extra_info in FakeWriter

* move global startup code into main methdod

* pin version of base image

* avoid forwarding to a private (lokal) IP addr (#256)

* avoid forwarding to a private (lokal) IP addr

* test DNS resolver issues

* increase test coverage

* update changelog

* fix client_mode configuration block (#252)

* fix client_mode block

* add client mode

* fix tests with client_mode values

* log client_mode configuration

* add forward flag for client_mode

* improve startup logging

* added client_mode example

* adjusted translation files

* AT commands added

* typo

* missing "PLUS"

* link to config details

* improve log msg for config problems

* improve log msg on config errors

* improve log msg for config problems

* copy CHANGELOG.md into add-on repro

---------

Co-authored-by: Michael Metz <[email protected]>

* rename "ConfigErr" to match naming convention

* disable test coverage for __main__

* update changelog version 0.12

---------

Co-authored-by: metzi <[email protected]>
Co-authored-by: Michael Metz <[email protected]>
s-allius added a commit that referenced this pull request Dec 22, 2024
* add ha_addons repository to cscode workspace

* Issue220 ha addon dokumentation update (#232)

* initial DOCS.md for Addon

* links to Mosquitto and Adguard

* replaced _ by . for PV-Strings

* mentioned add-on installation method in README.md

* fix most of the markdown linter warnings

* add missing alt texts

* added nice add repository to my Home Assistant badges

---------

Co-authored-by: Michael Metz <[email protected]>
Co-authored-by: Stefan Allius <[email protected]>

* S allius/issue216 (#235)


* improve docker run

- establish multistage Dockerfile
- build a python wheel for all needed packages
- remove unneeded tools like apk for runtime

* pin versions, fix hadolint warnings

* merge from dev-0.12

---------

Co-authored-by: Michael Metz <[email protected]>

* Issue220 ha addon dokumentation update (#245)

* revised config disclaimer

* add newline at end of file to fix linter warning

---------

Co-authored-by: Michael Metz <[email protected]>

* 238 ha addon repository check (#244)

* move Makefile and bake file into parent folder

* build config.yaml from template

* use Makefile instead of build shell script

* ignore temporary or created files

* add rules for building the add-on repository

* add rel version of add-on

* add  jinja2-cli

* ignore inverter replays which a older than 1 day (#246)

* S allius/issue7 (#248)

* report alarm and fault bitfield to ha

* define the alarm and fault names

* configure log path and max number of daily log files (#243)

* configure log path and max number of daily log files

* don't use a subfolder for configs

* use make instead of a build script

* mount /homeassistant/tsun-proxy

* Add venv to base image

* give write access to mounted folder

* intial checkin, ignore SC1091

* set advanced and stage value in config.yaml

* fix typo

* added watchdog and removed Port 8127 from mapping

* fixed typo and use new add-on repro

- change the install button to install from
 https://github.com/s-allius/ha-addons

* add addon-rel target

* disable watchdog due to exceptions in the ha supervisor

* update changelog

---------

Co-authored-by: Michael Metz <[email protected]>

* Update README.md (#251)

install `https://github.com/s-allius/ha-addons` as repro for our add-on

* add german language file (#253)

* fix return type get_extra_info in FakeWriter

* move global startup code into main methdod

* pin version of base image

* avoid forwarding to a private (lokal) IP addr (#256)

* avoid forwarding to a private (lokal) IP addr

* test DNS resolver issues

* increase test coverage

* update changelog

* fix client_mode configuration block (#252)

* fix client_mode block

* add client mode

* fix tests with client_mode values

* log client_mode configuration

* add forward flag for client_mode

* improve startup logging

* added client_mode example

* adjusted translation files

* AT commands added

* typo

* missing "PLUS"

* link to config details

* improve log msg for config problems

* improve log msg on config errors

* improve log msg for config problems

* copy CHANGELOG.md into add-on repro

---------

Co-authored-by: Michael Metz <[email protected]>

* rename "ConfigErr" to match naming convention

* disable test coverage for __main__

* update changelog version 0.12

---------

Co-authored-by: metzi <[email protected]>
Co-authored-by: Michael Metz <[email protected]>
s-allius added a commit that referenced this pull request Dec 22, 2024
* add ha_addons repository to cscode workspace

* Issue220 ha addon dokumentation update (#232)

* initial DOCS.md for Addon

* links to Mosquitto and Adguard

* replaced _ by . for PV-Strings

* mentioned add-on installation method in README.md

* fix most of the markdown linter warnings

* add missing alt texts

* added nice add repository to my Home Assistant badges

---------

Co-authored-by: Michael Metz <[email protected]>
Co-authored-by: Stefan Allius <[email protected]>

* S allius/issue216 (#235)


* improve docker run

- establish multistage Dockerfile
- build a python wheel for all needed packages
- remove unneeded tools like apk for runtime

* pin versions, fix hadolint warnings

* merge from dev-0.12

---------

Co-authored-by: Michael Metz <[email protected]>

* Issue220 ha addon dokumentation update (#245)

* revised config disclaimer

* add newline at end of file to fix linter warning

---------

Co-authored-by: Michael Metz <[email protected]>

* 238 ha addon repository check (#244)

* move Makefile and bake file into parent folder

* build config.yaml from template

* use Makefile instead of build shell script

* ignore temporary or created files

* add rules for building the add-on repository

* add rel version of add-on

* add  jinja2-cli

* ignore inverter replays which a older than 1 day (#246)

* S allius/issue7 (#248)

* report alarm and fault bitfield to ha

* define the alarm and fault names

* configure log path and max number of daily log files (#243)

* configure log path and max number of daily log files

* don't use a subfolder for configs

* use make instead of a build script

* mount /homeassistant/tsun-proxy

* Add venv to base image

* give write access to mounted folder

* intial checkin, ignore SC1091

* set advanced and stage value in config.yaml

* fix typo

* added watchdog and removed Port 8127 from mapping

* fixed typo and use new add-on repro

- change the install button to install from
 https://github.com/s-allius/ha-addons

* add addon-rel target

* disable watchdog due to exceptions in the ha supervisor

* update changelog

---------

Co-authored-by: Michael Metz <[email protected]>

* Update README.md (#251)

install `https://github.com/s-allius/ha-addons` as repro for our add-on

* add german language file (#253)

* fix return type get_extra_info in FakeWriter

* move global startup code into main methdod

* pin version of base image

* avoid forwarding to a private (lokal) IP addr (#256)

* avoid forwarding to a private (lokal) IP addr

* test DNS resolver issues

* increase test coverage

* update changelog

* fix client_mode configuration block (#252)

* fix client_mode block

* add client mode

* fix tests with client_mode values

* log client_mode configuration

* add forward flag for client_mode

* improve startup logging

* added client_mode example

* adjusted translation files

* AT commands added

* typo

* missing "PLUS"

* link to config details

* improve log msg for config problems

* improve log msg on config errors

* improve log msg for config problems

* copy CHANGELOG.md into add-on repro

---------

Co-authored-by: Michael Metz <[email protected]>

* rename "ConfigErr" to match naming convention

* disable test coverage for __main__

* update changelog version 0.12

---------

Co-authored-by: metzi <[email protected]>
Co-authored-by: Michael Metz <[email protected]>
s-allius added a commit that referenced this pull request Dec 24, 2024
* add ha_addons repository to cscode workspace

* Issue220 ha addon dokumentation update (#232)

* initial DOCS.md for Addon

* links to Mosquitto and Adguard

* replaced _ by . for PV-Strings

* mentioned add-on installation method in README.md

* fix most of the markdown linter warnings

* add missing alt texts

* added nice add repository to my Home Assistant badges

---------

Co-authored-by: Michael Metz <[email protected]>
Co-authored-by: Stefan Allius <[email protected]>

* S allius/issue216 (#235)


* improve docker run

- establish multistage Dockerfile
- build a python wheel for all needed packages
- remove unneeded tools like apk for runtime

* pin versions, fix hadolint warnings

* merge from dev-0.12

---------

Co-authored-by: Michael Metz <[email protected]>

* Issue220 ha addon dokumentation update (#245)

* revised config disclaimer

* add newline at end of file to fix linter warning

---------

Co-authored-by: Michael Metz <[email protected]>

* 238 ha addon repository check (#244)

* move Makefile and bake file into parent folder

* build config.yaml from template

* use Makefile instead of build shell script

* ignore temporary or created files

* add rules for building the add-on repository

* add rel version of add-on

* add  jinja2-cli

* ignore inverter replays which a older than 1 day (#246)

* S allius/issue7 (#248)

* report alarm and fault bitfield to ha

* define the alarm and fault names

* configure log path and max number of daily log files (#243)

* configure log path and max number of daily log files

* don't use a subfolder for configs

* use make instead of a build script

* mount /homeassistant/tsun-proxy

* Add venv to base image

* give write access to mounted folder

* intial checkin, ignore SC1091

* set advanced and stage value in config.yaml

* fix typo

* added watchdog and removed Port 8127 from mapping

* fixed typo and use new add-on repro

- change the install button to install from
 https://github.com/s-allius/ha-addons

* add addon-rel target

* disable watchdog due to exceptions in the ha supervisor

* update changelog

---------

Co-authored-by: Michael Metz <[email protected]>

* Update README.md (#251)

install `https://github.com/s-allius/ha-addons` as repro for our add-on

* add german language file (#253)

* fix return type get_extra_info in FakeWriter

* move global startup code into main methdod

* pin version of base image

* avoid forwarding to a private (lokal) IP addr (#256)

* avoid forwarding to a private (lokal) IP addr

* test DNS resolver issues

* increase test coverage

* update changelog

* fix client_mode configuration block (#252)

* fix client_mode block

* add client mode

* fix tests with client_mode values

* log client_mode configuration

* add forward flag for client_mode

* improve startup logging

* added client_mode example

* adjusted translation files

* AT commands added

* typo

* missing "PLUS"

* link to config details

* improve log msg for config problems

* improve log msg on config errors

* improve log msg for config problems

* copy CHANGELOG.md into add-on repro

---------

Co-authored-by: Michael Metz <[email protected]>

* rename "ConfigErr" to match naming convention

* disable test coverage for __main__

* update changelog version 0.12

* Merge branch 'main' of https://github.com/s-allius/tsun-gen3-proxy

* copy the run.sh scripts into the add-on repros

* set image path using jinja template

* fix wiki pathss

---------

Co-authored-by: metzi <[email protected]>
Co-authored-by: Michael Metz <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants