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

Function to define the current limit of a EVSE #300

Closed
p-r-m-n opened this issue May 17, 2024 · 7 comments
Closed

Function to define the current limit of a EVSE #300

p-r-m-n opened this issue May 17, 2024 · 7 comments

Comments

@p-r-m-n
Copy link

p-r-m-n commented May 17, 2024

Is there any function in the C API of this library that allows to change the current limit of the EVSE? I understood that "ocpp_setSmartChargingCurrentOutput" uses a function to tell when the limit has changed by the car, but what about the limit of the EVSE itself?

@matth-x
Copy link
Owner

matth-x commented May 18, 2024

In the standard Smart Charging scenario, the OCPP server sends charging limits to the EVSE which MicroOcpp forwards to your application via the ocpp_setSmartChargingCurrentOutput callback function.

The EVSE can report back the actual charging limit (resulting from local load balancing restrictions, cable capacity, ect.) over MeterValues with the Measurand Current.Offered. To add a new measurand, use

void ocpp_addMeterValueInputFloat(InputFloat valueInput, const char *measurand, const char *unit, const char *location, const char *phase); //measurand, unit, location and phase can be NULL

For example:

float my_charging_limit() {
    return 16.f; // TODO replace with the actual charging limit of the EVSE
}

// register callback (somewhere in the setup function): 
ocpp_addMeterValueInputFloat(my_charging_limit, "Current.Offered", "A", NULL, NULL);

@p-r-m-n
Copy link
Author

p-r-m-n commented May 18, 2024 via email

@matth-x
Copy link
Owner

matth-x commented May 21, 2024

I see. It's possible to register custom Configurations as described here: #248 (comment) The approach works the same for accessing built-in Configs as for declaring new, custom Configs.

Having a Config for the maximum current, you can read its value in the firmware integration and make sure that your charger never exceeds that level manually.

@p-r-m-n
Copy link
Author

p-r-m-n commented May 22, 2024

I see. It's possible to register custom Configurations as described here: #248 (comment) The approach works the same for accessing built-in Configs as for declaring new, custom Configs.

Having a Config for the maximum current, you can read its value in the firmware integration and make sure that your charger never exceeds that level manually.

thanks, i will try and post the results here.

@p-r-m-n
Copy link
Author

p-r-m-n commented Jun 9, 2024

I tried to connect a esp to a EVSE but apparently i had it wrong, this library should connect to a ocpp server as the EVSE does, not the other way. There are any functions in this library to implement a ocpp server on the esp32?

@matth-x
Copy link
Owner

matth-x commented Jun 10, 2024

No, it's not supported at the moment. I did build a proof of concept for this once, but didn't go any further that direction.

@matth-x matth-x closed this as completed Jun 10, 2024
@p-r-m-n
Copy link
Author

p-r-m-n commented Jun 10, 2024

thanks for the support!

No, it's not supported at the moment. I did build a proof of concept for this once, but didn't go any further that direction.

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

No branches or pull requests

2 participants