@@ -2336,6 +2336,97 @@ esp_err_t add(endpoint_t *endpoint, config_t *config)
23362336 return ESP_OK ;
23372337}
23382338} /* irrigation_system */
2339+
2340+ namespace doorbell {
2341+ uint32_t get_device_type_id ()
2342+ {
2343+ return ESP_MATTER_DOORBELL_DEVICE_TYPE_ID ;
2344+ }
2345+
2346+ uint8_t get_device_type_version ()
2347+ {
2348+ return ESP_MATTER_DOORBELL_DEVICE_TYPE_VERSION ;
2349+ }
2350+
2351+ endpoint_t *create (node_t *node, config_t *config, uint8_t flags, void *priv_data)
2352+ {
2353+ return common::create<config_t >(node, config, flags, priv_data, add);
2354+ }
2355+
2356+ esp_err_t add (endpoint_t *endpoint, config_t *config)
2357+ {
2358+ esp_err_t err = add_device_type (endpoint, get_device_type_id (), get_device_type_version ());
2359+ VerifyOrReturnError (err == ESP_OK , err);
2360+
2361+ cluster::identify::create (endpoint, &(config->identify ), CLUSTER_FLAG_SERVER );
2362+ cluster_t *switch_cluster = cluster::switch_cluster::create (endpoint, &(config->switch_cluster ), CLUSTER_FLAG_SERVER );
2363+ cluster::switch_cluster::feature::momentary_switch::add (switch_cluster);
2364+ cluster::chime::create (endpoint, NULL , CLUSTER_FLAG_CLIENT );
2365+
2366+ return ESP_OK ;
2367+ }
2368+
2369+ } /* doorbell */
2370+
2371+ namespace audio_doorbell {
2372+ uint32_t get_device_type_id ()
2373+ {
2374+ return ESP_MATTER_AUDIO_DOORBELL_DEVICE_TYPE_ID ;
2375+ }
2376+
2377+ uint8_t get_device_type_version ()
2378+ {
2379+ return ESP_MATTER_AUDIO_DOORBELL_DEVICE_TYPE_VERSION ;
2380+ }
2381+
2382+ endpoint_t *create (node_t *node, config_t *config, uint8_t flags, void *priv_data)
2383+ {
2384+ return common::create<config_t >(node, config, flags, priv_data, add);
2385+ }
2386+
2387+ esp_err_t add (endpoint_t *endpoint, config_t *config)
2388+ {
2389+ esp_err_t err = add_device_type (endpoint, get_device_type_id (), get_device_type_version ());
2390+ VerifyOrReturnError (err == ESP_OK , err);
2391+
2392+ cluster::identify::create (endpoint, &(config->identify ), CLUSTER_FLAG_SERVER );
2393+ cluster::switch_cluster::create (endpoint, &(config->switch_cluster ), CLUSTER_FLAG_SERVER );
2394+ cluster_t *camera_av_stream_management = cluster::camera_av_stream_management::create (endpoint, &(config->camera_av_stream_management ), CLUSTER_FLAG_SERVER );
2395+ cluster::camera_av_stream_management::feature::audio::add (camera_av_stream_management);
2396+ cluster::webrtc_transport_provider::create (endpoint, &(config->webrtc_transport_provider ), CLUSTER_FLAG_SERVER );
2397+ cluster::webrtc_transport_requestor::create (endpoint, NULL , CLUSTER_FLAG_CLIENT );
2398+ cluster::chime::create (endpoint, NULL , CLUSTER_FLAG_CLIENT );
2399+
2400+ return ESP_OK ;
2401+ }
2402+
2403+ } /* audio_doorbell */
2404+
2405+ namespace video_doorbell {
2406+ uint32_t get_device_type_id ()
2407+ {
2408+ return ESP_MATTER_VIDEO_DOORBELL_DEVICE_TYPE_ID ;
2409+ }
2410+
2411+ uint8_t get_device_type_version ()
2412+ {
2413+ return ESP_MATTER_VIDEO_DOORBELL_DEVICE_TYPE_VERSION ;
2414+ }
2415+
2416+ endpoint_t *create (node_t *node, config_t *config, uint8_t flags, void *priv_data)
2417+ {
2418+ return common::create<config_t >(node, config, flags, priv_data, add);
2419+ }
2420+
2421+ esp_err_t add (endpoint_t *endpoint, config_t *config)
2422+ {
2423+ esp_err_t err = add_device_type (endpoint, get_device_type_id (), get_device_type_version ());
2424+ VerifyOrReturnError (err == ESP_OK , err);
2425+
2426+ return ESP_OK ;
2427+ }
2428+
2429+ } /* video_doorbell */
23392430} /* endpoint */
23402431
23412432namespace node {
0 commit comments