50 Commits

Author SHA1 Message Date
Piyush Shah
da577d7cb4 homekit_switch: rmaker_app_network was getting used instead of custom app_network
HomeKit has its own logic for network provisioning, including support
for Apple WAC and so, uses its own app_network component.
Recent restructuring pulled in the common rmaker_app_network component
instead.
2025-11-14 19:34:37 +05:30
Piyush Shah
da838cbf13 rmaker_common: Remove the submodule and its references 2025-11-13 09:42:38 +05:30
Piyush Shah
8a816fc6c3 examples: Update the names for the common example components 2025-11-13 09:42:38 +05:30
Piyush Shah
2de5cd5a56 examples: Enable parameter console commands in some examples 2025-11-12 20:50:06 +05:30
Piyush Shah
a640b220de examples: Remove dependency on ws2812 and ledc components
- Use led_indicator component from component manager for ws2812 and RGB
  LEDs
- Add other components from examples/common via idf_component.yml
  instead of adding as EXTRA_COMPONENT_DIRS in CMakeLists.txt
2025-11-11 19:56:43 +05:30
Piyush Shah
1dc2fc3130 examples: Use modified app_reset APIs and upstream button component 2025-10-27 18:00:42 +05:30
Piyush Shah
1dec6f0d3a homekit_switch: Use network_provisioning component instead of wifi_provisioning 2025-08-31 18:01:47 +05:30
Piyush Shah
15922cf7c0 examples: Remove legacy code for esp-idf versions < 5.1 2025-08-29 20:02:57 +05:30
Piyush Shah
efcb15b137 cleanup: Remove Makefile related files as it is not supported any more
ESP IDF has moved to CMake since long back and these files were anyways
unused
2025-08-29 19:52:06 +05:30
Piyush Shah
b5e1a46591 examples: Changes for component manager based builds 2025-03-25 17:54:31 +05:30
Vikram Dattu
35941c8925 examples/common: use qrcode from component manager
- Remove qrcode sources from examples/common
 - Added idf_component.yml file to app_wifi component with qrcode dependency
 - Added qrcode_display function in app_wifi which wraps the qrcode generation
2025-03-21 15:49:58 +05:30
Piyush Shah
d1cb118d2a Merge branch 'support/h2_boot_gpio' into 'master'
Provide correct default BOOT pin config for ESP32-H2

See merge request app-frameworks/esp-rainmaker!478
2025-01-02 14:22:23 +08:00
Piyush Shah
273b1ec903 homekit_switch: Compilation fixes
Also included in CI
2024-10-25 17:31:50 +05:30
Vikram Dattu
54554b6c8a Provide correct default BOOT pin config for ESP32-H2 2024-10-17 14:30:16 +05:30
Vikram Dattu
66160cdaf7 Changed default partion csv file to partions_4mb_optimised.csv
- With newest IDF releases with recent feature additions, the app partitions were getting overflown.
 - This optimised partions file make fullest use of flash. Hence we get more room for app partitions.
2024-10-15 18:06:42 +05:30
Piyush Shah
41c7d54b1a homekit example: Rename internal app_wifi component to app_network
This is to override the examples/common/app_network component which
causes compilation issues for homekit examples
2024-09-13 12:07:48 +05:30
Vikram Dattu
3e375f43f6 Enable Insights command response module
- Updated esp_insights submodule and the component version dependency
 - Selected `ESP_INSIGHTS_TRANSPORT_MQTT` in examples sdkconfig.defaults
 - Called esp_insights_cmd_resp_enable

 - Also updated `cli` submodule to the latest
2024-08-22 10:32:54 +05:30
Piyush Shah
b6ca97d689 examples: Changes for bulk parameter reporting
- led_light: Use the new bulk write callback (single callback invoked just once
  for multiple param writes) and use esp_rmaker_param_update()
  so that all updated params are also reported together.
- Other examples: Just replace esp_rmaker_param_update_and_report with
  esp_rmaker_param_update() and let the Rainmaker core report all
  updated params together.
2024-06-20 14:26:11 +08:00
Vikram Dattu
5dccee9eac examples: Add support for esp32c2
- Added entry for esp32c2 build in CI
- RAM optimized sdkconfig.defaults.esp32c2
- Disable ws2812 led drivers from non-rmt supported devices
- Use GPIO9 as BOOT button for C2
2024-05-09 20:38:11 +05:30
Vikram Dattu
138e2e6983 Add support for closing provisioning window after PoP mismatch
- The feature prevents brute force attacks by not allowing more than allowed PoP attempts
 - Allowed failure attempts are configurable via menuconfig and is 5 by default
 - Change added for both `app_wifi` and `app_wifi_with_homekit`
 - Min IDF version needed (release/v5.1.3)
2024-03-13 15:52:10 +05:30
Piyush Shah
798825b07d bugfix: ci failures were seen for esp32s2
- Due to some changes in esp-idf after v5.1.3, CONFIG_BT_ENABLED gets set
even for esp32s2, causing issues in compilation.
 - In earlier esp-idf versions, since this was not applicable for esp32-s2,
it was getting skipped even when it was present in sdkconfig.defaults.
 - Added sdkconfig.defaults.esp32s2 and disabled BT explicitly
2024-03-08 20:30:19 +05:30
Vikram Dattu
f1d16cf736 examples: Added support for ESP32C6
1. ESP32C6 button configs for RGB LED and Boot GPIO
2. CI: Added entry for C6 in `.gitlab.yaml`
3. Added `partitions_4mb_optimised.csv` which uses flash to the full extent
  - Created sdkconfig.defaults for esp32c6 and used partitions_4mb_optimised.csv as default
  - This is made default for esp32c6 because, for esp32c6, image sizes exceed config from partitions.csv
4. Fixed matter examples CMakeLits.txt files for c6 support
2023-10-26 17:38:53 +05:30
Piyush Shah
767643f6d3 homekit_switch: Fixes for idf v5.x
Also updated the cli and rmaker_common submodules
2023-05-19 17:39:21 +05:30
Dhaval Gujar
741b2c64a1 Adds support for using esp_secure_cert_mgr for TLS credentials
- Updated partitions.csv in all examples to use final
 esp_secure_cert partition format.
- This option can only be enabled if claiming is disabled.
- The Rainmaker app will fall back to using NVS if it
 fails to fetch from the `esp_secure_cert` partition.
 This has been done to allow a common firmware to be built that
 can run on both kinds of devices, i.e. ones that use NVS
 and ones that use the `esp_secure_cert` partition.
2023-03-30 22:23:17 +05:30
Vikram
3dc25a47c5 Revert "examples: Disable mbedTLS server config to reduce firmware size"
This reverts commit 7c1e894fe0.

The commit needs to be reverted as IDF5.0 does not allow selecting
ESP_HTTPS_SERVER when MBEDTLS is in client only mode.
2023-01-17 17:31:50 +05:30
sanket.wadekar
4acad87be9 Added OTA event handlers in examples 2022-11-09 20:35:27 +05:30
yuanjianmin
7c1e894fe0 examples: Disable mbedTLS server config to reduce firmware size 2022-11-08 19:00:54 +08:00
Vikram
a9798f71df IDF5.0 build fixes
1. Added requires wherever necessary
2. Use exact format specifiers
3. Updated `esp-insights` and `rmaker_common` submodules

Signed-off-by: Vikram <vikram.dattu@espressif.com>
2022-08-26 19:04:02 +05:30
Piyush Shah
cd173972a7 examples: Enable CONFIG_BOOTLOADER_APP_ROLLBACK_ENABLE in all examples
.. Since this is the recommended setting and well supported by the
RainMaker SDK, to ensure that OTA upgrades do not break the device
and ensure that the MQTT connection works fine with the new firmware.
2022-07-13 21:56:04 +05:30
shixinke
082a916720 example: Update IO for all examples to work with all ESP devkits and provide options in menuconfig 2022-06-07 10:47:40 +08:00
Piyush Shah
ef410e14b0 ota: Make "OTA using Topics" as default and provide a simplified API for that
- OTA using topics is now enabled in all examples
- esp_rmaker_ota_enable_default() is the simplified API that enables
  OTA using Topics with the default server certificates
2022-06-06 20:37:17 +05:30
Piyush Shah
cd12423912 bugfix: Compilation fixes for different idf versions and targets 2022-06-06 16:11:36 +05:30
Piyush Shah
b4db703281 Merge branch 'task/led_light_server_crt' into 'master'
ssl_server_cert: Use mbedtls certificate bundle for server authentication

See merge request app-frameworks/esp-rainmaker!298
2022-05-09 17:22:17 +08:00
Piyush Shah
93a2b36160 ssl_server_cert: Use mbedtls certificate bundle for server authentication
Instead of using 1 or 2 certificates for server authentication, use a
bundle of commonly used server certificates, so that even if the server
moves to a different signing authority, the device connection is not
affected.

This change has been done for claiming, OTA and MQTT certificates.
2022-05-05 19:06:28 +05:30
Piyush Shah
e1dacc27d7 homekit_switch: Add provisioning timeout support similar to rest of the examples 2022-04-28 20:04:15 +05:30
Piyush Shah
2a08ed9cfe Fixes for idf v5.0 2022-03-15 20:53:20 +05:30
Piyush Shah
229713488c examples: Enable some security features and change order of component dirs
Features now enabled by default are:

- User id check in user-node association for better handling of reset to
factory from security perspective.
- Secure local control

Order of component dirs has been changed so that the rmaker_common from
esp-rainmker gets used, rather than the one from esp-insights
2022-01-25 13:59:28 +05:30
Piyush Shah
dc8ca4018f homekit_switch: Modifications to support WAC and IPV6
Also move app_wifi_with_homekit to a separate private component which would override the common/app_wifi

Note that WAC can be enabled only with MFi variant of ESP HomeKit SDK

Closes: https://github.com/espressif/esp-rainmaker/issues/78
2022-01-07 10:39:27 +05:30
Shubham Patil
e69372a2fe examples: Fixed typos in comment 2021-09-09 10:53:31 +05:30
Piyush Shah
0c84527cfb esp_insights: Add facility to enable esp_insights in the examples
Please check out CHANGES.md as this commit may break your existing
projects' compilation.
2021-07-06 00:39:07 +05:30
Piyush Shah
522452a0e5 homekit_switch: Minor change to fix compilation error due to JSON component change 2021-06-01 14:45:32 +05:30
Piyush Shah
332c6e7d58 examples: Increase FreeRTOS timer stack size
Button event callbacks are executed in the context of FreeRTOS Timer task.
Reporting param updates from that causes stack overflow, specifically on ESP32-C3.
As a temporary workaround, the stack size for FreeRTOS Timer task has been increased.
2021-03-23 01:25:02 +05:30
Piyush Shah
66dc818ba8 esp_events: Corrected the event handler prototypes to be in sync with esp_event_handler_t
Closes https://github.com/espressif/esp-rainmaker/issues/55
2021-03-15 11:03:32 +05:30
Piyush Shah
86b4dbbd68 examples: Changes for the ESP32-C3, primarily for Boot button
And some other minor changes
- Corrected comments in example READMEs and sdkconfig.defaults
- Duplicate macro in homekit_switch removed
2021-02-09 22:32:03 +05:30
Piyush Shah
31d4b375e3 esp_rmaker: Moved out some generic modules from esp_rainmaker component
The following are now part of a separate repo (and included as git submodule):
- MQTT glue layer
- Work Queue
- Utilities (reset, reboot, time sync, timezone, etc.)
- Factory Storage

Even CLI is now a part of a seperate repo, included here as a git submodule.
2021-02-03 15:30:55 +05:30
Piyush Shah
32b7d65d9b esp_rmaker_core: Provide an API to get request source in string format
Used this API in all examples.
2020-11-18 22:16:05 +05:30
Piyush Shah
fd094fb045 Miscellaneous minor fixes 2020-11-12 17:19:46 +05:30
Piyush Shah
52f9d01956 esp_rmaker_user_mapping: Create and register user_mapping handlers internally
Earlier, it was the application code's responsibility to call the
esp_rmaker_user_mapping_endpoint_create() and esp_rmaker_user_mapping_endpoint_register()
APIs at appropriate places in Wi-Fi provisioning code to enable user node mapping
functionality. To simplify this, the logic has been moved to RainMaker Core, so that
this happens automatically.

For some reason, if you want to retain the older logic in your application code
and do not want RainMaker_core to enable this, please set the
CONFIG_ESP_RMAKER_DISABLE_USER_MAPPING_PROV config option.
2020-10-01 00:58:37 +05:30
Piyush Shah
367b48c995 esp_rmaker_standard_types: Start default names of all standard params with capital letter
Default parameter names like name, power, etc. have been changed to Name, Power, etc.
respectively, so that they look better in the phone app UIs.

Note that, with this change, any user configured device name (the name set from phone apps),
or any other persistent parameter for which a default name was used (Eg. power)
will be affected, as the values will no more be found in the NVS storage. Please edit your
application code accordingly if you want to stick with the old names.

Please check CHANGES.md for guidelines.
2020-09-29 14:07:38 +05:30
Piyush Shah
e45bf601ae homekit_switch: Added an example for RainMaker + HomeKit 2020-09-25 22:21:53 +05:30