deepcoder / M5NanoC6-Zigbee-Test

Testing M5NanoC6 Zigbee device created with Arduino IDE for Zigbee2MQTT and Home Assistant
GNU General Public License v3.0
11 stars 1 forks source link

Compilation errors #1

Open WayneManion opened 5 days ago

WayneManion commented 5 days ago

I tried to compile the provided code and got these errors in the Arduino IDE:

/home/wayne/Arduino/sketch_jun27a/sketch_jun27a.ino:59:41: error: could not convert '10' from 'int' to 'esp_zb_endpoint_config_t' {aka 'esp_zb_endpoint_config_s'}
   59 | #define HA_ESP_LIGHT_ENDPOINT           10    /* esp light bulb device endpoint, used to process light controlling commands */
      |                                         ^~
      |                                         |
      |                                         int
/home/wayne/Arduino/sketch_jun27a/sketch_jun27a.ino:200:64: note: in expansion of macro 'HA_ESP_LIGHT_ENDPOINT'
  200 |     esp_zb_ep_list_add_ep(esp_zb_ep_list, esp_zb_cluster_list, HA_ESP_LIGHT_ENDPOINT, ESP_ZB_AF_HA_PROFILE_ID, ESP_ZB_HA_ON_OFF_OUTPUT_DEVICE_ID);
      |                                                                ^~~~~~~~~~~~~~~~~~~~~
/home/wayne/Arduino/sketch_jun27a/sketch_jun27a.ino: In function 'void setup()':
/home/wayne/Arduino/sketch_jun27a/sketch_jun27a.ino:47:23: error: 'RADIO_MODE_NATIVE' was not declared in this scope; did you mean 'ZB_RADIO_MODE_NATIVE'?
   47 |         .radio_mode = RADIO_MODE_NATIVE,                        \
      |                       ^~~~~~~~~~~~~~~~~
/home/wayne/Arduino/sketch_jun27a/sketch_jun27a.ino:253:25: note: in expansion of macro 'ESP_ZB_DEFAULT_RADIO_CONFIG'
  253 |         .radio_config = ESP_ZB_DEFAULT_RADIO_CONFIG(),
      |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/wayne/Arduino/sketch_jun27a/sketch_jun27a.ino:52:33: error: 'HOST_CONNECTION_MODE_NONE' was not declared in this scope; did you mean 'ZB_HOST_CONNECTION_MODE_NONE'?
   52 |         .host_connection_mode = HOST_CONNECTION_MODE_NONE,      \
      |                                 ^~~~~~~~~~~~~~~~~~~~~~~~~
/home/wayne/Arduino/sketch_jun27a/sketch_jun27a.ino:254:24: note: in expansion of macro 'ESP_ZB_DEFAULT_HOST_CONFIG'
  254 |         .host_config = ESP_ZB_DEFAULT_HOST_CONFIG(),
      |                        ^~~~~~~~~~~~~~~~~~~~~~~~~~

exit status 1

Compilation error: could not convert '10' from 'int' to 'esp_zb_endpoint_config_t' {aka 'esp_zb_endpoint_config_s'}
deepcoder commented 4 days ago

I am not at a place where I can refollow the steps I did and see if something changed. That said, it does look like they did some changes that might affect the parameters in this update on 24-May-2024:

https://github.com/espressif/esp-zigbee-sdk/commit/9b2a25d84666d8bc8515f84abcf92271524d2896

Just as an off the cuff idea, you might try changing :

#define HA_ESP_LIGHT_ENDPOINT           10    /* esp light bulb device endpoint, used to process light controlling commands */

to

#define HA_ESP_LIGHT_ENDPOINT           10U   /* esp light bulb device endpoint, used to process light controlling commands */

You might try posting a question on the ESP github for the zigbee stuff :

https://github.com/espressif/esp-zigbee-sdk/issues

Good hunting!