-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Issue: #30580 Create initial EVSE cluster for SDK
- Loading branch information
1 parent
4922ea6
commit ed285f5
Showing
75 changed files
with
20,267 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
221 changes: 221 additions & 0 deletions
221
src/app/zap-templates/zcl/data-model/chip/energy-evse-cluster.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,221 @@ | ||
<?xml version="1.0"?> | ||
<!-- | ||
Copyright (c) 2023 Project CHIP Authors | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
--> | ||
<configurator> | ||
<domain name="Energy Management"/> | ||
<enum name="StateEnum" type="enum8" apiMaturity="provisional"> | ||
<cluster code="0x0099"/> | ||
<item name="NotPluggedIn" value="0x00"/> | ||
<item name="PluggedInNoDemand" value="0x01"/> | ||
<item name="PluggedInDemand" value="0x02"/> | ||
<item name="PluggedInCharging" value="0x03"/> | ||
<item name="PluggedInDischarging" value="0x04"/> | ||
<item name="SessionEnding" value="0x05"/> | ||
<item name="Fault" value="0x06"/> | ||
</enum> | ||
<enum name="SupplyStateEnum" type="enum8" apiMaturity="provisional"> | ||
<cluster code="0x0099"/> | ||
<item name="Disabled" value="0x00"/> | ||
<item name="ChargingEnabled" value="0x01"/> | ||
<item name="DischargingEnabled" value="0x02"/> | ||
<item name="DisabledError" value="0x03"/> | ||
<item name="DisabledDiagnostics" value="0x04"/> | ||
</enum> | ||
<enum name="FaultStateEnum" type="enum8" apiMaturity="provisional"> | ||
<cluster code="0x0099"/> | ||
<item name="NoError" value="0x00"/> | ||
<item name="MeterFailure" value="0x01"/> | ||
<item name="OverVoltage" value="0x02"/> | ||
<item name="UnderVoltage" value="0x03"/> | ||
<item name="OverCurrent" value="0x04"/> | ||
<item name="ContactWetFailure" value="0x05"/> | ||
<item name="ContactDryFailure" value="0x06"/> | ||
<item name="GroundFault" value="0x07"/> | ||
<item name="PowerLoss" value="0x08"/> | ||
<item name="PowerQuality" value="0x09"/> | ||
<item name="PilotShortCircuit" value="0x0A"/> | ||
<item name="EmergencyStop" value="0x0B"/> | ||
<item name="EVDisconnected" value="0x0C"/> | ||
<item name="WrongPowerSupply" value="0x0D"/> | ||
<item name="LiveNeutralSwap" value="0x0E"/> | ||
<item name="OverTemperature" value="0x0F"/> | ||
<item name="Other" value="0xFF"/> | ||
</enum> | ||
<enum name="EnergyTransferStoppedReasonEnum" type="enum8" apiMaturity="provisional"> | ||
<cluster code="0x0099"/> | ||
<item name="EVStopped" value="0x00"/> | ||
<item name="EVSEStopped" value="0x01"/> | ||
<item name="Other" value="0x02"/> | ||
</enum> | ||
<bitmap name="TargetDayOfWeekBitmap" type="bitmap8" apiMaturity="provisional"> | ||
<cluster code="0x0099"/> | ||
<field name="Sunday" mask="0x01"/> | ||
<field name="Monday" mask="0x02"/> | ||
<field name="Tuesday" mask="0x04"/> | ||
<field name="Wednesday" mask="0x08"/> | ||
<field name="Thursday" mask="0x10"/> | ||
<field name="Friday" mask="0x20"/> | ||
<field name="Saturday" mask="0x40"/> | ||
</bitmap> | ||
<struct name="ChargingTargetStruct" apiMaturity="provisional"> | ||
<cluster code="0x0099"/> | ||
<item fieldId="0" name="TargetTime" type="int16u" min="0" max="1439"/> | ||
<item fieldId="1" name="TargetSoC" type="percent" optional="true"/> | ||
<item fieldId="2" name="AddedEnergy" type="int64s" min="0" max="500000000" optional="true"/> | ||
</struct> | ||
<cluster apiMaturity="provisional"> | ||
<name>Energy EVSE</name> | ||
<domain>Energy Management</domain> | ||
<code>0x0099</code> | ||
<define>ENERGY_EVSE_CLUSTER</define> | ||
<client init="false" tick="false">true</client> | ||
<server init="false" tick="false">true</server> | ||
<description>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.</description> | ||
<!--Attributes--> | ||
<attribute code="0x0000" side="server" type="StateEnum" define="STATE" isNullable="true" writable="false" optional="false">State</attribute> | ||
<attribute code="0x0001" side="server" type="SupplyStateEnum" define="SUPPLY_STATE" writable="false" optional="false">SupplyState</attribute> | ||
<attribute code="0x0002" side="server" type="FaultStateEnum" define="FAULT_STATE" writable="false" optional="false">FaultState</attribute> | ||
<attribute code="0x0003" side="server" type="epoch_s" define="CHARGING_ENABLED_UNTIL" isNullable="true" default="0" max="0xFFFFFFFE" writable="false" optional="false">ChargingEnabledUntil</attribute> | ||
<!--Conformance feature V2X - for now optional--> | ||
<attribute code="0x0004" side="server" type="epoch_s" define="DISCHARGING_ENABLED_UNTIL" isNullable="true" default="0" max="0xFFFFFFFE" writable="false" optional="true">DischargingEnabledUntil</attribute> | ||
<attribute code="0x0005" side="server" type="int64s" define="CIRCUIT_CAPACITY" default="0" min="0" max="80000" writable="false" optional="false">CircuitCapacity</attribute> | ||
<attribute code="0x0006" side="server" type="int64s" define="MINIMUM_CHARGE_CURRENT" default="6000" min="0" max="80000" writable="false" optional="false">MinimumChargeCurrent</attribute> | ||
<attribute code="0x0007" side="server" type="int64s" define="MAXIMUM_CHARGE_CURRENT" default="0" min="0" max="80000" writable="false" optional="false">MaximumChargeCurrent</attribute> | ||
<!--Conformance feature V2X - for now optional--> | ||
<attribute code="0x0008" side="server" type="int64s" define="MAXIMUM_DISCHARGE_CURRENT" default="0" min="0" max="80000" writable="false" optional="true">MaximumDischargeCurrent</attribute> | ||
<attribute code="0x0009" side="server" type="int64s" define="USER_MAXIMUM_CHARGE_CURRENT" default="0" writable="true" optional="true"> | ||
<access op="read" privilege="view"/> | ||
<access op="write" privilege="manage"/> | ||
<description>UserMaximumChargeCurrent</description> | ||
</attribute> | ||
<attribute code="0x000A" side="server" type="elapsed_s" define="RANDOMIZATION_DELAY_WINDOW" default="600" writable="true" optional="true"> | ||
<access op="read" privilege="view"/> | ||
<access op="write" privilege="manage"/> | ||
<description>RandomizationDelayWindow</description> | ||
</attribute> | ||
<!--Conformance feature PREF - for now optional--> | ||
<attribute code="0x0021" side="server" type="int8u" define="NUMBER_OF_WEEKLY_TARGETS" default="0" writable="false" optional="true">NumberOfWeeklyTargets</attribute> | ||
<!--Conformance feature PREF - for now optional--> | ||
<attribute code="0x0022" side="server" type="int8u" define="NUMBER_OF_DAILY_TARGETS" default="1" writable="false" optional="true">NumberOfDailyTargets</attribute> | ||
<!--Conformance feature PREF - for now optional--> | ||
<attribute code="0x0023" side="server" type="epoch_s" define="NEXT_CHARGE_START_TIME" isNullable="true" max="0xFFFFFFFE" writable="false" optional="true">NextChargeStartTime</attribute> | ||
<!--Conformance feature PREF - for now optional--> | ||
<attribute code="0x0024" side="server" type="epoch_s" define="NEXT_CHARGE_TARGET_TIME" isNullable="true" max="0xFFFFFFFE" writable="false" optional="true">NextChargeTargetTime</attribute> | ||
<!--Conformance feature PREF - for now optional--> | ||
<attribute code="0x0025" side="server" type="int64s" define="NEXT_CHARGE_REQUIRED_ENERGY" isNullable="true" min="0" max="500000000" writable="false" optional="true">NextChargeRequiredEnergy</attribute> | ||
<!--Conformance feature PREF - for now optional--> | ||
<attribute code="0x0026" side="server" type="percent" define="NEXT_CHARGE_TARGET_SOC" isNullable="true" max="100" writable="false" optional="true">NextChargeTargetSoC</attribute> | ||
<!--Conformance feature [PREF] - for now optional--> | ||
<attribute code="0x0027" side="server" type="int16u" define="APPROXIMATE_EV_EFFICIENCY" isNullable="true" default="0xFFFF" max="0xFFFE" writable="true" optional="true"> | ||
<access op="read" privilege="view"/> | ||
<access op="write" privilege="manage"/> | ||
<description>ApproximateEVEfficiency</description> | ||
</attribute> | ||
<!--Conformance feature SOC - for now optional--> | ||
<attribute code="0x0030" side="server" type="percent" define="STATE_OF_CHARGE" isNullable="true" max="100" writable="false" optional="true">StateOfCharge</attribute> | ||
<!--Conformance feature SOC - for now optional--> | ||
<attribute code="0x0031" side="server" type="int64s" define="BATTERY_CAPACITY" isNullable="true" min="0" max="500000000" writable="false" optional="true">BatteryCapacity</attribute> | ||
<!--Conformance feature PNC - for now optional--> | ||
<attribute code="0x0032" side="server" type="char_string" define="VEHICLE_ID" isNullable="true" length="32" writable="false" optional="true">VehicleID</attribute> | ||
<attribute code="0x0040" side="server" type="int32u" define="SESSION_ID" isNullable="true" default="0" min="1" max="0xFFFFFFFF" writable="false" optional="false">SessionID</attribute> | ||
<attribute code="0x0041" side="server" type="elapsed_s" define="SESSION_DURATION" default="0" writable="false" optional="false">SessionDuration</attribute> | ||
<attribute code="0x0042" side="server" type="int64s" define="SESSION_ENERGY_CHARGED" default="0" min="0" max="500000000" writable="false" optional="false">SessionEnergyCharged</attribute> | ||
<!--Conformance feature V2X - for now optional--> | ||
<attribute code="0x0043" side="server" type="int64s" define="SESSION_ENERGY_DISCHARGED" default="0" min="0" max="500000000" writable="false" optional="true">SessionEnergyDischarged</attribute> | ||
<command source="client" code="0x0001" name="Disable" optional="false" mustUseTimedInvoke="true" apiMaturity="provisional"> | ||
<access op="invoke" privilege="operate"/> | ||
<description>Allows a client to disable the EVSE from charging and discharging.</description> | ||
</command> | ||
<command source="client" code="0x0002" name="EnableCharging" optional="false" mustUseTimedInvoke="true" apiMaturity="provisional"> | ||
<access op="invoke" privilege="operate"/> | ||
<arg name="ChargingEnabledUntil" type="epoch_s" max="0xFFFFFFFE" isNullable="true"/> | ||
<arg name="MinimumChargeCurrent" type="int64s" min="0" max="80000"/> | ||
<arg name="MaximumChargeCurrent" type="int64s" min="0" max="80000"/> | ||
<description>Allows a client to enable the EVSE to charge an EV.</description> | ||
</command> | ||
<command source="client" code="0x0003" name="EnableDischarging" optional="true" mustUseTimedInvoke="true" apiMaturity="provisional"> | ||
<access op="invoke" privilege="operate"/> | ||
<arg name="DischargingEnabledUntil" type="epoch_s" max="0xFFFFFFFE" isNullable="true"/> | ||
<arg name="MaximumDischargeCurrent" type="int64s" min="0" max="80000"/> | ||
<description>Allows a client to enable the EVSE to discharge an EV.</description> | ||
</command> | ||
<command source="client" code="0x0004" name="StartDiagnostics" optional="true" mustUseTimedInvoke="true" apiMaturity="provisional"> | ||
<access op="invoke" privilege="operate"/> | ||
<description>Allows a client to put the EVSE into a self-diagnostics mode.</description> | ||
</command> | ||
<command source="client" code="0x0005" name="SetTargets" optional="true" mustUseTimedInvoke="true" apiMaturity="provisional"> | ||
<access op="invoke" privilege="operate"/> | ||
<arg name="DayOfWeekforSequence" type="TargetDayOfWeekBitmap"/> | ||
<arg name="ChargingTargets" array="true" type="ChargingTargetStruct"/> | ||
<description>Allows a client to set the user specified charging targets.</description> | ||
</command> | ||
<command source="client" code="0x0006" name="GetTargets" optional="true" response="GetTargetsResponse" mustUseTimedInvoke="true" apiMaturity="provisional"> | ||
<access op="invoke" privilege="operate"/> | ||
<arg name="DaysToReturn" type="TargetDayOfWeekBitmap"/> | ||
<description>Allows a client to retrieve the user specified charging targets.</description> | ||
</command> | ||
<command source="client" code="0x0007" name="ClearTargets" optional="true" mustUseTimedInvoke="true" apiMaturity="provisional"> | ||
<access op="invoke" privilege="operate"/> | ||
<description>Allows a client to clear all stored charging targets.</description> | ||
</command> | ||
<command source="server" code="0x0000" name="GetTargetsResponse" optional="true" apiMaturity="provisional"> | ||
<arg name="DayOfWeekforSequence" type="TargetDayOfWeekBitmap"/> | ||
<arg name="ChargingTargets" array="true" type="ChargingTargetStruct"/> | ||
<description>The GetTargetsResponse is sent in response to the GetTargets Command.</description> | ||
</command> | ||
<event code="0x0000" name="EVConnected" priority="info" side="server" apiMaturity="provisional"> | ||
<description>EVConnected</description> | ||
<field id="0" name="SessionID" type="int32u" min="1" max="0xFFFFFFFF" apiMaturity="provisional"/> | ||
</event> | ||
<event code="0x0001" name="EVNotDetected" priority="info" side="server" apiMaturity="provisional"> | ||
<description>EVNotDetected</description> | ||
<field id="0" name="SessionID" type="int32u" min="1" max="0xFFFFFFFF" apiMaturity="provisional"/> | ||
<field id="1" name="State" type="StateEnum" apiMaturity="provisional"/> | ||
<field id="2" name="SessionDuration" type="elapsed_s" apiMaturity="provisional"/> | ||
<field id="3" name="SessionEnergyCharged" type="int64s" min="0" max="500000000" apiMaturity="provisional"/> | ||
<field id="4" name="SessionEnergyDischarged" type="int64s" min="0" max="500000000" optional="true" apiMaturity="provisional"/> | ||
</event> | ||
<event code="0x0002" name="EnergyTransferStarted" priority="info" side="server" apiMaturity="provisional"> | ||
<description>EnergyTransferStarted</description> | ||
<field id="0" name="SessionID" type="int32u" min="1" max="0xFFFFFFFF" apiMaturity="provisional"/> | ||
<field id="1" name="State" type="StateEnum" apiMaturity="provisional"/> | ||
<field id="2" name="MaximumCurrent" type="int64s" min="0" max="80000" apiMaturity="provisional"/> | ||
</event> | ||
<event code="0x0003" name="EnergyTransferStopped" priority="info" side="server" apiMaturity="provisional"> | ||
<description>EnergyTransferStopped</description> | ||
<field id="0" name="SessionID" type="int32u" min="1" max="0xFFFFFFFF" apiMaturity="provisional"/> | ||
<field id="1" name="State" type="StateEnum" apiMaturity="provisional"/> | ||
<field id="2" name="Reason" type="EnergyTransferStoppedReasonEnum" apiMaturity="provisional"/> | ||
<field id="4" name="EnergyTransferred" type="int64s" min="0" max="500000000" apiMaturity="provisional"/> | ||
</event> | ||
<event code="0x0004" name="Fault" priority="critical" side="server" apiMaturity="provisional"> | ||
<description>Fault</description> | ||
<field id="0" name="SessionID" type="int32u" min="1" max="0xFFFFFFFF" apiMaturity="provisional"/> | ||
<field id="1" name="State" type="StateEnum" apiMaturity="provisional"/> | ||
<field id="2" name="FaultStatePreviousState" type="FaultStateEnum" apiMaturity="provisional"/> | ||
<field id="4" name="FaultStateCurrentState" type="FaultStateEnum" apiMaturity="provisional"/> | ||
</event> | ||
<event code="0x0005" name="RFID" priority="info" side="server" apiMaturity="provisional" optional="true"> | ||
<description>RFID</description> | ||
<field id="0" name="UID" type="octet_string" length="10" apiMaturity="provisional"/> | ||
</event> | ||
</cluster> | ||
<bitmap name="Feature" type="bitmap32"> | ||
<cluster code="0x0099"/> | ||
<field name="ChargingPreferences" mask="0x1"/> | ||
<field name="SoCReporting" mask="0x2"/> | ||
<field name="PlugAndCharge" mask="0x4"/> | ||
<field name="RFID" mask="0x8"/> | ||
<field name="V2X" mask="0x10"/> | ||
</bitmap> | ||
</configurator> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.