* setup logger for hypercorn and dashboard
* use logger.ini to setup dashboard logger
* workaround: restore the hypercorn logger config
- quart/hyercorn overwrites the logger config.
as a workaround we restore the config at the
beginning of a request
* fix the hypercorn log handler only once
* change proxy into a ASGI application
- move Quart init from server.py into app.py
- create Server class for config and loggin setup
- restore hypercorn logging configuration after
start of Quart/Hypercorn
* move get_log_level into Server class
* define config in test_emu_init_close
* remove Web() instance from the testcase
- with importing app.py The blueprint Web() will
automatically created and a second call in test-
cases must avoided
* add unit tests
* move code from app.py into server.py
* test the init_logging_system() method
* add HypercornLogHndl tests
* fix deprecated pytest async warning
- Cleanup pending async tasks
- fix deprecated warning about event_loop
* add unit test for error handling in build_config()
* coverage: ignore quart template files
* check print output in test_save_and_restore
* update changelog
* add button for languages setting
* build a web module for the dashboard
- load all python module from local dir
- initialize Blueprint and Babel
* set a default key for secure cookies
* add translations to docker container
* improve translation build
- clean target erases the *.pot
- don't modify the resurt of url_for() calls
- don't translate the language description
* translate connection table, fix icon
* build relative urls for HA ingress
* fix unit test, increase coverage
* add optional java script to fetch data regullary
* change file extension to `html.j2` for templates
* fix route for fetch data
- for running in iframes (e.g. HA ingress) we must
use relative path in the URLs
* increase test coverage
* remove unused statements
* ignore translation and log files
* add quart-babel
* build and install translation files
* don't export the web-ui port 8127
- for security reason the user should use the
HA ingress and not the direkt access to the web
dashboard
* set 'lang' in html tag
* configure path to web files for Quart
* copy web-file into the add-on container
* add test template and stylesheet
* add w3.css dashboard
* fix unit test for test dashboard
* add Roboto font
* add awesome web font
* add all favicon formats
* load fonts locally
* adapt unit tests
* add all font and favicons to add-on
* fix sonarqube warnings
* add unit tests for all favicons
* fix link
(cherry picked from commit 3d422f9249)
* update compose help link
(cherry picked from commit 6d4ff0d508)
* fix link
(cherry picked from commit 3d422f9249)
* fix rel build run
* Update ghcr.io/hassio-addons/base Docker tag to v17.2.3
* Update ghcr.io/hassio-addons/base Docker tag to v17.2.4
---------
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Stefan Allius <stefan.allius@t-online.de>
* accept DCU serial number starting with '410'
* determine sensor-list by serial number
* adapt unit test for DCU support
* send first batterie measurements to home assistant
* add test case for sensor-list==3036
* add more registers for batteries
* improve error logging (Monitoring SN)
* update the add-on repro only for one stage
* add configuration for energie storages
* add License and Readme file to the add-on
* addon: add date and time to dev and debug docker container tag
* disable duplicate code check for config.py
* cleanup unit test, remove trailing whitespaces
* update changelog
* fix example config for batteries
* cleanup config.jinja template
* fix comments
* improve help texts
* remove apostrophes from fmt strings
- thanks to @onkelenno for the suggestion
* improve the logger initializing
- don't overwrite the logging.ini settings if the
env variable LOG_LVL isn't well defined
- Thanks to @onkelenno for the idea to improve
* set default argument for LOG_LVL to INFO in docker files
* adapt unit test
* bump version to 0.12.1
* add initial version for release candidates
* add rc version
* version 0.12.1
* addon: bump base image version to v17.1.0
* 270 ha addon add syntax check to config parameters (#274)
* fixed requirement status of client mode host
---------
Co-authored-by: Michael Metz <michael.metz@siemens.com>
---------
Co-authored-by: metzi <147942647+mime24@users.noreply.github.com>
Co-authored-by: Michael Metz <michael.metz@siemens.com>
* quotation marks removed from monitor_sn
* validation for serial, ports and client_mode_host
* removed TODO:
* allow only serial with 16 digit and starting with R17, Y17, Y47
---------
Co-authored-by: Michael Metz <michael.metz@siemens.com>
* 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 <michael.metz@siemens.com>
Co-authored-by: Stefan Allius <stefan.allius@t-online.de>
* 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 <michael.metz@siemens.com>
* Issue220 ha addon dokumentation update (#245)
* revised config disclaimer
* add newline at end of file to fix linter warning
---------
Co-authored-by: Michael Metz <michael.metz@siemens.com>
* 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 <michael.metz@siemens.com>
* 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 <michael.metz@siemens.com>
* 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 <147942647+mime24@users.noreply.github.com>
Co-authored-by: Michael Metz <michael.metz@siemens.com>
* 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 <michael.metz@siemens.com>
Co-authored-by: Stefan Allius <stefan.allius@t-online.de>
* 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 <michael.metz@siemens.com>
* Issue220 ha addon dokumentation update (#245)
* revised config disclaimer
* add newline at end of file to fix linter warning
---------
Co-authored-by: Michael Metz <michael.metz@siemens.com>
* 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 <michael.metz@siemens.com>
* 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 <michael.metz@siemens.com>
* rename "ConfigErr" to match naming convention
* disable test coverage for __main__
* update changelog version 0.12
---------
Co-authored-by: metzi <147942647+mime24@users.noreply.github.com>
Co-authored-by: Michael Metz <michael.metz@siemens.com>
* add some reader classes to get the configuration
* adapt unittests
* get config from json or toml file
* loop over all config readers to get the configuration
* rename config test files
* use relative paths for coverage test in vscode
* do not throw an error for missing config files
* remove obsolete tests
* use dotted key notation for pv sub dictonary
* log config reading progress
* remove create_config_toml.py
* remove obsolete tests for the ha_addon
* disable mosquitto tests if the server is down
* ignore main method for test coverage
* increase test coverage
* pytest-cov: use relative_files only on github, so coverage will work with vscode locally
* remove unneeded imports
* add missing test cases
* disable branch coverage, cause its not reachable
* update changelog
* add addon-dev target
* initial version
* use prebuild docker image
* initial version for multi arch images
* fix missing label latest
* create log and config folder first.
* clean up and translate to english
* set labels with docker bake
* add addon-debug and addon-dev targets
* pass version number to proxy at runtime
* add two more callbacks
* get addon version from app
* deploy rc addon container to ghcr
* move ha_addon test into subdir
* fix crash on container restart
- mkdir -p returns no error even if the director
exists
* prepation for unit testing
- move script into a method
* added further config to schema
* typo fixed
* added monitor_sn + PV-strings 3-6 to create toml
* added options.json for testing
* prepare pytest and coverage for addons
* fix missing values in resulting config.toml
- define mqtt default values
- convert filter configuration
* first running unittest for addons
* add ha_addons
* increase test coverage
* test empty options.json file for HA AddOn
* fix pytest call in terminal
* improve test coverage
* remove uneeded options.json
* move config.py into subdir cnf
---------
Co-authored-by: Michael Metz <michael.metz@siemens.com>