mobilityhouse / ocpp

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

Confirming stack schedules? #444

Closed carlbenjaminlyon closed 10 months ago

carlbenjaminlyon commented 1 year ago

Hey all, I'm currently attempting to implement stack schedules as a means of limiting the hours a user can charge their EV over the course of a week, with a daily recurring schedule. I can send a SetChargingProfile, and receive a response 'Accepted' from the charger, but I'm unable to confirm that the schedule was applied. I also do not see the expected scheduled rate being applied when viewing the allowed charging amount during a charge cycle. The connector_id is set to 0, as the device is intended for residential use.

setChargingProfileGlobal = {
   "id":"1121031007",
   "msg_type":"SetChargingProfile",
   "connector_id":0,
   "chargingProfile":{
         "chargingProfileId":1,
         "stackLevel":1,
         "chargingProfilePurpose":"TxDefaultProfile",
         "chargingProfileKind":"Recurring",
         "recurrencyKind": "Daily",
         "chargingSchedule":{
            "startSchedule": "2023-05-15T17:00:00",
            "duration": 86400,
            "chargingRateUnit":"A",
            "chargingSchedulePeriod":[
               {
                  "startPeriod":0,
                  "limit":0.0
               }
            ]
         }
      }
    }

This returns the response 'Accepted'. However, upon sending the following:

getCompositeSchedule = {
   "id": "1121031007",
   "msg_type":"GetCompositeSchedule",
   "connector_id":0,
   "duration":86400
}

The only response I receive is a 30-second timeout. What am I missing?

larrykluger commented 1 year ago

Did you turn on logging to see what was actually sent to the charger? Please edit your question to include the log.

Could be either an error in the ocpp lib or your charger doesn't implement the message type

Jared-Newell-Mobility commented 11 months ago

So OCPP 1.6 the expected behaviour is to have a GetCompositeSchedule.conf, with at minimum Accepted or Rejected. As @larrykluger stated it may not be implemented, otherwise, another less likely possibility is that the Charge Point takes too long to calculate the schedule and the timeout occurs. Could you please attach the logs from the Charge Point to see if the message arrives and if it is processed?

Jared-Newell-Mobility commented 10 months ago

This issue may no longer be active, so closing for now