-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move endpoint consts to seperate file. Cleanup.
- Loading branch information
1 parent
e452afd
commit d9df779
Showing
7 changed files
with
171 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# Generic endpoints | ||
ENDPOINT_URL_HOME_JSON = "https://{}/home.json" | ||
ENDPOINT_URL_INFO_XML = "https://{}/info.xml" | ||
|
||
# Production/consumption endpoints | ||
ENDPOINT_URL_PRODUCTION_JSON = "https://{}/production.json?details=1" | ||
ENDPOINT_URL_PRODUCTION_V1 = "https://{}/api/v1/production" | ||
ENDPOINT_URL_PRODUCTION_INVERTERS = "https://{}/api/v1/production/inverters" | ||
ENDPOINT_URL_PRODUCTION_REPORT = "https://{}/ivp/meters/reports/production" | ||
ENDPOINT_URL_PRODUCTION_POWER = "https://{}/ivp/mod/603980032/mode/power" | ||
ENDPOINT_URL_PDM_ENERGY = "https://{}/ivp/pdm/energy" | ||
ENDPOINT_URL_STREAM = "https://{}/stream/meter" | ||
|
||
# Battery endpoints | ||
ENDPOINT_URL_ENSEMBLE_INVENTORY = "https://{}/ivp/ensemble/inventory" | ||
ENDPOINT_URL_ENSEMBLE_SECCTRL = "https://{}/ivp/ensemble/secctrl" | ||
ENDPOINT_URL_ENSEMBLE_POWER = "https://{}/ivp/ensemble/power" | ||
|
||
# Inverter endpoints | ||
ENDPOINT_URL_INVENTORY = "https://{}/inventory.json" | ||
ENDPOINT_URL_DEVSTATUS = "https://{}/ivp/peb/devstatus" | ||
|
||
# Netprofile endpoints | ||
ENDPOINT_URL_INSTALLER_AGF = "https://{}/installer/agf/index.json" | ||
ENDPOINT_URL_INSTALLER_AGF_SET_PROFILE = "https://{}/installer/agf/set_profile.json" | ||
ENDPOINT_URL_INSTALLER_AGF_UPLOAD_PROFILE = ( | ||
"https://{}/installer/agf/upload_profile_package" | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
TEST_DATA = "/config/custom_components/enphase_envoy/test_data/envoy_metered/" | ||
|
||
# Generic endpoints | ||
ENDPOINT_URL_HOME_JSON = TEST_DATA + "endpoint_home_json.json" | ||
ENDPOINT_URL_INFO_XML = TEST_DATA + "endpoint_info.xml" | ||
|
||
# Production/consumption endpoints | ||
ENDPOINT_URL_PRODUCTION_JSON = TEST_DATA + "endpoint_production_json.json" | ||
ENDPOINT_URL_PRODUCTION_V1 = TEST_DATA + "endpoint_production_v1.json" | ||
ENDPOINT_URL_PRODUCTION_INVERTERS = TEST_DATA + "endpoint_production_inverters.json" | ||
ENDPOINT_URL_PRODUCTION_REPORT = TEST_DATA + "endpoint_production_report.json" | ||
ENDPOINT_URL_PRODUCTION_POWER = TEST_DATA + "endpoint_production_power.json" | ||
ENDPOINT_URL_PDM_ENERGY = TEST_DATA + "endpoint_pdm_energy.json" | ||
ENDPOINT_URL_STREAM = None | ||
|
||
# Battery endpoints | ||
ENDPOINT_URL_ENSEMBLE_INVENTORY = TEST_DATA + "endpoint_ensemble_inventory.json" | ||
ENDPOINT_URL_ENSEMBLE_SECCTRL = TEST_DATA + "endpoint_ensemble_secctrl.json" | ||
ENDPOINT_URL_ENSEMBLE_POWER = TEST_DATA + "endpoint_ensemble_power.json" | ||
|
||
# Inverter endpoints | ||
ENDPOINT_URL_INVENTORY = TEST_DATA + "endpoint_inventory.json" | ||
ENDPOINT_URL_DEVSTATUS = TEST_DATA + "endpoint_devstatus.json" | ||
|
||
# Netprofile endpoints | ||
ENDPOINT_URL_INSTALLER_AGF = TEST_DATA + "endpoint_installer_agf_index_json.json" | ||
ENDPOINT_URL_INSTALLER_AGF_SET_PROFILE = None | ||
ENDPOINT_URL_INSTALLER_AGF_UPLOAD_PROFILE = None |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
77 changes: 77 additions & 0 deletions
77
test_data/envoy_metered/endpoint_installer_agf_index_json.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
{ | ||
"selected_profile": "EN 50549-1:2019 RfG E02 Netherlands:1.3.2", | ||
"selected_profile_id": "65e6901caeee1200f07caeee", | ||
"last_package_profile_md5sum": "00beeb6d88ac522947b15c97d630b48c", | ||
"profile_auto_selected": false, | ||
"mm_version": "01.03.06", | ||
"bt_version": "1.3.6", | ||
"migration_in_progress": false, | ||
"profiles": [ | ||
{ | ||
"uuid": "65e6901caeee1200f07caeee", | ||
"profile_id": "EN 50549-1:2019 RfG E02 Netherlands:1.3.2", | ||
"profile_name": "EN 50549-1:2019 RfG E02 Netherlands", | ||
"profile_version": "1.3.2", | ||
"profile_description": "Profile for The Netherlands based on requirements drawn from EN 50549-1:2019 + Amendment 1 and Netbeheer E-02 - Netcode elektriciteit (2022-12-18) (the Dutch Grid Code).", | ||
"policy": { | ||
"min_base_template_version": "1.3.1", | ||
"min_master_model_version": "1.3.1", | ||
"min_envoy_version": "7.6", | ||
"max_envoy_version": "", | ||
"model_mismatch": false, | ||
"logical_device_mismatch": false, | ||
"attribute_mismatch": false, | ||
"id_mismatch": false | ||
}, | ||
"envoy_type": "europe", | ||
"countries": [ | ||
"NL" | ||
], | ||
"states": [ | ||
|
||
], | ||
"unpacked": true, | ||
"profile_source": [ | ||
"enlighten" | ||
], | ||
"dynamic": true, | ||
"mm_version": "1.3.7", | ||
"bt_version": "1.3.7" | ||
} | ||
], | ||
"profile_groups": { | ||
"NL": [ | ||
{ | ||
"uuid": "65e6901caeee1200f07caeee", | ||
"profile_id": "EN 50549-1:2019 RfG E02 Netherlands:1.3.2", | ||
"profile_name": "EN 50549-1:2019 RfG E02 Netherlands", | ||
"profile_version": "1.3.2", | ||
"profile_description": "Profile for The Netherlands based on requirements drawn from EN 50549-1:2019 + Amendment 1 and Netbeheer E-02 - Netcode elektriciteit (2022-12-18) (the Dutch Grid Code).", | ||
"policy": { | ||
"min_base_template_version": "1.3.1", | ||
"min_master_model_version": "1.3.1", | ||
"min_envoy_version": "7.6", | ||
"max_envoy_version": "", | ||
"model_mismatch": false, | ||
"logical_device_mismatch": false, | ||
"attribute_mismatch": false, | ||
"id_mismatch": false | ||
}, | ||
"envoy_type": "europe", | ||
"countries": [ | ||
"NL" | ||
], | ||
"states": [ | ||
|
||
], | ||
"unpacked": true, | ||
"profile_source": [ | ||
"enlighten" | ||
], | ||
"dynamic": true, | ||
"mm_version": "1.3.7", | ||
"bt_version": "1.3.7" | ||
} | ||
] | ||
} | ||
} |