Skip to content

Commit

Permalink
Merge pull request #57 from PrediktorAS/bugfix/enable-multiple-variables
Browse files Browse the repository at this point in the history
Bugfix/enable multiple variables
  • Loading branch information
MeenaBana authored Apr 8, 2024
2 parents 050b486 + 6339915 commit 1692135
Show file tree
Hide file tree
Showing 6 changed files with 47 additions and 316 deletions.
41 changes: 39 additions & 2 deletions notebooks/Exploring_API_Functions_Authentication.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,19 @@
"string_sets_for_first_park.dataframe"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# All inverter data for the site\n",
"inverter_json = model_data.get_object_descendants(\n",
" \"InverterType\", [site_id], \"PV_Assets\"\n",
")\n",
"inverters = AnalyticsHelper(inverter_json)"
]
},
{
"cell_type": "code",
"execution_count": null,
Expand Down Expand Up @@ -237,6 +250,23 @@
"opc_data = OPC_UA(rest_url=opcua_rest_url, opcua_url=opcua_server_url, namespaces=namespace_list, auth_client=auth_client)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# History data\n",
"inverters_hist_df = opc_data.get_historical_aggregated_values(\n",
" start_time=datetime.datetime.now() - datetime.timedelta(2),\n",
" end_time=datetime.datetime.now() - datetime.timedelta(1),\n",
" pro_interval=600000,\n",
" agg_name=\"Average\",\n",
" variable_list=inverters.variables_as_list([\"DCPower\"]),\n",
")\n",
"inverters_hist_df"
]
},
{
"cell_type": "code",
"execution_count": null,
Expand All @@ -245,7 +275,7 @@
"source": [
"# Live value data of trackers\n",
"live_value = opc_data.get_values(\n",
" trackers.variables_as_list([\"AngleMeasured\", \"AngleSetpoint\"])\n",
" trackers.variables_as_list([\"AngleMeasured\"])\n",
")\n",
"live_value"
]
Expand All @@ -266,6 +296,13 @@
")\n",
"one_day_historic_tracker_data"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
Expand All @@ -284,7 +321,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.8"
"version": "3.12.2"
}
},
"nbformat": 4,
Expand Down
307 changes: 0 additions & 307 deletions notebooks/Test_API_Functions_New_Features.ipynb

This file was deleted.

1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
sphinx_rtd_theme
tox
ipykernel
-e .
python-dotenv
2 changes: 1 addition & 1 deletion src/pyprediktormapclient/dwh/dwh.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import importlib
from typing import Dict
from pydantic import validate_call
from pyprediktorutilities import Dwh as Db
from pyprediktorutilities.dwh.dwh import Dwh as Db

from . import context
from .idwh import IDWH
Expand Down
Loading

0 comments on commit 1692135

Please sign in to comment.