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

Add EnergyEvse to all-clusters-app #30857

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
73 commits
Select commit Hold shift + click to select a range
874d750
Fix #30665 (EVSE)
jamesharrow Nov 29, 2023
35a06a7
Fix #30665 updates to try to get further with ZAP and autogen, but st…
jamesharrow Nov 29, 2023
c3aef3a
Added ember-compatibility-functions.cpp which was missing.
jamesharrow Nov 29, 2023
a71bef8
Made all types all lowercase to resolve regen_all issues.
jamesharrow Nov 29, 2023
41acd01
Fixed lint issue (trailing whitespace).
jamesharrow Nov 29, 2023
d7636ea
Merge branch '30665-13-updates-needed-on-evse-xml-device-energy-manag…
jamesharrow Dec 4, 2023
e12cf09
Fixes #30727 - Added initial EVSE cluster and Example Energy Managame…
jamesharrow Dec 4, 2023
f27b036
Tidied up old comments.
jamesharrow Dec 4, 2023
c0651fe
Restyled by whitespace
restyled-commits Dec 4, 2023
557f7c5
Restyled by gn
restyled-commits Dec 4, 2023
6763533
Restyled by prettier-markdown
restyled-commits Dec 4, 2023
53fa295
Added copy of files to all-clusters-app linux BUILD.gn and did basic …
jamesharrow Dec 5, 2023
e47f734
Fixed lint error (Remove PRId64)
jamesharrow Dec 5, 2023
7434ae8
Fix for Documentation Build and publish checker.
jamesharrow Dec 5, 2023
d9c3550
Merge branch 'upstream-master' into 30727-add-evse-to-examplesenergy-…
jamesharrow Dec 5, 2023
b88e826
Updated all-clusters-app.zap after merge and regen_all
jamesharrow Dec 5, 2023
8b92700
Added Cluster to ESP32 CMakeLists.txt
jamesharrow Dec 5, 2023
a368a5d
Fixed ESP32 compile error caused by %d
jamesharrow Dec 5, 2023
c96744a
Added missing source files to each build variant
jamesharrow Dec 5, 2023
68479cc
Restyled by gn
restyled-commits Dec 5, 2023
919fafb
Fixed incorrect uint64_t in EnableCharging/EnableDischarging command
jamesharrow Dec 5, 2023
2cab312
Fixed more issues seen on different platforms
jamesharrow Dec 5, 2023
293cdbf
Removed unused mEndpointId
jamesharrow Dec 5, 2023
f44f52a
Add source files to shell standalone BUILD.gn, More %d fixes for dif…
jamesharrow Dec 5, 2023
43b98d4
Restyled by gn
restyled-commits Dec 5, 2023
fc54724
Removed unused mMinimumChargingCurrentLimitFromCommand
jamesharrow Dec 6, 2023
d3752ba
Removed yet more unused variables
jamesharrow Dec 6, 2023
a14846a
Fixed missing semi-colon. How did the other compilers not pick this up?
jamesharrow Dec 6, 2023
04a12f7
Capitalise function names
jamesharrow Dec 6, 2023
49acb7f
PR comment - Moved PluginServerInitCallback to sdk. Capitalised more …
jamesharrow Dec 6, 2023
a2240c5
Restyled by whitespace
restyled-commits Dec 6, 2023
ee824c0
Fixes #30805 Updated energy-evse-cluster.xml
jamesharrow Dec 6, 2023
2947b9b
Fixes #30805 zap_regen_all commit.
jamesharrow Dec 6, 2023
4c3e087
Removed energy-management-app from this branch to make PR smaller to …
jamesharrow Dec 6, 2023
0015eb8
Merge branch 'project-chip:master' into 30727-add-evse-to-examplesene…
jamesharrow Dec 6, 2023
5f9e993
Changing something to force a rebuild once I turned off backwards com…
jamesharrow Dec 6, 2023
67c5c27
Update examples/all-clusters-app/all-clusters-common/include/EnergyEv…
jamesharrow Dec 9, 2023
271031c
Made Fault Event allow a nullable SessionID
jamesharrow Dec 7, 2023
b886c71
Updates based on review (use kMaximumChargeCurrent instead of duplica…
jamesharrow Dec 9, 2023
adbb15e
Added RFID Event support. Removed more unnecessary chip::
jamesharrow Dec 9, 2023
a2917b6
Added Feature flags, optional commands and optional attributes.
jamesharrow Dec 10, 2023
e34b523
Made command handling conditional based on features
jamesharrow Dec 10, 2023
3b97de1
Added Feature support to all-clusters-app
jamesharrow Dec 10, 2023
1b896a5
Merge branch '30727-add-evse-to-examplesenergy-management-app' into 3…
jamesharrow Dec 10, 2023
288e544
Restyled by clang-format
restyled-commits Dec 10, 2023
da7a3fb
Restyled by clang-format
restyled-commits Dec 10, 2023
e2652ec
Fix to Darwin compile error - not checking strcmp return
jamesharrow Dec 11, 2023
e1d2d42
Fix to Darwin compile error - not checking strcmp return
jamesharrow Dec 11, 2023
a9a7e8f
Attempt to fix Darwin errors (return after else)
jamesharrow Dec 11, 2023
7aca79f
Attempt to fix Darwin errors (return after else)
jamesharrow Dec 11, 2023
8e43d82
Merge branch 'upstream-master' into 30727-add-evse-to-all_clusters
jamesharrow Dec 11, 2023
51d0028
Merged to upstream master
jamesharrow Dec 11, 2023
f719610
Merge branch 'upstream-master' into 30727-add-evse-to-examplesenergy-…
jamesharrow Dec 11, 2023
2ff5a27
Updated based on latest upstream master
jamesharrow Dec 11, 2023
11b0151
Removed unnecessary mInstance and used 'this' instead.
jamesharrow Dec 11, 2023
774790d
Merge remote-tracking branch 'upstream/master' into 30727-add-evse-to…
jamesharrow Dec 11, 2023
893c6e5
Regen_all after merge to master.
jamesharrow Dec 11, 2023
c91a2d7
Merge branch '30727-add-evse-to-examplesenergy-management-app' into 3…
jamesharrow Dec 11, 2023
ebb2a27
Merge branch 'master' into 30727-add-evse-to-all_clusters
jamesharrow Dec 12, 2023
bc2dd7d
Fix review comment.
jamesharrow Dec 12, 2023
af66e63
Merge branch 'upstream-master' into 30727-add-evse-to-all_clusters
jamesharrow Dec 12, 2023
5a00ecd
Ensure Init() returns a failure if there is one. Aligned to mode-base…
jamesharrow Dec 12, 2023
ff77361
Backed out Read attr check based on features.
jamesharrow Dec 12, 2023
672eb11
Fixed EnumerateAcceptedCommands to handle Loop::Break condition.
jamesharrow Dec 12, 2023
6d0c502
Had missed StartDiagnostic as an optional command in InvokeCommand
jamesharrow Dec 12, 2023
9523802
Removed extra chip:: in attr types.
jamesharrow Dec 12, 2023
5b7f089
Updated HwSetVehicleID to copy the value from callee
jamesharrow Dec 13, 2023
234e956
Fixed potential buffer overrun in HwSetVehicleID.
jamesharrow Dec 13, 2023
aef5e45
Merge branch 'master' into 30727-add-evse-to-all_clusters
jamesharrow Dec 13, 2023
c70d4fb
Ensured that mVehicleID free's any malloc'd CharSpan in destructor
jamesharrow Dec 14, 2023
d1937b7
Sync EnergyEvseDelegateImpl.cpp from Example Energy Management
jamesharrow Dec 14, 2023
03043f5
Merge branch 'master' into 30727-add-evse-to-all_clusters
jamesharrow Dec 14, 2023
d83c5be
Merge branch 'master' into 30727-add-evse-to-all_clusters
jamesharrow Dec 15, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
215 changes: 215 additions & 0 deletions examples/all-clusters-app/all-clusters-common/all-clusters-app.matter
Original file line number Diff line number Diff line change
Expand Up @@ -3717,6 +3717,187 @@ provisional cluster ElectricalEnergyMeasurement = 145 {
readonly attribute int16u clusterRevision = 65533;
}

/** Electric Vehicle Supply Equipment (EVSE) is equipment used to charge an Electric Vehicle (EV) or Plug-In Hybrid Electric Vehicle. This cluster provides an interface to the functionality of Electric Vehicle Supply Equipment (EVSE) management. */
provisional cluster EnergyEvse = 153 {
revision 1; // NOTE: Default/not specifically set
jamesharrow marked this conversation as resolved.
Show resolved Hide resolved

enum EnergyTransferStoppedReasonEnum : enum8 {
kEVStopped = 0;
kEVSEStopped = 1;
kOther = 2;
}

enum FaultStateEnum : enum8 {
kNoError = 0;
kMeterFailure = 1;
kOverVoltage = 2;
kUnderVoltage = 3;
kOverCurrent = 4;
kContactWetFailure = 5;
kContactDryFailure = 6;
kGroundFault = 7;
kPowerLoss = 8;
kPowerQuality = 9;
kPilotShortCircuit = 10;
kEmergencyStop = 11;
kEVDisconnected = 12;
kWrongPowerSupply = 13;
kLiveNeutralSwap = 14;
kOverTemperature = 15;
kOther = 255;
}

enum StateEnum : enum8 {
kNotPluggedIn = 0;
kPluggedInNoDemand = 1;
kPluggedInDemand = 2;
kPluggedInCharging = 3;
kPluggedInDischarging = 4;
kSessionEnding = 5;
kFault = 6;
}

enum SupplyStateEnum : enum8 {
kDisabled = 0;
kChargingEnabled = 1;
kDischargingEnabled = 2;
kDisabledError = 3;
kDisabledDiagnostics = 4;
}

bitmap Feature : bitmap32 {
kChargingPreferences = 0x1;
kSoCReporting = 0x2;
kPlugAndCharge = 0x4;
kRFID = 0x8;
kV2X = 0x10;
}

bitmap TargetDayOfWeekBitmap : bitmap8 {
kSunday = 0x1;
kMonday = 0x2;
kTuesday = 0x4;
kWednesday = 0x8;
kThursday = 0x10;
kFriday = 0x20;
kSaturday = 0x40;
}

struct ChargingTargetStruct {
int16u targetTimeMinutesPastMidnight = 0;
optional percent targetSoC = 1;
optional energy_mwh addedEnergy = 2;
}

info event EVConnected = 0 {
int32u sessionID = 0;
}

info event EVNotDetected = 1 {
int32u sessionID = 0;
StateEnum state = 1;
elapsed_s sessionDuration = 2;
energy_mwh sessionEnergyCharged = 3;
optional energy_mwh sessionEnergyDischarged = 4;
}

info event EnergyTransferStarted = 2 {
int32u sessionID = 0;
StateEnum state = 1;
amperage_ma maximumCurrent = 2;
}

info event EnergyTransferStopped = 3 {
int32u sessionID = 0;
StateEnum state = 1;
EnergyTransferStoppedReasonEnum reason = 2;
energy_mwh energyTransferred = 4;
}

critical event Fault = 4 {
nullable int32u sessionID = 0;
StateEnum state = 1;
FaultStateEnum faultStatePreviousState = 2;
FaultStateEnum faultStateCurrentState = 4;
}

info event RFID = 5 {
octet_string uid = 0;
}

readonly attribute nullable StateEnum state = 0;
readonly attribute SupplyStateEnum supplyState = 1;
readonly attribute FaultStateEnum faultState = 2;
readonly attribute nullable epoch_s chargingEnabledUntil = 3;
readonly attribute optional nullable epoch_s dischargingEnabledUntil = 4;
readonly attribute amperage_ma circuitCapacity = 5;
readonly attribute amperage_ma minimumChargeCurrent = 6;
readonly attribute amperage_ma maximumChargeCurrent = 7;
readonly attribute optional amperage_ma maximumDischargeCurrent = 8;
attribute access(write: manage) optional amperage_ma userMaximumChargeCurrent = 9;
attribute access(write: manage) optional elapsed_s randomizationDelayWindow = 10;
readonly attribute optional int8u numberOfWeeklyTargets = 33;
readonly attribute optional int8u numberOfDailyTargets = 34;
readonly attribute optional nullable epoch_s nextChargeStartTime = 35;
readonly attribute optional nullable epoch_s nextChargeTargetTime = 36;
readonly attribute optional nullable energy_mwh nextChargeRequiredEnergy = 37;
readonly attribute optional nullable percent nextChargeTargetSoC = 38;
attribute access(write: manage) optional nullable int16u approximateEVEfficiency = 39;
readonly attribute optional nullable percent stateOfCharge = 48;
readonly attribute optional nullable energy_mwh batteryCapacity = 49;
readonly attribute optional nullable char_string<32> vehicleID = 50;
readonly attribute nullable int32u sessionID = 64;
readonly attribute nullable elapsed_s sessionDuration = 65;
readonly attribute nullable energy_mwh sessionEnergyCharged = 66;
readonly attribute optional nullable energy_mwh sessionEnergyDischarged = 67;
readonly attribute command_id generatedCommandList[] = 65528;
readonly attribute command_id acceptedCommandList[] = 65529;
readonly attribute event_id eventList[] = 65530;
readonly attribute attrib_id attributeList[] = 65531;
readonly attribute bitmap32 featureMap = 65532;
readonly attribute int16u clusterRevision = 65533;

response struct GetTargetsResponse = 0 {
TargetDayOfWeekBitmap dayOfWeekforSequence = 0;
ChargingTargetStruct chargingTargets[] = 1;
}

request struct EnableChargingRequest {
nullable epoch_s chargingEnabledUntil = 0;
amperage_ma minimumChargeCurrent = 1;
amperage_ma maximumChargeCurrent = 2;
}

request struct EnableDischargingRequest {
nullable epoch_s dischargingEnabledUntil = 0;
amperage_ma maximumDischargeCurrent = 1;
}

request struct SetTargetsRequest {
TargetDayOfWeekBitmap dayOfWeekforSequence = 0;
ChargingTargetStruct chargingTargets[] = 1;
}

request struct GetTargetsRequest {
TargetDayOfWeekBitmap daysToReturn = 0;
}

/** Allows a client to disable the EVSE from charging and discharging. */
timed command Disable(): DefaultSuccess = 1;
/** Allows a client to enable the EVSE to charge an EV. */
timed command EnableCharging(EnableChargingRequest): DefaultSuccess = 2;
/** Allows a client to enable the EVSE to discharge an EV. */
timed command EnableDischarging(EnableDischargingRequest): DefaultSuccess = 3;
/** Allows a client to put the EVSE into a self-diagnostics mode. */
timed command StartDiagnostics(): DefaultSuccess = 4;
/** Allows a client to set the user specified charging targets. */
timed command SetTargets(SetTargetsRequest): DefaultSuccess = 5;
/** Allows a client to retrieve the user specified charging targets. */
timed command GetTargets(GetTargetsRequest): GetTargetsResponse = 6;
/** Allows a client to clear all stored charging targets. */
timed command ClearTargets(): DefaultSuccess = 7;
}

/** Provides an interface for controlling and adjusting automatic window coverings. */
cluster WindowCovering = 258 {
revision 5;
Expand Down Expand Up @@ -7141,6 +7322,40 @@ endpoint 1 {
ram attribute clusterRevision default = 1;
}

server cluster EnergyEvse {
callback attribute state default = 0;
callback attribute supplyState default = 0;
callback attribute faultState default = 0;
callback attribute chargingEnabledUntil default = 0;
callback attribute dischargingEnabledUntil default = 0;
callback attribute circuitCapacity default = 0;
callback attribute minimumChargeCurrent default = 6000;
callback attribute maximumChargeCurrent default = 0;
callback attribute maximumDischargeCurrent default = 0;
callback attribute userMaximumChargeCurrent default = 0;
callback attribute randomizationDelayWindow default = 600;
callback attribute numberOfWeeklyTargets default = 0;
callback attribute numberOfDailyTargets default = 1;
callback attribute nextChargeStartTime;
callback attribute nextChargeTargetTime;
callback attribute nextChargeRequiredEnergy;
callback attribute nextChargeTargetSoC;
callback attribute approximateEVEfficiency default = 0xFFFF;
callback attribute stateOfCharge;
callback attribute batteryCapacity;
callback attribute vehicleID;
callback attribute sessionID;
callback attribute sessionDuration;
callback attribute sessionEnergyCharged;
callback attribute sessionEnergyDischarged;
callback attribute generatedCommandList;
callback attribute acceptedCommandList;
callback attribute eventList;
callback attribute attributeList;
ram attribute featureMap default = 0;
ram attribute clusterRevision default = 2;
}

server cluster WindowCovering {
ram attribute type default = 0x08;
ram attribute physicalClosedLimitLift default = 0xFFFF;
Expand Down
Loading
Loading