mobilityhouse / ocpp

Python implementation of the Open Charge Point Protocol (OCPP).
MIT License
774 stars 300 forks source link

Returning charger to regular max charge capability operation after removing schedule demonstration? #428

Closed carlbenjaminlyon closed 10 months ago

carlbenjaminlyon commented 1 year ago

Hey all,

I'm currently implementing weekly recurring schedules in my api to allow users to set charging rates for specific time frames. To ensure that when a user removes all of their schedules, I want the api to clear out all of the charging profiles and schedule periods to return the charger to regular max operating capacity. For example, if a user with a 32 amp charger sets their charge rate to 16 amps, starting at 8am and ending at 8pm on any given day, our system is designed to send the following: [ {'startPeriod': 28800, 'limit': 16.0}, {'startPeriod': 72000, 'limit': 32.0} ] This would be an example of one day.

However, my understanding is that sending a ClearChargingProfile command does not reset the charger to operate at 32A as it normally would from a factory default state. What would I need to do in order to achieve this?

Jared-Newell-Mobility commented 1 year ago

You could use SetChargingProfile with the purpose of ChargingStationMaxProfile and a stack level of 0 use this to set 32 A.

When clearing out charging profiles with with a ClearChargingProfileRequest, the ClearChargingProfileType chargingProfilePurpose should be specified as TxDefaultProfile or TxProfile depending on your implementation.

This should the leave the ChargingStationMax profile to be applied to the charge station once the others have been removed.

See OCPP section 3.5. Combining Charging Profile Purposes

I hope this helps

Jared-Newell-Mobility commented 10 months ago

This issue looks to be no longer active - so closing this for now