Skip to content

Commit 6c4f94b

Browse files
authored
[Chef] Add Power Source cluster to Water leak sensor EP1 (#35410)
* Update rootnode_waterleakdetector_0b067acfa3.zap Add Power Source cluster to EP1 to simulate a battery * Update rootnode_waterleakdetector_0b067acfa3.matter Add Power Source cluster to EP1 to Matter file * Update rootnode_waterleakdetector_0b067acfa3.matter * Update rootnode_waterleakdetector_0b067acfa3.zap * Update rootnode_waterleakdetector_0b067acfa3.matter Remove Scenes Management Cluster * Manual correction of device type order due to ZAP tool bug * Update rootnode_waterleakdetector_0b067acfa3.zap * Update rootnode_waterleakdetector_0b067acfa3.zap * Update rootnode_waterleakdetector_0b067acfa3.zap * Update rootnode_waterleakdetector_0b067acfa3.matter * Update rootnode_waterleakdetector_0b067acfa3.zap * Update rootnode_waterleakdetector_0b067acfa3.matter
1 parent 8a39aff commit 6c4f94b

File tree

2 files changed

+615
-6
lines changed

2 files changed

+615
-6
lines changed

examples/chef/devices/rootnode_waterleakdetector_0b067acfa3.matter

+282
Original file line numberDiff line numberDiff line change
@@ -623,6 +623,265 @@ cluster BasicInformation = 40 {
623623
command MfgSpecificPing(): DefaultSuccess = 0;
624624
}
625625

626+
/** This cluster is used to describe the configuration and capabilities of a physical power source that provides power to the Node. */
627+
cluster PowerSource = 47 {
628+
revision 1; // NOTE: Default/not specifically set
629+
630+
enum BatApprovedChemistryEnum : enum16 {
631+
kUnspecified = 0;
632+
kAlkaline = 1;
633+
kLithiumCarbonFluoride = 2;
634+
kLithiumChromiumOxide = 3;
635+
kLithiumCopperOxide = 4;
636+
kLithiumIronDisulfide = 5;
637+
kLithiumManganeseDioxide = 6;
638+
kLithiumThionylChloride = 7;
639+
kMagnesium = 8;
640+
kMercuryOxide = 9;
641+
kNickelOxyhydride = 10;
642+
kSilverOxide = 11;
643+
kZincAir = 12;
644+
kZincCarbon = 13;
645+
kZincChloride = 14;
646+
kZincManganeseDioxide = 15;
647+
kLeadAcid = 16;
648+
kLithiumCobaltOxide = 17;
649+
kLithiumIon = 18;
650+
kLithiumIonPolymer = 19;
651+
kLithiumIronPhosphate = 20;
652+
kLithiumSulfur = 21;
653+
kLithiumTitanate = 22;
654+
kNickelCadmium = 23;
655+
kNickelHydrogen = 24;
656+
kNickelIron = 25;
657+
kNickelMetalHydride = 26;
658+
kNickelZinc = 27;
659+
kSilverZinc = 28;
660+
kSodiumIon = 29;
661+
kSodiumSulfur = 30;
662+
kZincBromide = 31;
663+
kZincCerium = 32;
664+
}
665+
666+
enum BatChargeFaultEnum : enum8 {
667+
kUnspecified = 0;
668+
kAmbientTooHot = 1;
669+
kAmbientTooCold = 2;
670+
kBatteryTooHot = 3;
671+
kBatteryTooCold = 4;
672+
kBatteryAbsent = 5;
673+
kBatteryOverVoltage = 6;
674+
kBatteryUnderVoltage = 7;
675+
kChargerOverVoltage = 8;
676+
kChargerUnderVoltage = 9;
677+
kSafetyTimeout = 10;
678+
}
679+
680+
enum BatChargeLevelEnum : enum8 {
681+
kOK = 0;
682+
kWarning = 1;
683+
kCritical = 2;
684+
}
685+
686+
enum BatChargeStateEnum : enum8 {
687+
kUnknown = 0;
688+
kIsCharging = 1;
689+
kIsAtFullCharge = 2;
690+
kIsNotCharging = 3;
691+
}
692+
693+
enum BatCommonDesignationEnum : enum16 {
694+
kUnspecified = 0;
695+
kAAA = 1;
696+
kAA = 2;
697+
kC = 3;
698+
kD = 4;
699+
k4v5 = 5;
700+
k6v0 = 6;
701+
k9v0 = 7;
702+
k12AA = 8;
703+
kAAAA = 9;
704+
kA = 10;
705+
kB = 11;
706+
kF = 12;
707+
kN = 13;
708+
kNo6 = 14;
709+
kSubC = 15;
710+
kA23 = 16;
711+
kA27 = 17;
712+
kBA5800 = 18;
713+
kDuplex = 19;
714+
k4SR44 = 20;
715+
k523 = 21;
716+
k531 = 22;
717+
k15v0 = 23;
718+
k22v5 = 24;
719+
k30v0 = 25;
720+
k45v0 = 26;
721+
k67v5 = 27;
722+
kJ = 28;
723+
kCR123A = 29;
724+
kCR2 = 30;
725+
k2CR5 = 31;
726+
kCRP2 = 32;
727+
kCRV3 = 33;
728+
kSR41 = 34;
729+
kSR43 = 35;
730+
kSR44 = 36;
731+
kSR45 = 37;
732+
kSR48 = 38;
733+
kSR54 = 39;
734+
kSR55 = 40;
735+
kSR57 = 41;
736+
kSR58 = 42;
737+
kSR59 = 43;
738+
kSR60 = 44;
739+
kSR63 = 45;
740+
kSR64 = 46;
741+
kSR65 = 47;
742+
kSR66 = 48;
743+
kSR67 = 49;
744+
kSR68 = 50;
745+
kSR69 = 51;
746+
kSR516 = 52;
747+
kSR731 = 53;
748+
kSR712 = 54;
749+
kLR932 = 55;
750+
kA5 = 56;
751+
kA10 = 57;
752+
kA13 = 58;
753+
kA312 = 59;
754+
kA675 = 60;
755+
kAC41E = 61;
756+
k10180 = 62;
757+
k10280 = 63;
758+
k10440 = 64;
759+
k14250 = 65;
760+
k14430 = 66;
761+
k14500 = 67;
762+
k14650 = 68;
763+
k15270 = 69;
764+
k16340 = 70;
765+
kRCR123A = 71;
766+
k17500 = 72;
767+
k17670 = 73;
768+
k18350 = 74;
769+
k18500 = 75;
770+
k18650 = 76;
771+
k19670 = 77;
772+
k25500 = 78;
773+
k26650 = 79;
774+
k32600 = 80;
775+
}
776+
777+
enum BatFaultEnum : enum8 {
778+
kUnspecified = 0;
779+
kOverTemp = 1;
780+
kUnderTemp = 2;
781+
}
782+
783+
enum BatReplaceabilityEnum : enum8 {
784+
kUnspecified = 0;
785+
kNotReplaceable = 1;
786+
kUserReplaceable = 2;
787+
kFactoryReplaceable = 3;
788+
}
789+
790+
enum PowerSourceStatusEnum : enum8 {
791+
kUnspecified = 0;
792+
kActive = 1;
793+
kStandby = 2;
794+
kUnavailable = 3;
795+
}
796+
797+
enum WiredCurrentTypeEnum : enum8 {
798+
kAC = 0;
799+
kDC = 1;
800+
}
801+
802+
enum WiredFaultEnum : enum8 {
803+
kUnspecified = 0;
804+
kOverVoltage = 1;
805+
kUnderVoltage = 2;
806+
}
807+
808+
bitmap Feature : bitmap32 {
809+
kWired = 0x1;
810+
kBattery = 0x2;
811+
kRechargeable = 0x4;
812+
kReplaceable = 0x8;
813+
}
814+
815+
struct BatChargeFaultChangeType {
816+
BatChargeFaultEnum current[] = 0;
817+
BatChargeFaultEnum previous[] = 1;
818+
}
819+
820+
struct BatFaultChangeType {
821+
BatFaultEnum current[] = 0;
822+
BatFaultEnum previous[] = 1;
823+
}
824+
825+
struct WiredFaultChangeType {
826+
WiredFaultEnum current[] = 0;
827+
WiredFaultEnum previous[] = 1;
828+
}
829+
830+
info event WiredFaultChange = 0 {
831+
WiredFaultEnum current[] = 0;
832+
WiredFaultEnum previous[] = 1;
833+
}
834+
835+
info event BatFaultChange = 1 {
836+
BatFaultEnum current[] = 0;
837+
BatFaultEnum previous[] = 1;
838+
}
839+
840+
info event BatChargeFaultChange = 2 {
841+
BatChargeFaultEnum current[] = 0;
842+
BatChargeFaultEnum previous[] = 1;
843+
}
844+
845+
readonly attribute PowerSourceStatusEnum status = 0;
846+
readonly attribute int8u order = 1;
847+
readonly attribute char_string<60> description = 2;
848+
readonly attribute optional nullable int32u wiredAssessedInputVoltage = 3;
849+
readonly attribute optional nullable int16u wiredAssessedInputFrequency = 4;
850+
readonly attribute optional WiredCurrentTypeEnum wiredCurrentType = 5;
851+
readonly attribute optional nullable int32u wiredAssessedCurrent = 6;
852+
readonly attribute optional int32u wiredNominalVoltage = 7;
853+
readonly attribute optional int32u wiredMaximumCurrent = 8;
854+
readonly attribute optional boolean wiredPresent = 9;
855+
readonly attribute optional WiredFaultEnum activeWiredFaults[] = 10;
856+
readonly attribute optional nullable int32u batVoltage = 11;
857+
readonly attribute optional nullable int8u batPercentRemaining = 12;
858+
readonly attribute optional nullable int32u batTimeRemaining = 13;
859+
readonly attribute optional BatChargeLevelEnum batChargeLevel = 14;
860+
readonly attribute optional boolean batReplacementNeeded = 15;
861+
readonly attribute optional BatReplaceabilityEnum batReplaceability = 16;
862+
readonly attribute optional boolean batPresent = 17;
863+
readonly attribute optional BatFaultEnum activeBatFaults[] = 18;
864+
readonly attribute optional char_string<60> batReplacementDescription = 19;
865+
readonly attribute optional BatCommonDesignationEnum batCommonDesignation = 20;
866+
readonly attribute optional char_string<20> batANSIDesignation = 21;
867+
readonly attribute optional char_string<20> batIECDesignation = 22;
868+
readonly attribute optional BatApprovedChemistryEnum batApprovedChemistry = 23;
869+
readonly attribute optional int32u batCapacity = 24;
870+
readonly attribute optional int8u batQuantity = 25;
871+
readonly attribute optional BatChargeStateEnum batChargeState = 26;
872+
readonly attribute optional nullable int32u batTimeToFullCharge = 27;
873+
readonly attribute optional boolean batFunctionalWhileCharging = 28;
874+
readonly attribute optional nullable int32u batChargingCurrent = 29;
875+
readonly attribute optional BatChargeFaultEnum activeBatChargeFaults[] = 30;
876+
readonly attribute endpoint_no endpointList[] = 31;
877+
readonly attribute command_id generatedCommandList[] = 65528;
878+
readonly attribute command_id acceptedCommandList[] = 65529;
879+
readonly attribute event_id eventList[] = 65530;
880+
readonly attribute attrib_id attributeList[] = 65531;
881+
readonly attribute bitmap32 featureMap = 65532;
882+
readonly attribute int16u clusterRevision = 65533;
883+
}
884+
626885
/** This cluster is used to manage global aspects of the Commissioning flow. */
627886
cluster GeneralCommissioning = 48 {
628887
revision 1; // NOTE: Default/not specifically set
@@ -1576,6 +1835,7 @@ endpoint 0 {
15761835
}
15771836
}
15781837
endpoint 1 {
1838+
device type ma_powersource = 17, version 1;
15791839
device type ma_water_leak_detector = 67, version 1;
15801840

15811841

@@ -1627,6 +1887,28 @@ endpoint 1 {
16271887
callback attribute clusterRevision;
16281888
}
16291889

1890+
server cluster PowerSource {
1891+
ram attribute status default = 1;
1892+
ram attribute order default = 1;
1893+
ram attribute description default = "Primary Battery";
1894+
ram attribute batVoltage default = 4100;
1895+
ram attribute batPercentRemaining default = 95;
1896+
ram attribute batTimeRemaining default = 518400;
1897+
ram attribute batChargeLevel default = 0;
1898+
ram attribute batReplaceability default = 1;
1899+
ram attribute batPresent default = 1;
1900+
ram attribute batCapacity default = 350;
1901+
ram attribute batChargeState default = 4;
1902+
ram attribute batFunctionalWhileCharging default = 1;
1903+
callback attribute endpointList;
1904+
callback attribute generatedCommandList;
1905+
callback attribute acceptedCommandList;
1906+
callback attribute eventList;
1907+
callback attribute attributeList;
1908+
ram attribute featureMap default = 0x06;
1909+
ram attribute clusterRevision default = 1;
1910+
}
1911+
16301912
server cluster BooleanState {
16311913
ram attribute stateValue;
16321914
callback attribute generatedCommandList;

0 commit comments

Comments
 (0)