-
Notifications
You must be signed in to change notification settings - Fork 167
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
IOT button uses too much power (CON-1486) #1218
Comments
It seems that the iot_button component prevents the device from entering sleep mode, resulting in a current of approximately 3-4 mA. We will add a button for the ICD example in a later update so that you can use that button for your application. |
That makes a lot of sense, thank you so much. |
Hi, could you enable I will still add the code initializing the iot_button to the icd example. |
Thanks, @wqx6. I didn't find the option CONFIG_GPIO_BUTTON_SUPPORT_POWER_SAVE anywhere in menuconfig. Is it in a new commit? Is it a hidden option I have to manually add in the sdkconfig file? |
Hi, @wqx6. Not only couldn't I find the menuconfig option, but I didn't find the config.gpio_button_config.enable_power_save field anywhere either. Maybe you forgot to commit the changes? |
The iot_button component is in this repository and you can find the config option at the Kconfig file. If you don't find the menuconfig option, could you check the button component version? You can use the version v3.4.1 which I have verified being able to work with light sleep mode. |
Thanks for all your efforts, @wqx6. I had to modify the button implementation of esp-matter in device_hal to be based on iot_button 3.4.1 (the implementation in device_hal requires iot_button = 2.5.0), and I managed to make it compile. Unfortunately the devkit boards for esp32c6 use GPIOs 8 and 9 for the BOOT button, so it seems there is no way to do powersaving there, and I get a non-catastrophic error during initialization. It looks like the esp32h2 devkit can benefit from this feature, but not the esp32c6 devkits. I guess there isn't much I can do, unless I make my own board. |
I have encountered a similar problem, and the details are: I pulled the commit: a07c312 Can you provide some assistance? Thank |
Because the button component esp-matter uses is still version 2.5.0, and the power saving feature was implemented in a later version (latest version of iot_button is 3.4.1). You can't add the iot_button 3.4.1 as a component, because esp-matter request specifically the 2.5.0 version and there will be a conflict, so you must replace the requirement in device_hal/button_driver/iot_button/idf_component.yml from 2.5.0 to 3.4.1, run cmake again, and then go to menuconfig and enable the CONFIG_GPIO_BUTTON_SUPPORT_POWER_SAVE option. When initializing the button you must make sure to set
Then it should work, although because my board is not supported, I couldn't check it. |
@itatboy Could you tell me what peripherals are you using for the devkit board? Note that the light sleep of BLE requires the 32kHz external crystal. If your devkit board doesn't have a 32kHz external crystal, the chip cannot enter sleep mode before commissioning is completed(as BLE is advertising before commissioning). |
@AlexVaq Hi, The button support has already been added in the icd example, I have tested both ESP32-H2 and ESP32-C6 and both the chip works well with the default button PIN(For ESP32-H2 it is GPIO9 which is the boot button and for ESP32-C6 it is GPIO7).
Yes, only RTC GPIOs can be used for wake up the device. You should connect an external button to the button GPIO if you are using our ESP32-C6 DebKit boards. |
@AlexVaq |
@wqx6 ESP32-H2-DevKitM-1 |
I'm trying to design a low-power, sleepy thread device for homekit, based on the icd_app example of esp-matter.I'm currently working with a devboard esp32c6 devkitM-1.
I noticed that if I initialize the button (which is quite useful to unpair from the thread network, reboot, etc), the minimum consumption I measure is around 3-4 mA, whereas if I don't, the consumption goes back down to the microA level.
I don't think this is intended. Maybe this is a specific problem of the development board, but I'm inclined to think that the code related to the iot button is not as efficient as it should.
Apart from the esp32c6 devkitM-1 board I'm using esp-idf 5.4 and I'm installing esp-matter directly from vscode.
The code I use to initialize the button is the following:
but the consumption is the same even if I just call iot_button_create without registering any callbacks. The only workaround I found is to ignore the button functionality.
The text was updated successfully, but these errors were encountered: