lib/libesp32/berry_matter/MATTER_CLASS_HIERARCHY.md
Last Updated: January 23, 2026
Matter Version: 1.4.1 Compliant
Data Model Revision: 18 (Matter 1.3+)
This document describes the complete class hierarchy for Matter endpoint plugins in the Berry Matter implementation. The hierarchy follows a structured approach with base classes providing common functionality and specialized classes implementing specific device behaviors.
Recent Updates (Matter 1.4.1):
Matter_Plugin (Base Class)
├── Matter_Plugin_Root
├── Matter_Plugin_Aggregator
└── Matter_Plugin_Device
├── Matter_Plugin_Light0
│ ├── Matter_Plugin_Light1
│ │ ├── Matter_Plugin_Light2
│ │ └── Matter_Plugin_Light3
│ ├── Matter_Plugin_OnOff
│ ├── Matter_Plugin_Bridge_Light0
│ │ └── Matter_Plugin_Bridge_OnOff
│ ├── Matter_Plugin_Bridge_Light1
│ ├── Matter_Plugin_Bridge_Light2
│ ├── Matter_Plugin_Bridge_Light3
│ ├── Matter_Plugin_Virt_Light0
│ ├── Matter_Plugin_Virt_Light1
│ ├── Matter_Plugin_Virt_Light2
│ ├── Matter_Plugin_Virt_Light3
│ ├── Matter_Plugin_Virt_OnOff
│ ├── Matter_Plugin_Zigbee_Light0
│ ├── Matter_Plugin_Zigbee_Light1
│ └── Matter_Plugin_Zigbee_Light2
├── Matter_Plugin_Fan
│ └── Matter_Plugin_Virt_Fan
├── Matter_Plugin_Shutter
│ └── Matter_Plugin_ShutterTilt
├── Matter_Plugin_Sensor
│ ├── Matter_Plugin_Sensor_Temp
│ │ ├── Matter_Plugin_Bridge_Sensor_Temp
│ │ ├── Matter_Plugin_Virt_Sensor_Temp
│ │ └── Matter_Plugin_Zigbee_Temperature
│ ├── Matter_Plugin_Sensor_Humidity
│ │ ├── Matter_Plugin_Bridge_Sensor_Humidity
│ │ ├── Matter_Plugin_Virt_Sensor_Humidity
│ │ └── Matter_Plugin_Zigbee_Humidity
│ ├── Matter_Plugin_Sensor_Pressure
│ │ ├── Matter_Plugin_Bridge_Sensor_Pressure
│ │ ├── Matter_Plugin_Virt_Sensor_Pressure
│ │ └── Matter_Plugin_Zigbee_Pressure
│ ├── Matter_Plugin_Sensor_Illuminance
│ │ ├── Matter_Plugin_Bridge_Sensor_Illuminance
│ │ └── Matter_Plugin_Virt_Sensor_Illuminance
│ └── Matter_Plugin_Sensor_Flow
│ ├── Matter_Plugin_Bridge_Sensor_Flow
│ └── Matter_Plugin_Virt_Sensor_Flow
├── Matter_Plugin_Sensor_Boolean
│ ├── Matter_Plugin_Sensor_Contact
│ │ ├── Matter_Plugin_Bridge_Sensor_Contact
│ │ └── Matter_Plugin_Virt_Sensor_Contact
│ ├── Matter_Plugin_Sensor_Occupancy
│ │ ├── Matter_Plugin_Bridge_Sensor_Occupancy
│ │ ├── Matter_Plugin_Virt_Sensor_Occupancy
│ │ └── Matter_Plugin_Zigbee_Occupancy
│ ├── Matter_Plugin_Sensor_OnOff
│ ├── Matter_Plugin_Sensor_Rain
│ │ ├── Matter_Plugin_Bridge_Sensor_Rain
│ │ └── Matter_Plugin_Virt_Sensor_Rain
│ └── Matter_Plugin_Sensor_Waterleak
│ ├── Matter_Plugin_Bridge_Sensor_Waterleak
│ └── Matter_Plugin_Virt_Sensor_Waterleak
├── Matter_Plugin_Sensor_Air_Quality
│ ├── Matter_Plugin_Bridge_Sensor_Air_Quality
│ └── Matter_Plugin_Virt_Sensor_Air_Quality
└── Matter_Plugin_Sensor_GenericSwitch_Btn
File: Matter_Plugin_0.be
Static Properties:
static var TYPE = "" # Plugin type identifier
static var DISPLAY_NAME = "" # Human-readable name
static var ARG = "" # Configuration argument name
static var UPDATE_TIME = 5000 # Update frequency (ms)
static var VIRTUAL = false # Virtual device flag
static var BRIDGE = false # Bridge device flag
static var ZIGBEE = false # Zigbee device flag
static var CLUSTERS = { 0x001D: [0,1,2,3] } # Descriptor cluster
File: Matter_Plugin_1_Root.be
"root""Root node"0x0016 (Root node) - Rev 3 (Matter 1.4.1)0x001F: Access Control0x0028: Basic Information (Data Model Rev 18)0x002B: Localization Configuration0x002C: Time Format Localization0x002D: Unit Localization (Matter 1.3+)0x0030: General Commissioning0x0031: Network Commissioning0x003C: Administrator Commissioning0x003E: Node Operational Credentials0x003F: Group Key Management0x0046: ICD Management (SIT mode)File: Matter_Plugin_1_Aggregator.be
"aggregator""Aggregator"0x000E (Aggregator)File: Matter_Plugin_1_Device.be
0x0039: Bridged Device Basic Information0x0003: Identify0x0004: Groups0x0005: ScenesFile: Matter_Plugin_2_Light0.be
"light0""Light 0 OnOff"0x0100 (OnOff Light) - Rev 3 (Matter 1.4.1)0x0006 (On/Off), 0x0062 (Scenes Management)"relay" (Relay number)File: Matter_Plugin_3_Light1.be
"light1""Light 1 Dimmer"0x0101 (Dimmable Light) - Rev 3 (Matter 1.4.1)0x0008 (Level Control), 0x0062 (Scenes Management)File: Matter_Plugin_4_Light2.be
"light2""Light 2 Color Temp"0x010C (Color Temperature Light) - Rev 4 (Matter 1.4.1)0x0300 (Color Control with RemainingTime), 0x0062 (Scenes Management)File: Matter_Plugin_4_Light3.be
"light3""Light 3 RGB"0x010D (Extended Color Light) - Rev 4 (Matter 1.4.1)0x0300 (Color Control - HS + CT modes), 0x0062 (Scenes Management)File: Matter_Plugin_2_Sensor.be
File: Matter_Plugin_2_Sensor_Boolean.be
"temperature" → Device Type 0x03020x0402 (Temperature Measurement)"humidity" → Device Type 0x03070x0405 (Relative Humidity Measurement)"pressure" → Device Type 0x03050x0403 (Pressure Measurement)"illuminance" → Device Type 0x01060x0400 (Illuminance Measurement)"contact" → Device Type 0x00150x0045 (Boolean State)"occupancy" → Device Type 0x01070x0406 (Occupancy Sensing)"flow" → Device Type 0x03060x0404 (Flow Measurement)"airquality" → Device Type 0x002C0x042A (Air Quality)Prefix: Matter_Plugin_Bridge_*
BRIDGE = true"http_*"Prefix: Matter_Plugin_Virt_*
VIRTUAL = true"v_*"Prefix: Matter_Plugin_Zigbee_*
ZIGBEE = true"z_*""fan""Fan"0x002B (Fan)0x0202 (Fan Control)"relay""Relay"0x010A (On/Off Plug-in Unit)"shutter""Shutter"0x0202 (Window Covering)0x0102 (Window Covering)"gensw_btn""Generic Switch/Button"0x000F (Generic Switch)0x003B (Switch)The Matter implementation uses a hierarchical approach for plugin selection:
Matter_PluginRoot, Device, etc.)Light0, Sensor, etc.){
"type": "light1",
"relay": 1
}
{
"type": "http_light1",
"url": "192.168.1.100",
"relay": 1
}
{
"type": "v_temperature"
}
{
"type": "z_temperature",
"zigbee_device": "0x1234"
}
| Plugin Type | Matter Device Type | Hex | Rev | Description |
|---|---|---|---|---|
| root | Root Node | 0x0016 | 3 | Matter root device |
| aggregator | Aggregator | 0x000E | 2 | Endpoint aggregator |
| light0 | OnOff Light | 0x0100 | 3 | Basic on/off light |
| light1 | Dimmable Light | 0x0101 | 3 | Dimmable light |
| light2 | Color Temperature Light | 0x010C | 4 | CT adjustable light |
| light3 | Extended Color Light | 0x010D | 4 | Full RGB+CT light |
| relay | On/Off Plug-in Unit | 0x010A | 3 | Generic relay/switch |
| fan | Fan | 0x002B | 3 | Fan control |
| shutter | Window Covering | 0x0202 | 3 | Window covering |
| temperature | Temperature Sensor | 0x0302 | 2 | Temperature measurement |
| humidity | Humidity Sensor | 0x0307 | 2 | Humidity measurement |
| pressure | Pressure Sensor | 0x0305 | 2 | Pressure measurement |
| illuminance | Light Sensor | 0x0106 | 3 | Illuminance measurement |
| contact | Contact Sensor | 0x0015 | 2 | Contact/door sensor |
| occupancy | Occupancy Sensor | 0x0107 | 4 | Motion/occupancy sensor |
| flow | Flow Sensor | 0x0306 | 2 | Flow measurement |
| airquality | Air Quality Sensor | 0x002C | 1 | Air quality measurement |
| gensw_btn | Generic Switch | 0x000F | 3 | Button/switch |
This hierarchy provides a flexible and extensible framework for implementing Matter devices across different deployment scenarios while maintaining code reuse and consistent behavior patterns.
Documentation generated: June 27, 2025 Based on Berry Matter implementation analysis