* Update dependency pytest-asyncio to v1
* set version to 0.15.0
* Update dependency pytest-asyncio to v1
---------
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Stefan Allius <stefan.allius@t-online.de>
* Update change log (#436)
* S allius/issue427 (#434)
* mock the aiomqtt library and increse coverage
* test inv response for a mb scan request
* improve test coverage
* S allius/issue427 (#435)
* mock the aiomqtt library and increse coverage
* test inv response for a mb scan request
* improve test coverage
* improve test case
* version 0.14.0
* handle missing MQTT addon
- we have to check if the supervisor API and a
MQTT broker add-on is installed. If not we assume
the user has an external MQTT broker
* handle missing MQTT addon
* run also on releases/* branch
* avoid printing of the MQTT config inkl. password
* revise the log outputs
* update version 0.14.1
* new version 0.14.1
* set no of pv modules for MS800 GEN3PLUS inverters
* fix unit test
* increase test coverage
* change the PV module handling
- in default we set the number of modules now to
two. So with the first data from the inverter
we only register two modules. After we determine
the inverter module, the number can increase to
four and more PV modules will be registered.
With the default value of 4, we register always
4 modules and can't reduce the number of areas
when we detect that the inverter only supoorts
two PV modules
* add dcu_power MQTT topic
* add DCU_COMMAND counter
* test invalid dcu_power values
* handle and test DCU Command responses
* test dcu commands from the TSUN cloud
* cleanup MQTT topic handling
* update changelog
* test MQTT error and exception handling
* increase test coverage
* test dispatcher exceptions
* fix full_topic definition in dispatch test
* Update ghcr.io/hassio-addons/base Docker tag to v17.2.5
---------
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Stefan Allius <stefan.allius@t-online.de>
* 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 Dashboards log handler to all known loggers
* add list of last 3 warnings/errors to page
* add note list to page
* create LogHandler for the dashboard
- simple memory log handler which stores the last
64 warnings/errors for the dashboard
* render warnings/errors as note list
* add page for warnings and errors
* fix double defined build target
* add well done message if no errors in the logs
* translate page titles
* more translations
* add Notes page and table for important messages
* add unit tests
* store logging path in Config class
* rename template files and page files
* jump to referer page
- after changing the language, we jump to
the referer page, if the attribute exists
* build and send list of log-files
* rename Download page into Log files
* initialize log-path in test config
* improve dashboard unit tests
- add log file tests
- check content-languages after language switch
* initialize config structure for log-file tests
* add test log file to project
* add sub_dir to test log path
- non files must be skipped. To test this we add
a sub directory to the test log directory
* add german translations
* set quart debug flag for debug versions
* update changelog
* split register map into multiple maps
* add base support reg mapping 0x01900000
* fix shadowed builtin
* detect reg mapping for sensor automatically
* add device and test regs for MS-3000
* add more register mappings
* fix unit tests
* add more MS-3000 registers
* build modell string for TSUN MS-3000
* add MS3000 unit test
* remove obsolete method __set_config_parms
* fix start addr of modbus scans
- in server mode the start addr must be reduced
by mb_step
* add tests for sensor_list of ms-3000 inverters
* MS-3000: add integer test register
* DCU-1000: add Out Status register
* add integer test and batterie out register
* fix Sonar Qube finding
* DCU-1000: add temp sensors
* 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>
* 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>
* 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>
* - fix pytest setup that can be startet from the rootdir
- support python venv environment
- add pytest.ini
- move common settings from .vscode/settings.json into pytest.ini
- add missing requirements
- fix import paths for pytests
* - support python venv environment
* initial version
* - add missing requirements python-dotenv
* fix import paths for pytests
* fix pytest warnings
* initial version
* report 5 slowest test durations
* add more vscode settings for python
* report alarm and fault bitfield to home assistant
* initial verson of message builder for SolarmanV5
- for SolarmaV5 we build he param field for the
device and inverter message from the internal
database
- added param description to the info table
for constant values, which are not parsed and
stored in internal database
* define constants for often used format strings
* update changelog
* fix healthcheck
- on infrastructure with IPv6 support localhost
might be resolved to an IPv6 adress. Since the
proxy only support IPv4 for now, we replace
localhost by 127.0.0.1, to fix this
* GEN3: After inverter firmware update the 'Unknown Msg Type' increases continuously
Fixes#182
* add support for Controller serial no and MAC
* test hardening
* GEN3: add support for new messages of version 3 firmwares
* bump libraries to latest versions
- bump aiomqtt to version 2.3.0
- bump aiohttp to version 3.10.5
* improve test coverage
* reduce cognective complexity