Skip to content

Adding functions to find associated devices of a plant and inverters data.#54

Open
ODERZO-Flavio-2326083b wants to merge 6 commits intojgriss:mainfrom
ODERZO-Flavio-2326083b:main
Open

Adding functions to find associated devices of a plant and inverters data.#54
ODERZO-Flavio-2326083b wants to merge 6 commits intojgriss:mainfrom
ODERZO-Flavio-2326083b:main

Conversation

@ODERZO-Flavio-2326083b
Copy link

This PR adds support for retrieving device signal data and improves device filtering.

NEW FEATURES :

  • get_device_data(device_id: str, signal_ids: List) : retrieves measurements (signals) of a device. The docstring explains how to get the signal_ids for MPPTs measurements. If signal_ids is None, it will be set to the IDs corresponding to the first 10 MPPTs voltage and intensity.

CHANGED :

  • get_device_ids now accepts a parent_id: str. If not None, will be used to retrieve its associated devices (inverters, loggers, meters, ...). If None, the behavior remains unchanged..
  • if the domain is wrong, status code 400 will throw an exception (added with status code 500, so the original behavior remains unchanged)

Added tests covering:

  • get_device_data
  • Updated behavior of get_device_ids

(hoping this work is clean enough to be accepted, I want it to be used if it could help someone else encountering the same problems as I did!)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant