Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Zigbee example does not compile for H2 #9951

Open
1 task done
petermeter69 opened this issue Jun 28, 2024 · 3 comments
Open
1 task done

Zigbee example does not compile for H2 #9951

petermeter69 opened this issue Jun 28, 2024 · 3 comments
Assignees
Labels
Type: Example Issue is related to specific example.
Milestone

Comments

@petermeter69
Copy link

Board

ESP32-H2 Dev module, SuperMini ESP32-H2

Device Description

devkit

Hardware Configuration

no

Version

latest master (checkout manually)

IDE Name

Arduino 2.3.2

Operating System

Win10

Flash frequency

64MHz

PSRAM enabled

yes

Upload speed

921600

Description

On the same machine, I can compile, upload and run 3 of 4 built-in examples (Light switch, light bulb, temp sensor), while unable to compile the 4th example thermostat, with it being not modified by me at all. Partition scheme and Zigbee mode are correctly set (as the working examples show).

Sketch

Unmodified Zigbee_Thermostat.ino

Debug Message

In file included 
from C:\Users\.../include/espressif__esp-zigbee-lib/include/zcl/esp_zigbee_zcl_common.h:38,
from C:\Users\.../include/esp_zigbee_attribute.h:14,
from C:\Users\.../include/esp_zigbee_core.h:16,
from C:\Users\...\Zigbee_Thermostat.ino:33:
        C:\Users\...\Zigbee_Thermostat.ino: In function 'void esp_zb_task(void*)':
C:\Users\.../include/zcl/esp_zigbee_zcl_thermostat.h:180:63: error: narrowing conversion of '65535' from 'int' to 'int16_t' {aka 'short int'} [-Wnarrowing]
  180 | #define ESP_ZB_ZCL_THERMOSTAT_LOCAL_TEMPERATURE_DEFAULT_VALUE 0xffff
      |                                                               ^~~~~~
C:\Users\.../include/ha/esp_zigbee_ha_standard.h:329:38: note: in expansion of macro 'ESP_ZB_ZCL_THERMOSTAT_LOCAL_TEMPERATURE_DEFAULT_VALUE'
  329 |                 .local_temperature = ESP_ZB_ZCL_THERMOSTAT_LOCAL_TEMPERATURE_DEFAULT_VALUE,                         \
      |                                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:\Users\...\Zigbee_Thermostat.ino:479:44: note: in expansion of macro 'ESP_ZB_DEFAULT_THERMOSTAT_CONFIG'
  479 |   esp_zb_thermostat_cfg_t thermostat_cfg = ESP_ZB_DEFAULT_THERMOSTAT_CONFIG();
      |                                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

exit status 1

Compilation error: exit status 1

Other Steps to Reproduce

No response

I have checked existing issues, online documentation and the Troubleshooting Guide

  • I confirm I have checked existing issues, online documentation and Troubleshooting guide.
@petermeter69 petermeter69 added the Status: Awaiting triage Issue is waiting for triage label Jun 28, 2024
@petermeter69
Copy link
Author

By changing this line in "include/zcl/esp_zigbee_zcl_thermostat.h", it compiles:
From:
#define ESP_ZB_ZCL_THERMOSTAT_LOCAL_TEMPERATURE_DEFAULT_VALUE 0xffff
To:
#define ESP_ZB_ZCL_THERMOSTAT_LOCAL_TEMPERATURE_DEFAULT_VALUE 0x7fff

@P-R-O-C-H-Y P-R-O-C-H-Y added Type: Example Issue is related to specific example. and removed Status: Awaiting triage Issue is waiting for triage labels Jun 28, 2024
@P-R-O-C-H-Y
Copy link
Member

@petermeter69 This is something that needs to be fixed in ESP-Zigbee-SDK. Please open an issue in the repository and also include the proposed fix. If you can also ping me or link this issue there.
As its only warning ([-Wnarrowing]) marked as error, you can disable "Compiler Warnings" in the Arduino IDE settings.

@petermeter69
Copy link
Author

petermeter69 commented Jun 29, 2024

@P-R-O-C-H-Y Thanks for you answer, reported there, see: espressif/esp-zigbee-sdk#379

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Example Issue is related to specific example.
Projects
None yet
Development

No branches or pull requests

3 participants