* Fix logging configuration issues that made logging stop operation. Switch to Loguru
logging (from Python logging). Enable console and file logging with different log levels.
Add logging documentation.
* Fix logging configuration and EOS configuration out of sync. Added tracking support
for nested value updates of Pydantic models. This used to update the logging configuration
when the EOS configurationm for logging is changed. Should keep logging config and EOS
config in sync as long as all changes to the EOS logging configuration are done by
set_nested_value(), which is the case for the REST API.
* Fix energy management task looping endlessly after the second update when trying to update
the last_update datetime.
* Fix get_nested_value() to correctly take values from the dicts in a Pydantic model instance.
* Fix usage of model classes instead of model instances in nested value access when evaluation
the value type that is associated to each key.
* Fix illegal json format in prediction documentation for PVForecastAkkudoktor provider.
* Fix documentation qirks and add EOS Connect to integrations.
* Support deprecated fields in configuration in documentation generation and EOSdash.
* Enhance EOSdash demo to show BrightSky humidity data (that is often missing)
* Update documentation reference to German EOS installation videos.
Signed-off-by: Bobby Noelte <b0661n0e17e@gmail.com>
Added bandit checks to continuous integration.
Updated sources to pass bandit checks:
- replaced asserts
- added timeouts to requests
- added checks for process command execution
- changed to 127.0.0.1 as default IP address for EOS and EOSdash for security reasons
Added a rudimentary check for outdated config files.
BREAKING CHANGE: Default IP address for EOS and EOSdash changed to 127.0.0.1
Signed-off-by: Bobby Noelte <b0661n0e17e@gmail.com>
Improve config page to edit actual configuration used by EOS.
Add admin page to save the actual configuration to the configuration file.
Signed-off-by: Bobby Noelte <b0661n0e17e@gmail.com>
Make EOSdash use UI components from MonsterUI to ease further development.
- Add a first menu with some dummy pages and the configuration page.
- Make the configuration scrollable.
- Add markdown component that uses markdown-it-py (same as used by
the myth-parser for documentation generation).
- Add bokeh (https://docs.bokeh.org/) component for charts
- Added several prediction charts to demo
- Add a footer that displays connection status with EOS server
- Add logo and favicon
Update EOS server:
- Move error message generation to extra module
- Use redirect instead of proxy
Signed-off-by: Bobby Noelte <b0661n0e17e@gmail.com>
* Move the caching module to core.
Add an in memory cache that for caching function and method results
during an energy management run (optimization run). Two decorators
are provided for methods and functions.
* Improve the file cache store by load and save functions.
Make EOS load the cache file store on startup and save it on shutdown.
Add a cyclic task that cleans the cache file store from outdated cache files.
* Improve startup of EOSdash by EOS
Make EOS starting EOSdash adhere to path configuration given in EOS.
The whole environment from EOS is now passed to EOSdash.
Should also prevent test errors due to unwanted/ wrong config file creation.
Both servers now provide a health endpoint that can be used to detect whether
the server is running. This is also used for testing now.
* Improve startup of EOS
EOS now has got an energy management task that runs shortly after startup.
It tries to execute energy management runs with predictions newly fetched
or initialized from cached data on first run.
* Improve shutdown of EOS
EOS has now a shutdown task that shuts EOS down gracefully with some
time delay to allow REST API requests for shutdwon or restart to be fully serviced.
* Improve EMS
Add energy management task for repeated energy management controlled by
startup delay and interval configuration parameters.
Translate EnergieManagementSystem to english EnergyManagement.
* Add administration endpoints
- endpoints to control caching from REST API.
- endpoints to control server restart (will not work on Windows) and shutdown from REST API
* Improve doc generation
Use "\n" linenend convention also on Windows when generating doc files.
Replace Windows specific 127.0.0.1 address by standard 0.0.0.0.
* Improve test support (to be able to test caching)
- Add system test option to pytest for running tests with "real" resources
- Add new test fixture to start server for test class and test function
- Make kill signal adapt to Windows/ Linux
- Use consistently "\n" for lineends when writing text files in doc test
- Fix test_logging under Windows
- Fix conftest config_default_dirs test fixture under Windows
From @Lasall
* Improve Windows support
- Use 127.0.0.1 as default config host (model defaults) and
addionally redirect 0.0.0.0 to localhost on Windows (because default
config file still has 0.0.0.0).
- Update install/startup instructions as package installation is
required atm.
Signed-off-by: Bobby Noelte <b0661n0e17e@gmail.com>
* Docker: Copy the same directory structure (src/) to support the
lifespan startup of EOSdash.
Use EOS_SERVER_EOSDASH_SESSKEY environment variable to provide
EOSdash with session key.
* All config now nested.
- Use default config from model field default values. If providers
should be enabled by default, non-empty default config file could
be provided again.
- Environment variable support with EOS_ prefix and __ between levels,
e.g. EOS_SERVER__EOS_SERVER_PORT=8503 where all values are case
insensitive.
For more information see:
https://docs.pydantic.dev/latest/concepts/pydantic_settings/#parsing-environment-variable-values
- Use devices as registry for configured devices. DeviceBase as base
class with for now just initializion support (in the future expand
to operations during optimization).
- Strip down ConfigEOS to the only configuration instance. Reload
from file or reset to defaults is possible.
* Fix multi-initialization of derived SingletonMixin classes.
Revert to EOSdash startup as a sub-process.
Add arguments to control the complete startup of both servers.
Also development reload can now be given as an argument.
Signed-off-by: Bobby Noelte <b0661n0e17e@gmail.com>
Rename FastAPI server to `eos` and FastHTML server to `eosdash`.
Make an user easily identify what server is meant. FastAPI and FastHTML are
implementation details that may confuse the non-technical user.
Signed-off-by: Bobby Noelte <b0661n0e17e@gmail.com>