* Update dependency pytest-asyncio to v1.2.0
* don't stop the event loop between test
set the loop_scope to session for async tests
* remove loop_scope="session"
---------
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Stefan Allius <stefan.allius@t-online.de>
* Save a tast reference
Important: Save a reference of the created task,
to avoid a task disappearing mid-execution. The
event loop only keeps weak references to tasks.
A task that isn’t referenced elsewhere may get
garbage collected at any time, even before it’s
done. For reliable “fire-and-forget” background
tasks, gather them in a collection
* add links to add-on urls
* Add translations
* set app.testing to get exceptions during test
* improve unit-tests for the web-UI
* update changelog
* extend languages tests
* workaround for github runner
* 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
* scan log files for timestamp as creating timestamp
* increase test coverage
* add an empty file for unit tests
- the empty file is needed for unit tests to force
an exception on the try to scan the first line
for an timestamp
* set timezone of scanned creation time
* 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
* display proxy version on dashboard
* add MQTT page
* styles adjusted on the different pages
- use same colors
- add bordered shadow to all cards and tables
* fix unit tests
* migrate the conn table to a general table
- rename the template file
- get headline from table description
* remove footer from index page
* make version string translateable
* cleanup
* remove stripped table rows
* add mqtt info table
* translate mqtt page
* don't fetch notes list for the log-page
* fix Mqtt init call for unit tests
* add mqtt-fetch test
* check received counter in unit test
* add route for log file deletion
* add modal for senity check before file deletion
* add trash icon which unhide the modal
* add more translations
* increase test coverage
* cleanup
* 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
* 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
* design counter on connection board
* display time of last update and add reload button
* chance `Updated` field to a real button
* Provide counter values for the dashboard
* change background color ot the top branch
- use dark-grey instead of black to reduce the contrast
* change color of counter tiles
* test proxy connection counter handling
* prepare conn-table and notes list building
* remove obsolete menue points
* store client mode for dashboard
* store inverters serial number for the dashboard
* store inverters serial number
* build connection table for dashboard
* add connection table to dashboard
* fix responsiveness of the tiles
* adapt unit tests
* remove test fake code
* increase test coverage, remove obsolete if statement
* add optional java script to fetch data regulary
* 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
* update favicon.svg
* 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