Skip to content

Conversation

@razvanphp
Copy link

This PR makes all those tests pass:

  • TC_056 Central Smart Charging - TxDefaultProfile
  • TC_066_CS - Get Composite Schedule
  • TC_067_CS - Clear Charging Profile
  • TC_072_CS - Stacking Charging Profiles
Screenshot 2025-10-20 at 09 55 28

BUT, it will only work for v1.1.0 and v1.2.0, it is not compatible with the upcoming develop/remodel-api branch. I think there @matth-x already fixed those bugs.

We should also have the max A of the charging station and number of phases as configuration variables probably, as OCTT expects a positive value there instead of -1 when there is no Profile installed.

I could/should also add unit tests for this...

closes #360

@razvanphp
Copy link
Author

razvanphp commented Nov 3, 2025

I will add unit tests for the other 3 TC so we can easily port the fixes to the v2.x branch.

Also, according to GetCompositeScheduleResponse schema for chargingSchedulePeriod, looks like this:

            "chargingSchedulePeriod": {
                "type": "array",
                "items": {
                    "type": "object",
                    "properties": {
                        "startPeriod": {
                            "type": "integer"
                        },
                        "limit": {
                            "type": "number",
                            "multipleOf" : 0.1
                        },
                        "numberPhases": {
                            "type": "integer"
                        }
                    },
                    "additionalProperties": false,
                    "required": [
                        "startPeriod",
                        "limit"
                        ]
                }
            },

... so we cannot (or should not) return -1 for limit and numberPhases.

BUT, to keep the library CP agnostic, after discussion with @matth-x we agreed to make those configurable as defines MO_, still -1, but with the possibility for implementers to set this to the right value without overriding the framework.

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.

Can not pass some OCTT test case for Smart Charging

1 participant