### Get System Info Source: https://github.com/fsantini/python-e3dc/blob/master/docs/source/e3dc.md Polls the system information using the RSCP protocol. Use this to retrieve details about the installed system capacity, model, and serial number. ```python from e3dc import E3DC api = E3DC("192.168.1.1") system_info = api.get_system_info() print(system_info) ``` -------------------------------- ### Install Development Requirements Source: https://github.com/fsantini/python-e3dc/blob/master/tools/README.md Installs the pye3dc library with development dependencies. This is typically used for setting up a development environment. ```bash pip install pye3dc[develop] ``` -------------------------------- ### Install Development Dependencies Source: https://github.com/fsantini/python-e3dc/blob/master/README.md Install development dependencies for the E3DC library. This command ensures all necessary packages for development and testing are available. ```bash pip install -U --upgrade-strategy eager .[develop] ``` -------------------------------- ### Get Database Data by Date Source: https://github.com/fsantini/python-e3dc/blob/master/docs/source/e3dc.md Reads database data and summed-up values for a specified timespan using the RSCP protocol. Automatically adjusts the start date to the beginning of the month or year based on the timespan. Use this to fetch historical energy data. ```python get_db_data(startDate=datetime.date(2026, 7, 1), timespan='DAY', keepAlive=False) ``` -------------------------------- ### Get Database Data by Timestamp Source: https://github.com/fsantini/python-e3dc/blob/master/docs/source/e3dc.md Reads database data and summed-up values for a specified duration using the RSCP protocol. Use this to fetch historical energy data when you have a specific start timestamp and duration in seconds. ```python get_db_data_timestamp(startTimestamp=1609459200, timespanSeconds=86400, keepAlive=False) ``` -------------------------------- ### get_pvis Source: https://github.com/fsantini/python-e3dc/blob/master/docs/source/e3dc.md Scans for installed pvis via rscp protocol. Returns a list of found inverters. ```APIDOC ## get_pvis(keepAlive: bool = False) ### Description Scans for installed pvis via rscp protocol. ### Parameters #### Path Parameters * **keepAlive** (bool) - Optional - True to keep connection alive. Defaults to False. ### Response #### Success Response (200) List containing the found pvis as follows.: ```default [ {'index': 0, "phases": 3, "strings": 2, 'type': 3, 'typeName': 'PVI_TYPE_E3DC_E'} ] ``` ``` -------------------------------- ### get_powermeters Source: https://github.com/fsantini/python-e3dc/blob/master/docs/source/e3dc.md Scans for installed power meters via rscp protocol. Returns a list of found power meters. ```APIDOC ## get_powermeters(keepAlive: bool = False) ### Description Scans for installed power meters via rscp protocol. ### Parameters #### Path Parameters * **keepAlive** (bool) - Optional - True to keep connection alive. Defaults to False. ### Response #### Success Response (200) List containing the found powermeters as follows.: ```default [ {'index': 0, 'type': 1, 'typeName': 'PM_TYPE_ROOT'}, {'index': 1, 'type': 4, 'typeName': 'PM_TYPE_ADDITIONAL_CONSUMPTION'} ] ``` ``` -------------------------------- ### Get Power Meter Data (Multiple) Source: https://github.com/fsantini/python-e3dc/blob/master/docs/source/e3dc.md Polls data for multiple power meters via the RSCP protocol. Pass a list of power meter dictionaries. Set keepAlive to True to maintain the connection. ```python from e3dc import E3DC # Example usage: e3dc = E3DC("192.168.1.10", "user", "password") powermeters_data = e3dc.get_powermeters_data(powermeters=[{'index': 0, 'type': 1, 'typeName': 'PM_TYPE_ROOT'}], keepAlive=True) print(powermeters_data) ``` -------------------------------- ### Get Power Settings Source: https://github.com/fsantini/python-e3dc/blob/master/docs/source/e3dc.md Polls the E3DC system via RSCP protocol to retrieve current power settings. This includes limits for charging and discharging, power save status, and weather-dependent settings. Use this to view or manage power configurations. ```python get_power_settings(keepAlive=False) ``` -------------------------------- ### get_system_info() Source: https://github.com/fsantini/python-e3dc/blob/master/docs/source/index.md Retrieves general information about the E3/DC system. ```APIDOC ## get_system_info() ### Description Retrieves general information about the E3/DC system. ### Method `get_system_info()` ### Parameters None ``` -------------------------------- ### toggle_wallbox_phases() Source: https://github.com/fsantini/python-e3dc/blob/master/docs/source/index.md Toggles the number of phases used by the Wallbox for charging. ```APIDOC ## toggle_wallbox_phases() ### Description Toggles the number of phases used by the Wallbox for charging. ### Method `toggle_wallbox_phases()` ### Parameters * **phases** (int) - Required - The number of phases to toggle (e.g., 1 or 3). ``` -------------------------------- ### toggle_wallbox_charging() Source: https://github.com/fsantini/python-e3dc/blob/master/docs/source/index.md Toggles the charging state of the Wallbox (start/stop). ```APIDOC ## toggle_wallbox_charging() ### Description Toggles the charging state of the Wallbox (start/stop). ### Method `toggle_wallbox_charging()` ### Parameters * **enable** (bool) - Required - Whether to start or stop charging. ``` -------------------------------- ### Get Power Meter Data Source: https://github.com/fsantini/python-e3dc/blob/master/docs/source/e3dc.md Polls power meter data using the RSCP protocol. Specify pmIndex to get data for a specific meter, or leave as None for all. Set keepAlive to True to maintain the connection. ```python from e3dc import E3DC # Example usage: e3dc = E3DC("192.168.1.10", "user", "password") powermeter_data = e3dc.get_powermeter_data(pmIndex=0, keepAlive=True) print(powermeter_data) ``` -------------------------------- ### set_wallbox_schuko() Source: https://github.com/fsantini/python-e3dc/blob/master/docs/source/index.md Configures the Wallbox Schuko charging settings. ```APIDOC ## set_wallbox_schuko() ### Description Configures the Wallbox Schuko charging settings. ### Method `set_wallbox_schuko()` ### Parameters * **enable** (bool) - Required - Whether to enable or disable Schuko charging. ``` -------------------------------- ### e3dc.E3DC.get_batteries Source: https://github.com/fsantini/python-e3dc/blob/master/docs/source/e3dc.md Scans for installed batteries via the RSCP protocol. It can optionally keep the connection alive after the scan. ```APIDOC ## get_batteries(keepAlive: bool = False) ### Description Scans for installed batteries via rscp protocol. ### Method N/A (Method of the E3DC class) ### Endpoint N/A (Class method) ### Parameters #### Query Parameters - **keepAlive** (bool) - Optional - True to keep connection alive. Defaults to False. ### Response #### Success Response (200) - **List** (list[dict]) - List containing the found batteries as follows: `[{'index': 0, “dcbs”: 3}]` ### Response Example ```json [ { "index": 0, "dcbs": 3 } ] ``` ``` -------------------------------- ### Run Tests with Docker Script Usage Source: https://github.com/fsantini/python-e3dc/blob/master/tools/README.md Details the usage of the `testcontainers.py` script, which runs tests for multiple Python versions using Docker. It supports both local and web connection parameters. ```bash usage: testcontainers.py [-h] [-l LIST] [-c CONFIGURATION] [-m MODULE] [-v] -u USERNAME -p PASSWORD [-i IPADDRESS] [-k KEY] [-s SERIALNUMBER] E3DC testcontainers options: -h, --help show this help message and exit -l LIST, --list LIST list of Python versions to test with -c CONFIGURATION, --configuration CONFIGURATION configuration of E3DC -m MODULE, --module MODULE specify E3DC module version to be installed for tests. Use local to install from sources -v, --verbose use local E3DC module for test required named arguments: -u USERNAME, --username USERNAME username of E3DC -p PASSWORD, --password PASSWORD password of E3DC required named arguments for local connection: -i IPADDRESS, --ipaddress IPADDRESS IP address of E3DC -k KEY, --key KEY rscp key of E3DC required named arguments for web connection: -s SERIALNUMBER, --serialnumber SERIALNUMBER serialnumber of E3DC ``` -------------------------------- ### set_wallbox_sunmode() Source: https://github.com/fsantini/python-e3dc/blob/master/docs/source/index.md Sets the Wallbox to charge using solar power (sun mode). ```APIDOC ## set_wallbox_sunmode() ### Description Sets the Wallbox to charge using solar power (sun mode). ### Method `set_wallbox_sunmode()` ### Parameters * **enable** (bool) - Required - Whether to enable or disable sun mode. ``` -------------------------------- ### e3dc.E3DC.get_batteries_data Source: https://github.com/fsantini/python-e3dc/blob/master/docs/source/e3dc.md Polls the data for all installed batteries via the RSCP protocol. It can optionally keep the connection alive. ```APIDOC ## get_batteries_data(batteries: list[dict[str, Any]] | None = None, keepAlive: bool = False) ### Description Polls the batteries data via rscp protocol. ### Method N/A (Method of the E3DC class) ### Endpoint N/A (Class method) ### Parameters #### Query Parameters - **batteries** (dict | None) - Optional - batteries dict. - **keepAlive** (bool) - Optional - True to keep connection alive. Defaults to False. ### Response #### Success Response (200) - **List** (list[dict]) - Returns a list of batteries data. ### Response Example ```json [ { "battery_data_field_1": "value1", "battery_data_field_2": "value2" } ] ``` ``` -------------------------------- ### Scan for PVIs Source: https://github.com/fsantini/python-e3dc/blob/master/docs/source/e3dc.md Scans for installed PVIs (inverters) via the RSCP protocol. Set keepAlive to True to maintain the connection. ```python from e3dc import E3DC # Example usage: e3dc = E3DC("192.168.1.10", "user", "password") pvis = e3dc.get_pvis(keepAlive=True) print(pvis) ``` -------------------------------- ### Run Tests Script Usage Source: https://github.com/fsantini/python-e3dc/blob/master/tools/README.md Shows the command-line arguments for the `tests.py` script. This script runs non-altering methods of `pye3dc` for testing purposes. ```bash usage: tests.py [-h] [-c CONFIGURATION] [-m] [-v] -u USERNAME -p PASSWORD [-i IPADDRESS] [-k KEY] [-s SERIALNUMBER] E3DC tests options: -h, --help show this help message and exit -c CONFIGURATION, --configuration CONFIGURATION configuration of E3DC -m, --module use locally installed E3DC module for test -v, --verbose use local E3DC module for test required named arguments: -u USERNAME, --username USERNAME username of E3DC -p PASSWORD, --password PASSWORD password of E3DC required named arguments for local connection: -i IPADDRESS, --ipaddress IPADDRESS IP address of E3DC -k KEY, --key KEY rscp key of E3DC required named arguments for web connection: -s SERIALNUMBER, --serialnumber SERIALNUMBER serialnumber of E3DC ``` -------------------------------- ### get_power_settings() Source: https://github.com/fsantini/python-e3dc/blob/master/docs/source/index.md Retrieves the current power settings of the E3/DC system. ```APIDOC ## get_power_settings() ### Description Retrieves the current power settings of the E3/DC system. ### Method `get_power_settings()` ### Parameters None ``` -------------------------------- ### Scan for Power Meters Source: https://github.com/fsantini/python-e3dc/blob/master/docs/source/e3dc.md Scans for installed power meters via the RSCP protocol. Set keepAlive to True to maintain the connection. ```python from e3dc import E3DC # Example usage: e3dc = E3DC("192.168.1.10", "user", "password") powermeters = e3dc.get_powermeters(keepAlive=True) print(powermeters) ``` -------------------------------- ### get_db_data_timestamp Source: https://github.com/fsantini/python-e3dc/blob/master/docs/source/e3dc.md Retrieves database data and summed-up values for a specified duration using a start timestamp and duration in seconds via the RSCP protocol. ```APIDOC ## get_db_data_timestamp(startTimestamp: int, timespanSeconds: int, keepAlive: bool = False) ### Description Reads DB data and summed up values for the given timespan via rscp protocol. ### Parameters #### Query Parameters - **startTimestamp** (int) - Required - UNIX timestamp from where the db data should be collected. - **timespanSeconds** (int) - Required - Number of seconds for which the data should be collected. - **keepAlive** (bool) - Optional - True to keep connection alive. Defaults to False. ### Response #### Success Response (200) - **autarky** (float) - autarky in the period in % - **bat_power_in** (float) - power entering battery, charging - **bat_power_out** (float) - power leaving battery, discharging - **consumed_production** (float) - power directly consumed in % - **consumption** (float) - self consumed power - **grid_power_in** (float) - power sent into the grid (production) - **grid_power_out** (float) - power taken from the grid (consumption) - **startTimestamp** (int) - timestamp from which db data is fetched of - **stateOfCharge** (float) - battery charge level in % - **solarProduction** (float) - power production - **pm0Production** (float) - power production - **pm1Production** (float) - power production - **timespanSeconds** (int) - timespan in seconds of which db data is collected ### Response Example { "autarky": 75.2, "bat_power_in": 1000.0, "bat_power_out": 700.0, "consumed_production": 55.0, "consumption": 2200.0, "grid_power_in": 900.0, "grid_power_out": 400.0, "startTimestamp": 1678886400, "stateOfCharge": 80.0, "solarProduction": 2800.0, "pm0Production": 1400.0, "pm1Production": 1400.0, "timespanSeconds": 3600 } ``` -------------------------------- ### get_system_status() Source: https://github.com/fsantini/python-e3dc/blob/master/docs/source/index.md Fetches the current status of the E3/DC system. ```APIDOC ## get_system_status() ### Description Fetches the current status of the E3/DC system. ### Method `get_system_status()` ### Parameters None ``` -------------------------------- ### E3DC Poll() Return Value Example Source: https://github.com/fsantini/python-e3dc/blob/master/README.md Illustrates the dictionary structure returned by the poll() method, including autarky, consumption, production, state of charge, self-consumption, and timestamp. ```python { 'autarky': 100, 'consumption': { 'battery': 470, 'house': 477, 'wallbox': 0 }, 'production': { 'solar' : 951, 'add' : 0, 'grid' : -4 }, 'stateOfCharge': 77, 'selfConsumption': 100, 'time': datetime.datetime(2021, 8, 14, 7, 6, 13) } ``` -------------------------------- ### Get PVI Data (Multiple) Source: https://github.com/fsantini/python-e3dc/blob/master/docs/source/e3dc.md Polls data for multiple PVIs via the RSCP protocol. Pass a list of PVI dictionaries. Set keepAlive to True to maintain the connection. ```python from e3dc import E3DC # Example usage: e3dc = E3DC("192.168.1.10", "user", "password") pvis_data = e3dc.get_pvis_data(pvis=[{'index': 0, 'type': 3, 'typeName': 'PVI_TYPE_E3DC_E'}], keepAlive=True) print(pvis_data) ``` -------------------------------- ### sendWallboxRequest() Source: https://github.com/fsantini/python-e3dc/blob/master/docs/source/index.md Sends a generic request to the Wallbox interface. ```APIDOC ## sendWallboxRequest() ### Description Sends a generic request to the Wallbox interface. ### Method `sendWallboxRequest()` ### Parameters * **request_data** (dict) - Required - The data payload for the Wallbox request. ``` -------------------------------- ### Get PVI Data Source: https://github.com/fsantini/python-e3dc/blob/master/docs/source/e3dc.md Polls inverter data via the RSCP protocol. Specify pviIndex, strings, and phases for targeted data retrieval. Set keepAlive to True to maintain the connection. ```python from e3dc import E3DC # Example usage: e3dc = E3DC("192.168.1.10", "user", "password") pvi_data = e3dc.get_pvi_data(pviIndex=0, strings=[0], phases=[0, 1, 2], keepAlive=True) print(pvi_data) ``` -------------------------------- ### Default E3/DC Configuration Object Source: https://github.com/fsantini/python-e3dc/blob/master/README.md This JSON object represents a default configuration for E3/DC systems. It specifies indices for power meters, and details for PV inverters and batteries. Not all options require explicit configuration. ```json { "pvis": [ { "index": 0, "strings": 2, "phases": 3 } ], "powermeters": [ { "index": 6 } ], "batteries": [ { "index": 0, "dcbs": 2 } ] } ``` -------------------------------- ### get_db_data Source: https://github.com/fsantini/python-e3dc/blob/master/docs/source/e3dc.md Reads database data and summed-up values for a specified timespan using the RSCP protocol. It allows fetching data from a specific start date and supports daily, monthly, or yearly aggregation. ```APIDOC ## get_db_data(startDate: date = datetime.date(2026, 7, 1), timespan: Literal['DAY', 'MONTH', 'YEAR'] = 'DAY', keepAlive: bool = False) ### Description Reads DB data and summed up values for the given timespan via rscp protocol. ### Parameters #### Query Parameters - **startDate** (date) - Optional - start date for timespan, default today. Depending on timespan given, the startDate is automatically adjusted to the first of the month or the year. - **timespan** (str) - Optional - string specifying the time span [“DAY”, “MONTH”, “YEAR”]. Defaults to 'DAY'. - **keepAlive** (bool) - Optional - True to keep connection alive. Defaults to False. ### Response #### Success Response (200) - **autarky** (float) - autarky in the period in % - **bat_power_in** (float) - power entering battery, charging - **bat_power_out** (float) - power leaving battery, discharging - **consumed_production** (float) - power directly consumed in % - **consumption** (float) - self consumed power - **grid_power_in** (float) - power sent into the grid (production) - **grid_power_out** (float) - power taken from the grid (consumption) - **startDate** (str) - date from which db data is fetched of - **stateOfCharge** (float) - battery charge level in % - **solarProduction** (float) - power production - **pm0Production** (float) - power production - **pm1Production** (float) - power production - **timespan** (str) - timespan of which db data is collected - **timespanSeconds** (int) - timespan in seconds of which db data is collected ### Response Example { "autarky": 80.5, "bat_power_in": 1200.0, "bat_power_out": 800.0, "consumed_production": 60.0, "consumption": 2500.0, "grid_power_in": 1000.0, "grid_power_out": 500.0, "startDate": "2023-10-27", "stateOfCharge": 75.0, "solarProduction": 3000.0, "pm0Production": 1500.0, "pm1Production": 1500.0, "timespan": "DAY", "timespanSeconds": 86400 } ``` -------------------------------- ### sendWallboxSetRequest() Source: https://github.com/fsantini/python-e3dc/blob/master/docs/source/index.md Sends a generic set request to the Wallbox interface. ```APIDOC ## sendWallboxSetRequest() ### Description Sends a generic set request to the Wallbox interface. ### Method `sendWallboxSetRequest()` ### Parameters * **request_data** (dict) - Required - The data payload for the Wallbox set request. ```