diff --git a/CMakeLists.txt b/CMakeLists.txt index bfb3ee4ff28..d8d1d93eb63 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -112,6 +112,7 @@ set(ARDUINO_ALL_LIBRARIES WiFi WiFiProv Wire + Zigbee ) set(ARDUINO_LIBRARY_ArduinoOTA_SRCS libraries/ArduinoOTA/src/ArduinoOTA.cpp) @@ -240,6 +241,18 @@ set(ARDUINO_LIBRARY_WiFiProv_SRCS libraries/WiFiProv/src/WiFiProv.cpp) set(ARDUINO_LIBRARY_Wire_SRCS libraries/Wire/src/Wire.cpp) +set(ARDUINO_LIBRARY_Zigbee_SRCS + libraries/Zigbee/src/Zigbee_core.cpp + libraries/Zigbee/src/Zigbee_ep.cpp + libraries/Zigbee/src/Zigbee_handlers.cpp + libraries/Zigbee/src/ep/ep_color_dimmable_light.cpp + libraries/Zigbee/src/ep/ep_color_dimmer_switch.cpp + libraries/Zigbee/src/ep/ep_on_off_light.cpp + libraries/Zigbee/src/ep/ep_on_off_switch.cpp + libraries/Zigbee/src/ep/ep_temperature_sensor.cpp + libraries/Zigbee/src/ep/ep_thermostat.cpp + ) + set(ARDUINO_LIBRARY_BLE_SRCS libraries/BLE/src/BLE2901.cpp libraries/BLE/src/BLE2902.cpp diff --git a/libraries/Zigbee/src/ep/ep_template.cpp b/libraries/Zigbee/src/ep/ep_template.cpp deleted file mode 100644 index 89c508ab39b..00000000000 --- a/libraries/Zigbee/src/ep/ep_template.cpp +++ /dev/null @@ -1,22 +0,0 @@ -#include "ep_template.h" - -ZigbeeDevice::ZigbeeDevice(uint8_t endpoint) : Zigbee_EP(endpoint) { - _device_id = ESP_ZB_HA_ON_OFF_LIGHT_DEVICE_ID; // Change to correct device ID - - //Change to correct config - esp_zb_on_off_light_cfg_t light_cfg = ESP_ZB_DEFAULT_ON_OFF_LIGHT_CONFIG(); - _cluster_list = esp_zb_on_off_light_clusters_create(&light_cfg); - - _ep_config = { - .endpoint = _endpoint, - .app_profile_id = ESP_ZB_AF_HA_PROFILE_ID, - .app_device_id = ESP_ZB_HA_ON_OFF_LIGHT_DEVICE_ID, // Change to correct device ID - .app_device_version = 0 - }; -} - -void ZigbeeDevice::find_endpoint(esp_zb_zdo_match_desc_req_param_t *cmd_req) { - // If device is looking for a endpoint, implement this function + find_cb and bind_cb callbacks - // for reference check ZigbeeSwitch::find_endpoint, ZigbeeSwitch::find_cb and ZigbeeSwitch::bind_cb - return; -} \ No newline at end of file diff --git a/libraries/Zigbee/src/ep/ep_template.h b/libraries/Zigbee/src/ep/ep_template.h deleted file mode 100644 index 47a779de794..00000000000 --- a/libraries/Zigbee/src/ep/ep_template.h +++ /dev/null @@ -1,14 +0,0 @@ -/* Class of Zigbee On/Off Light endpoint inherited from common EP class */ - -#pragma once - -#include "Zigbee_ep.h" -#include "ha/esp_zigbee_ha_standard.h" - -class ZigbeeDevice : public Zigbee_EP { - public: - ZigbeeDevice(uint8_t endpoint); - ~ZigbeeDevice(); - - void find_endpoint(esp_zb_zdo_match_desc_req_param_t *cmd_req); -}; \ No newline at end of file