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

Notify consumer about charging profile update when a transaction stops #788

Merged
merged 3 commits into from
Sep 19, 2024

Conversation

Pietfried
Copy link
Contributor

@Pietfried Pietfried commented Sep 12, 2024

Describe your changes

This PR adds executing signal_set_charging_profiles_callback when a transaction is stopped to notify the consumer. The stopped transaction might have removed previously reported TxProfiles (as part of the composite schedule) which could influence the load balancing / charging power of the EVSEs.

Remark: Looking at how the signal_set_charging_profiles_callback and also set_charging_profiles_callback (of ocpp201) I would suggest to change the name of these variables to better represent their purpose. A libocpp user should get notified in case profiles are added / removed which leads to a change of the composite schedule. This can happen when charging profiles are added by SetChargingProfile.req but also when transactions stop (because TxProfiles) might be removed. A more appropriate name would e.g. be charging_profiles_updated_callback.

I covered that in this issue.

Issue ticket number and link

Checklist before requesting a review

… stopped to notify the consumer. The stopped transaction might have removed previously reported TxProfiles (as part of the composite schedule) which could influence the load balancing / charging power of the EVSEs.

Signed-off-by: pietfried <pietgoempel@gmail.com>
Copy link
Contributor

@maaikez maaikez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be nice if the callback was called only when the charging profile is indeed changed. You said you would make a ticket for it, so for now it's ok I think.

* Only signal if profiles changed

Signed-off-by: pietfried <pietgoempel@gmail.com>
Signed-off-by: pietfried <pietgoempel@gmail.com>
@maaikez
Copy link
Contributor

maaikez commented Sep 17, 2024

looks good.

@Pietfried Pietfried merged commit 4dcd8a2 into main Sep 19, 2024
4 checks passed
@Pietfried Pietfried deleted the feature/signal-profiles-on-tx-stop branch September 19, 2024 12:57
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.

3 participants