Files
EOS/docs/_generated/configgeneral.md
T
3651d33915 perf: import heavy optional dependencies on first use (#1377)
A GENETIC server with external (import) providers and EOSdash disabled
loads several large packages at start that it never uses, which costs
a noticeable part of the memory on 512 MB boards:

- matplotlib via the GENETIC/GENETIC0 PDF report modules (server/eos.py)
- statsmodels via the Holt-Winters fallback in prediction/priceabc.py
- pvlib via the weather base class and the pvlib-based providers
- bs4/lxml via the ClearOutside provider
- scipy via the self-consumption interpolator singletons, which were
  loaded at import time
- the GENETIC0 optimizer, imported by core/ems.py
- tzfpy, whose polygon data the computed general.timezone loads

Import these where they are used. The interpolator tables are loaded
on first use (thread-safe). Nothing changes in what is computed.

general.timezone is computed from latitude/longitude and cannot be set.
Add general.timezone_override (IANA name, validated with pendulum):
when set, general.timezone returns it and the lookup is skipped. When
unset (default) the lookup is unchanged.

Tests that patched the moved names now patch them at their source.
A new test starts the server module in a subprocess and checks that
none of these modules is loaded.

Co-authored-by: Christin <christin@BigBrother.bikini.bottom.zone>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 08:40:43 +02:00

3.6 KiB

General settings

:::{table} general :widths: 10 20 10 5 5 30 :align: left

Name Environment Variable Type Read-Only Default Description
config_file_path Optional[pathlib.Path] ro N/A Path to EOS configuration file.
config_folder_path Optional[pathlib.Path] ro N/A Path to EOS configuration directory.
config_save_interval_sec EOS_GENERAL__CONFIG_SAVE_INTERVAL_SEC int rw 60 Automatic configuration file saving interval [seconds].
config_save_mode EOS_GENERAL__CONFIG_SAVE_MODE <enum 'ConfigSaveMode'> rw AUTOMATIC Configuration file save mode for configuration changes ['MANUAL', 'AUTOMATIC']. Defaults to 'AUTOMATIC'.
data_folder_path EOS_GENERAL__DATA_FOLDER_PATH Path rw required Path to EOS data folder.
data_output_path Optional[pathlib.Path] ro N/A Computed data_output_path based on data_folder_path.
data_output_subpath EOS_GENERAL__DATA_OUTPUT_SUBPATH Optional[pathlib.Path] rw output Sub-path for the EOS output data folder.
home_assistant_addon EOS_GENERAL__HOME_ASSISTANT_ADDON bool rw required EOS is running as home assistant add-on.
latitude EOS_GENERAL__LATITUDE Optional[float] rw 52.52 Latitude in decimal degrees between -90 and 90. North is positive (ISO 19115) (°)
longitude EOS_GENERAL__LONGITUDE Optional[float] rw 13.405 Longitude in decimal degrees within -180 to 180 (°)
timezone Optional[str] ro N/A Timezone: 'timezone_override' if set, else looked up from latitude and longitude.
timezone_override EOS_GENERAL__TIMEZONE_OVERRIDE Optional[str] rw None IANA timezone name, e.g. 'Europe/Berlin'. If set, 'timezone' is this value instead of the timezone looked up from latitude and longitude, and the lookup data (~25 MB) is never loaded. Defaults to None (look up).
version EOS_GENERAL__VERSION Optional[str] rw None Configuration file version.
:::

Example Input

   {
       "general": {
           "config_save_mode": "AUTOMATIC",
           "config_save_interval_sec": 60,
           "version": "0.0.0",
           "data_folder_path": "/home/user/.local/share/net.akkudoktoreos.net",
           "data_output_subpath": "output",
           "latitude": 52.52,
           "longitude": 13.405,
           "timezone_override": null
       }
   }

Example Output

   {
       "general": {
           "config_save_mode": "AUTOMATIC",
           "config_save_interval_sec": 60,
           "version": "0.0.0",
           "data_folder_path": "/home/user/.local/share/net.akkudoktoreos.net",
           "data_output_subpath": "output",
           "latitude": 52.52,
           "longitude": 13.405,
           "timezone_override": null,
           "timezone": "Europe/Berlin",
           "data_output_path": "/home/user/.local/share/net.akkudoktoreos.net/output",
           "config_folder_path": "/home/user/.config/net.akkudoktoreos.net",
           "config_file_path": "/home/user/.config/net.akkudoktoreos.net/EOS.config.json"
       }
   }