blob: 0256e6e0434690e6889fcce1676db00b54a8a43a [file] [log] [blame]
syntax = "proto3";
import 'pw_protobuf_protos/common.proto';
package chip.rpc;
enum AttributeType {
ZCL_NO_DATA_ATTRIBUTE_TYPE = 0x00; // No data
ZCL_BOOLEAN_ATTRIBUTE_TYPE = 0x10; // Boolean
ZCL_BITMAP8_ATTRIBUTE_TYPE = 0x18; // 8-bit bitmap
ZCL_BITMAP16_ATTRIBUTE_TYPE = 0x19; // 16-bit bitmap
ZCL_BITMAP32_ATTRIBUTE_TYPE = 0x1B; // 32-bit bitmap
ZCL_BITMAP64_ATTRIBUTE_TYPE = 0x1F; // 64-bit bitmap
ZCL_INT8U_ATTRIBUTE_TYPE = 0x20; // Unsigned 8-bit integer
ZCL_INT16U_ATTRIBUTE_TYPE = 0x21; // Unsigned 16-bit integer
ZCL_INT24U_ATTRIBUTE_TYPE = 0x22; // Unsigned 24-bit integer
ZCL_INT32U_ATTRIBUTE_TYPE = 0x23; // Unsigned 32-bit integer
ZCL_INT40U_ATTRIBUTE_TYPE = 0x24; // Unsigned 40-bit integer
ZCL_INT48U_ATTRIBUTE_TYPE = 0x25; // Unsigned 48-bit integer
ZCL_INT56U_ATTRIBUTE_TYPE = 0x26; // Unsigned 56-bit integer
ZCL_INT64U_ATTRIBUTE_TYPE = 0x27; // Unsigned 64-bit integer
ZCL_INT8S_ATTRIBUTE_TYPE = 0x28; // Signed 8-bit integer
ZCL_INT16S_ATTRIBUTE_TYPE = 0x29; // Signed 16-bit integer
ZCL_INT24S_ATTRIBUTE_TYPE = 0x2A; // Signed 24-bit integer
ZCL_INT32S_ATTRIBUTE_TYPE = 0x2B; // Signed 32-bit integer
ZCL_INT40S_ATTRIBUTE_TYPE = 0x2C; // Signed 40-bit integer
ZCL_INT48S_ATTRIBUTE_TYPE = 0x2D; // Signed 48-bit integer
ZCL_INT56S_ATTRIBUTE_TYPE = 0x2E; // Signed 56-bit integer
ZCL_INT64S_ATTRIBUTE_TYPE = 0x2F; // Signed 64-bit integer
ZCL_ENUM8_ATTRIBUTE_TYPE = 0x30; // 8-bit enumeration
ZCL_ENUM16_ATTRIBUTE_TYPE = 0x31; // 16-bit enumeration
ZCL_SINGLE_ATTRIBUTE_TYPE = 0x39; // Single precision
ZCL_DOUBLE_ATTRIBUTE_TYPE = 0x3A; // Double precision
ZCL_OCTET_STRING_ATTRIBUTE_TYPE = 0x41; // Octet String
ZCL_CHAR_STRING_ATTRIBUTE_TYPE = 0x42; // Character String
ZCL_LONG_OCTET_STRING_ATTRIBUTE_TYPE = 0x43; // Long Octet String
ZCL_LONG_CHAR_STRING_ATTRIBUTE_TYPE = 0x44; // Long Character String
ZCL_ARRAY_ATTRIBUTE_TYPE = 0x48; // List
ZCL_STRUCT_ATTRIBUTE_TYPE = 0x4C; // Structure
ZCL_TOD_ATTRIBUTE_TYPE = 0xE0; // Time of day
ZCL_DATE_ATTRIBUTE_TYPE = 0xE1; // Date
ZCL_UTC_ATTRIBUTE_TYPE = 0xE2; // UTC Time
ZCL_EPOCH_US_ATTRIBUTE_TYPE = 0xE3; // Epoch Microseconds
ZCL_EPOCH_S_ATTRIBUTE_TYPE = 0xE4; // Epoch Seconds
ZCL_SYSTIME_US_ATTRIBUTE_TYPE = 0xE5; // System Time Microseconds
ZCL_PERCENT_ATTRIBUTE_TYPE = 0xE6; // Percentage units 1%
ZCL_PERCENT100THS_ATTRIBUTE_TYPE = 0xE7; // Percentage units 0.01%
ZCL_CLUSTER_ID_ATTRIBUTE_TYPE = 0xE8; // Cluster ID
ZCL_ATTRIB_ID_ATTRIBUTE_TYPE = 0xE9; // Attribute ID
ZCL_FIELD_ID_ATTRIBUTE_TYPE = 0xEA; // Field ID
ZCL_EVENT_ID_ATTRIBUTE_TYPE = 0xEB; // Event ID
ZCL_COMMAND_ID_ATTRIBUTE_TYPE = 0xEC; // Command ID
ZCL_ACTION_ID_ATTRIBUTE_TYPE = 0xED; // Action ID
ZCL_TRANS_ID_ATTRIBUTE_TYPE = 0xEF; // Transaction ID
ZCL_NODE_ID_ATTRIBUTE_TYPE = 0xF0; // Node ID
ZCL_VENDOR_ID_ATTRIBUTE_TYPE = 0xF1; // Vendor ID
ZCL_DEVTYPE_ID_ATTRIBUTE_TYPE = 0xF2; // Device Type ID
ZCL_FABRIC_ID_ATTRIBUTE_TYPE = 0xF3; // Fabric ID
ZCL_GROUP_ID_ATTRIBUTE_TYPE = 0xF4; // Group ID
ZCL_STATUS_ATTRIBUTE_TYPE = 0xF5; // Status Code
ZCL_DATA_VER_ATTRIBUTE_TYPE = 0xF6; // Data Version
ZCL_EVENT_NO_ATTRIBUTE_TYPE = 0xF7; // Event Number
ZCL_ENDPOINT_NO_ATTRIBUTE_TYPE = 0xF8; // Endpoint Number
ZCL_FABRIC_IDX_ATTRIBUTE_TYPE = 0xF9; // Fabric Index
ZCL_IPADR_ATTRIBUTE_TYPE = 0xFA; // IP Address
ZCL_IPV4ADR_ATTRIBUTE_TYPE = 0xFB; // IPv4 Address
ZCL_IPV6ADR_ATTRIBUTE_TYPE = 0xFC; // IPv6 Address
ZCL_IPV6PRE_ATTRIBUTE_TYPE = 0xFD; // IPv6 Prefix
ZCL_HWADR_ATTRIBUTE_TYPE = 0xFE; // Hardware Address
ZCL_UNKNOWN_ATTRIBUTE_TYPE = 0xFF; // Unknown
}
enum ClusterType {
ZCL_INVALID_CLUSTER_ID = 0x0000;
ZCL_POWER_CONFIG_CLUSTER_ID = 0x0001;
ZCL_DEVICE_TEMP_CLUSTER_ID = 0x0002;
ZCL_IDENTIFY_CLUSTER_ID = 0x0003;
ZCL_GROUPS_CLUSTER_ID = 0x0004;
ZCL_SCENES_CLUSTER_ID = 0x0005;
ZCL_ON_OFF_CLUSTER_ID = 0x0006;
ZCL_ON_OFF_SWITCH_CONFIGURATION_CLUSTER_ID = 0x0007;
ZCL_LEVEL_CONTROL_CLUSTER_ID = 0x0008;
ZCL_ALARM_CLUSTER_ID = 0x0009;
ZCL_TIME_CLUSTER_ID = 0x000A;
ZCL_BINARY_INPUT_BASIC_CLUSTER_ID = 0x000F;
ZCL_POWER_PROFILE_CLUSTER_ID = 0x001A;
ZCL_APPLIANCE_CONTROL_CLUSTER_ID = 0x001B;
ZCL_DESCRIPTOR_CLUSTER_ID = 0x001D;
ZCL_POLL_CONTROL_CLUSTER_ID = 0x0020;
ZCL_ACTIONS_CLUSTER_ID = 0x0025;
ZCL_BASIC_CLUSTER_ID = 0x0028;
ZCL_OTA_SOFTWARE_UPDATE_PROVIDER_CLUSTER_ID = 0x0029;
ZCL_OTA_SOFTWARE_UPDATE_REQUESTOR_CLUSTER_ID = 0x002A;
ZCL_UNIT_LOCALIZATION_CLUSTER_ID = 0x002D;
ZCL_POWER_SOURCE_CLUSTER_ID = 0x002F;
ZCL_GENERAL_COMMISSIONING_CLUSTER_ID = 0x0030;
ZCL_NETWORK_COMMISSIONING_CLUSTER_ID = 0x0031;
ZCL_DIAGNOSTIC_LOGS_CLUSTER_ID = 0x0032;
ZCL_GENERAL_DIAGNOSTICS_CLUSTER_ID = 0x0033;
ZCL_SOFTWARE_DIAGNOSTICS_CLUSTER_ID = 0x0034;
ZCL_THREAD_NETWORK_DIAGNOSTICS_CLUSTER_ID = 0x0035;
ZCL_WIFI_NETWORK_DIAGNOSTICS_CLUSTER_ID = 0x0036;
ZCL_ETHERNET_NETWORK_DIAGNOSTICS_CLUSTER_ID = 0x0037;
ZCL_BRIDGED_DEVICE_BASIC_INFORMATION_CLUSTER_ID = 0x0039;
ZCL_SWITCH_CLUSTER_ID = 0x003B;
ZCL_ADMINISTRATOR_COMMISSIONING_CLUSTER_ID = 0x003C;
ZCL_OPERATIONAL_CREDENTIALS_CLUSTER_ID = 0x003E;
ZCL_FIXED_LABEL_CLUSTER_ID = 0x0040;
ZCL_BOOLEAN_STATE_CLUSTER_ID = 0x0045;
ZCL_MODE_SELECT_CLUSTER_ID = 0x0050;
ZCL_LAUNDRY_WASHER_MODE_CLUSTER_ID = 0x0051;
ZCL_REFRIGERATOR_AND_TEMPERATURE_CONTROLLED_CABINET_MODE_CLUSTER_ID = 0x0052;
ZCL_LAUNDRY_WASHER_CONTROLS_CLUSTER_ID = 0x0053;
ZCL_RVC_RUN_MODE_CLUSTER_ID = 0x0054;
ZCL_RVC_CLEAN_MODE_CLUSTER_ID = 0x0055;
ZCL_TEMPERATURE_CONTROL_CLUSTER_ID = 0x0056;
ZCL_REFRIGERATOR_ALARM_CLUSTER_ID = 0x0057;
ZCL_DISHWASHER_MODE_CLUSTER_ID = 0x0059;
ZCL_AIR_QUALITY_CLUSTER_ID = 0x005B;
ZCL_DISHWASHER_ALARM_CLUSTER_ID = 0x005D;
ZCL_SMOKE_CO_ALARM_ID = 0x005C;
ZCL_OPERATIONAL_STATE_CLUSTER_ID = 0x0060;
ZCL_RVC_OPERATIONAL_STATE_CLUSTER_ID = 0x0061;
ZCL_HEPA_FILTER_MONITORING_CLUSTER_ID = 0x0071;
ZCL_ACTIVATED_CARBON_FILTER_MONITORING_CLUSTER_ID = 0x0072;
ZCL_SHADE_CONFIG_CLUSTER_ID = 0x0100;
ZCL_DOOR_LOCK_CLUSTER_ID = 0x0101;
ZCL_WINDOW_COVERING_CLUSTER_ID = 0x0102;
ZCL_BARRIER_CONTROL_CLUSTER_ID = 0x0103;
ZCL_PUMP_CONFIGURATION_AND_CONTROL_CLUSTER_ID = 0x0200;
ZCL_THERMOSTAT_CLUSTER_ID = 0x0201;
ZCL_FAN_CONTROL_CLUSTER_ID = 0x0202;
ZCL_DEHUMID_CONTROL_CLUSTER_ID = 0x0203;
ZCL_THERMOSTAT_USER_INTERFACE_CONFIGURATION_CLUSTER_ID = 0x0204;
ZCL_COLOR_CONTROL_CLUSTER_ID = 0x0300;
ZCL_BALLAST_CONFIGURATION_CLUSTER_ID = 0x0301;
ZCL_ILLUMINANCE_MEASUREMENT_CLUSTER_ID = 0x0400;
ZCL_TEMPERATURE_MEASUREMENT_CLUSTER_ID = 0x0402;
ZCL_PRESSURE_MEASUREMENT_CLUSTER_ID = 0x0403;
ZCL_FLOW_MEASUREMENT_CLUSTER_ID = 0x0404;
ZCL_RELATIVE_HUMIDITY_MEASUREMENT_CLUSTER_ID = 0x0405;
ZCL_OCCUPANCY_SENSING_CLUSTER_ID = 0x0406;
ZCL_CARBON_MONOXIDE_CONCENTRATION_MEASUREMENT_CLUSTER_ID = 0x040C;
ZCL_CARBON_DIOXIDE_CONCENTRATION_MEASUREMENT_CLUSTER_ID = 0x040D;
ZCL_ETHYLENE_CONCENTRATION_MEASUREMENT_CLUSTER_ID = 0x040E;
ZCL_ETHYLENE_OXIDE_CONCENTRATION_MEASUREMENT_CLUSTER_ID = 0x040F;
ZCL_HYDROGEN_CONCENTRATION_MEASUREMENT_CLUSTER_ID = 0x0410;
ZCL_HYDROGEN_SULPHIDE_CONCENTRATION_MEASUREMENT_CLUSTER_ID = 0x0411;
ZCL_NITRIC_OXIDE_CONCENTRATION_MEASUREMENT_CLUSTER_ID = 0x0412;
ZCL_NITROGEN_DIOXIDE_CONCENTRATION_MEASUREMENT_CLUSTER_ID = 0x0413;
ZCL_OXYGEN_CONCENTRATION_MEASUREMENT_CLUSTER_ID = 0x0414;
ZCL_OZONE_CONCENTRATION_MEASUREMENT_CLUSTER_ID = 0x0415;
ZCL_SULFUR_DIOXIDE_CONCENTRATION_MEASUREMENT_CLUSTER_ID = 0x0416;
ZCL_DISSOLVED_OXYGEN_CONCENTRATION_MEASUREMENT_CLUSTER_ID = 0x0417;
ZCL_BROMATE_CONCENTRATION_MEASUREMENT_CLUSTER_ID = 0x0418;
ZCL_CHLORAMINES_CONCENTRATION_MEASUREMENT_CLUSTER_ID = 0x0419;
ZCL_CHLORINE_CONCENTRATION_MEASUREMENT_CLUSTER_ID = 0x041A;
ZCL_FECAL_COLIFORM_AND_E_COLI_CONCENTRATION_MEASUREMENT_CLUSTER_ID = 0x041B;
ZCL_FLUORIDE_CONCENTRATION_MEASUREMENT_CLUSTER_ID = 0x041C;
ZCL_HALOACETIC_ACIDS_CONCENTRATION_MEASUREMENT_CLUSTER_ID = 0x041D;
ZCL_TOTAL_TRIHALOMETHANES_CONCENTRATION_MEASUREMENT_CLUSTER_ID = 0x041E;
ZCL_TOTAL_COLIFORM_BACTERIA_CONCENTRATION_MEASUREMENT_CLUSTER_ID = 0x041F;
ZCL_TURBIDITY_CONCENTRATION_MEASUREMENT_CLUSTER_ID = 0x0420;
ZCL_COPPER_CONCENTRATION_MEASUREMENT_CLUSTER_ID = 0x0421;
ZCL_LEAD_CONCENTRATION_MEASUREMENT_CLUSTER_ID = 0x0422;
ZCL_MANGANESE_CONCENTRATION_MEASUREMENT_CLUSTER_ID = 0x0423;
ZCL_SULFATE_CONCENTRATION_MEASUREMENT_CLUSTER_ID = 0x0424;
ZCL_BROMODICHLOROMETHANE_CONCENTRATION_MEASUREMENT_CLUSTER_ID = 0x0425;
ZCL_BROMOFORM_CONCENTRATION_MEASUREMENT_CLUSTER_ID = 0x0426;
ZCL_CHLORODIBROMOMETHANE_CONCENTRATION_MEASUREMENT_CLUSTER_ID = 0x0427;
ZCL_CHLOROFORM_CONCENTRATION_MEASUREMENT_CLUSTER_ID = 0x0428;
ZCL_SODIUM_CONCENTRATION_MEASUREMENT_CLUSTER_ID = 0x0429;
ZCL_PM2_5_CONCENTRATION_MEASUREMENT_CLUSTER_ID = 0x042A;
ZCL_FORMALDEHYDE_CONCENTRATION_MEASUREMENT_CLUSTER_ID = 0x042B;
ZCL_PM1_CONCENTRATION_MEASUREMENT_CLUSTER_ID = 0x042C;
ZCL_PM10_CONCENTRATION_MEASUREMENT_CLUSTER_ID = 0x042D;
ZCL_TOTAL_VOLATILE_ORGANIC_COMPOUNDS_CONCENTRATION_MEASUREMENT_CLUSTER_ID = 0x042E;
ZCL_RADON_CONCENTRATION_MEASUREMENT_CLUSTER_ID = 0x042F;
ZCL_IAS_ACE_CLUSTER_ID = 0x0501;
ZCL_IAS_WD_CLUSTER_ID = 0x0502;
ZCL_WAKE_ON_LAN_CLUSTER_ID = 0x0503;
ZCL_CHANNEL_CLUSTER_ID = 0x0504;
ZCL_TARGET_NAVIGATOR_CLUSTER_ID = 0x0505;
ZCL_MEDIA_PLAYBACK_CLUSTER_ID = 0x0506;
ZCL_MEDIA_INPUT_CLUSTER_ID = 0x0507;
ZCL_LOW_POWER_CLUSTER_ID = 0x0508;
ZCL_KEYPAD_INPUT_CLUSTER_ID = 0x0509;
ZCL_CONTENT_LAUNCHER_CLUSTER_ID = 0x050A;
ZCL_AUDIO_OUTPUT_CLUSTER_ID = 0x050B;
ZCL_APPLICATION_LAUNCHER_CLUSTER_ID = 0x050C;
ZCL_APPLICATION_BASIC_CLUSTER_ID = 0x050D;
ZCL_ACCOUNT_LOGIN_CLUSTER_ID = 0x050E;
ZCL_CONTENT_CONTROL_CLUSTER_ID = 0x050F;
ZCL_MESSAGING_CLUSTER_ID = 0x0703;
ZCL_MESSAGES_CLUSTER_ID = 0x0097;
ZCL_APPLIANCE_IDENTIFICATION_CLUSTER_ID = 0x0B00;
ZCL_METER_IDENTIFICATION_CLUSTER_ID = 0x0B01;
ZCL_APPLIANCE_EVENTS_AND_ALERT_CLUSTER_ID = 0x0B02;
ZCL_APPLIANCE_STATISTICS_CLUSTER_ID = 0x0B03;
ZCL_ELECTRICAL_MEASUREMENT_CLUSTER_ID = 0x0B04;
ZCL_BINDING_CLUSTER_ID = 0xF000;
ZCL_GROUP_KEY_MANAGEMENT_CLUSTER_ID = 0xF004;
ZCL_SAMPLE_MFG_SPECIFIC_CLUSTER_ID = 0xFC00;
// NOTE: This is a large number that becomes negative as a 32-bit integer.
//
// Protobuf documentation states:
// Enumerator constants must be in the range of a 32-bit integer. Since enum values
// use varint encoding on the wire, negative values are inefficient and thus not recommended.
ZCL_TEST_CLUSTER_ID = -918523; // 0xFFF1FC05;
}
message AttributeMetadata {
uint32 endpoint = 1;
ClusterType cluster = 2;
uint32 attribute_id = 3;
AttributeType type = 4;
}
message AttributeData {
oneof data {
bool data_bool = 1;
uint32 data_uint8 = 2;
uint32 data_uint16 = 3;
uint32 data_uint32 = 4;
bytes data_bytes = 5;
int32 data_int8 = 6;
int32 data_int16 = 7;
int32 data_int32 = 8;
};
optional bytes tlv_data = 9;
}
message AttributeWrite {
AttributeMetadata metadata = 1;
AttributeData data = 2;
}
service Attributes {
rpc Write(AttributeWrite) returns (pw.protobuf.Empty){}
rpc Read(AttributeMetadata) returns (AttributeData){}
}