Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fallback components in generated formulas in LogicalMeter #184

Closed
shsms opened this issue Jan 26, 2023 · 4 comments · Fixed by #1037
Closed

Fallback components in generated formulas in LogicalMeter #184

shsms opened this issue Jan 26, 2023 · 4 comments · Fixed by #1037
Assignees
Labels
part:data-pipeline Affects the data pipeline priority:high Address this as soon as possible type:enhancement New feature or enhancement visitble to users
Milestone

Comments

@shsms
Copy link
Contributor

shsms commented Jan 26, 2023

What's needed?

Support for automatic logical meter formulas to be regenerated with fallback components from the component graph, if available.

For example, in the grid_power() formula, power values from all components directly attached to the grid component are added. These are usually just meters. But one of these meters fails, and that meter has a fallback component, values from the fallback components can be used in the formula instead.

In the first version, this can be done for just meters attached to inverters. If such meters fail, values from the inverters can be used instead.

This might also be possible with meters attached to ev-chargers, if we can be confident that there are no hidden load behind such meters, and it is just the ev chargers.

This will NOT be possible

  • if the main meter fails, whether it is on the grid side or not,
  • if a PV meter fails,

because both those don't have fallback devices in the component graph that we can get power readings from.

Proposed solution

No response

Use cases

No response

Alternatives and workarounds

No response

Additional context

No response

@shsms shsms added part:❓ We need to figure out which part is affected priority:❓ We need to figure out how soon this should be addressed type:enhancement New feature or enhancement visitble to users labels Jan 26, 2023
@sahas-subramanian-frequenz sahas-subramanian-frequenz added priority:low This should be addressed only if there is nothing else on the table part:data-pipeline Affects the data pipeline and removed part:❓ We need to figure out which part is affected priority:❓ We need to figure out how soon this should be addressed labels Jan 26, 2023
@matthias-wende-frequenz
Copy link
Contributor

Additionally the LogicalMeter might raise an alert that it is working in fallback mode and that can be picked up by an app, which can e.g. trigger an UI alert.

@thomas-nicolai-frequenz
Copy link

thomas-nicolai-frequenz commented Jan 26, 2023

if a PV meter fails,

Well we can read that from the PV inverter which is a component on the component graph.

@leandro-lucarella-frequenz leandro-lucarella-frequenz added this to the post-v1.0 milestone Apr 14, 2023
shsms added a commit to sahas-subramanian-frequenz/frequenz-sdk-python that referenced this issue May 22, 2023
This is because the microgrid API currently doesn't have drivers for
reading data from PV inverters.  We have plans to update our generated
formulas to have fallback components, when a certain selection of
components is unable to stream data, tracked here: frequenz-floss#184.

Reading PV power from a meter is also going to be more accurate,
because it measures the actual power coming out of the PV inverter,
unaffected by the inverter's self consumption.

Signed-off-by: Sahas Subramanian <[email protected]>
matthias-wende-frequenz pushed a commit to matthias-wende-frequenz/frequenz-sdk-python that referenced this issue May 30, 2023
This is because the microgrid API currently doesn't have drivers for
reading data from PV inverters.  We have plans to update our generated
formulas to have fallback components, when a certain selection of
components is unable to stream data, tracked here: frequenz-floss#184.

Reading PV power from a meter is also going to be more accurate,
because it measures the actual power coming out of the PV inverter,
unaffected by the inverter's self consumption.

Signed-off-by: Sahas Subramanian <[email protected]>
matthias-wende-frequenz pushed a commit to matthias-wende-frequenz/frequenz-sdk-python that referenced this issue Jul 6, 2023
This is because the microgrid API currently doesn't have drivers for
reading data from PV inverters.  We have plans to update our generated
formulas to have fallback components, when a certain selection of
components is unable to stream data, tracked here: frequenz-floss#184.

Reading PV power from a meter is also going to be more accurate,
because it measures the actual power coming out of the PV inverter,
unaffected by the inverter's self consumption.

Signed-off-by: Sahas Subramanian <[email protected]>
@matthias-wende-frequenz
Copy link
Contributor

if a PV meter fails

that's not necessarily true. If we have support for PV inverters, these can be used as a fallback.

@daniel-zullo-frequenz daniel-zullo-frequenz added priority:high Address this as soon as possible and removed priority:low This should be addressed only if there is nothing else on the table labels Aug 2, 2024
@ela-kotulska-frequenz ela-kotulska-frequenz self-assigned this Aug 2, 2024
@daniel-zullo-frequenz
Copy link
Contributor

Writting here suggestions from Matthias and Sahas, so they don't get lost

Addressing this issue involves having an dynamic graph that self changes on certain conditions.

This can actually be done without having to rebuild the formula. There are MetricFetchers to which we give one receiver. We can just modify them to take multiple receivers, and if the first one gives None, try the second. And then just specify the fallback components from the chain when building the formula, and that way we can isolate the dynamic stuff to this one part.

This is a good starting point even that suggestion wouldn't cover the case of one meter in front of many PV inverters.
And we can get it to cover the multiple inverter situation as well. But extending the MetricFetcher feels much easier than dynamically adding/removing formula steps.

@shsms shsms added this to the v1.0.0-rc900 milestone Aug 22, 2024
@github-project-automation github-project-automation bot moved this from To do to Done in Python SDK Roadmap Aug 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
part:data-pipeline Affects the data pipeline priority:high Address this as soon as possible type:enhancement New feature or enhancement visitble to users
Projects
Development

Successfully merging a pull request may close this issue.

8 participants