Commit Graph

103 Commits

Author SHA1 Message Date
WanqQixiang
1c887053d7 examples: fix matter_light building 2023-12-27 10:49:53 +08:00
chendejin
558f2318e4 remove ESP_BOX_PATH ENV require for controller on box 2023-12-11 16:55:10 +08:00
chendejin
41ef0bec9c matter_support: Controller demo on esp32_s3_box_3 2023-12-08 14:54:23 +08:00
Sayon Deep
555f969bcb matter_controller: Support for remote control via CLI and minor fixes
- Added support for wildcard attribute reads
- Changes to support newly added read_done_cb
2023-12-07 16:28:00 +05:30
Sayon Deep
a1dc04151a matter_support: Changes to support new subscribe command format 2023-12-05 11:22:47 +05:30
Piyush Shah
00bf093167 app_wifi: Add an option to provide a custom Proof of Possession (PoP) for provisioning
POP_TYPE_CUSTOM has been added as an option for app_wifi_start().
app_wifi_set_custom_pop() should be used before this.
2023-11-29 13:56:05 +08:00
chendejin
d1354bc4f3 examples: Add matter controller on ESP32-S3-BOX example 2023-11-08 17:30:42 +08:00
Vikram Dattu
10361704b4 wifi-prov cli: Set Wi-Fi creds directly for already provisioned devices
When device is already provisioned, `wifi_prov_mgr_configure_sta` API call fails.
This happens because, provisioning manager is in uninitialized state.
We set Wi-Fi credetials directly using `esp_wifi_set_config` in that case.

Also removed error check on `wifi_prov_mgr_is_provisioned` API call, as for
IDF 4.x APIs return `ESP_ERR_INVALID_STATE`
2023-10-27 18:20:00 +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
9689b6942b Merge branch 'code/matter_controller_example' into 'master'
examples: Add matter controller example

See merge request app-frameworks/esp-rainmaker!385
2023-10-10 00:35:08 +08:00
WanqQixiang
b5da8d7d4a examples: Add matter controller example 2023-10-09 15:15:56 +08:00
Piyush Shah
cfca241575 idf_component_manager: Add components of esp rainmaker to component manager
Includes esp_rainmaker and esp_schedule
2023-09-22 09:40:00 +05:30
Piyush Shah
f6ed0c4994 components: Updated and moved some components
- qrcode, ws2812_led and gpio_button moved to examples/common
- esp-insights and rmaker_common submodules updated
- json_generator and json_parser components copied from component
  manager so that they can be used for component overrides
2023-09-22 09:39:55 +05:30
Vikram Dattu
9255e94b52 Remove Insights component for IDF >= 5.0 as it is already included by esp-matter
Signed-off-by: Vikram Dattu <vikram.dattu@espressif.com>
2023-09-21 11:25:26 +05:30
Vikram Dattu
7a8b26c936 matter examples: Change flag to -std=gnu++17 to fix build errors
Signed-off-by: Vikram Dattu <vikram.dattu@espressif.com>
2023-09-21 11:18:24 +05:30
Vikram Dattu
c43cd071fa IRAM optimization fix for ESP32 to all examples
From IDF 5.1 and above, we are out of IRAM for ESP32.
Enabled FreeRTOS functions to flash option to save IRAM. This is same existing fix in other examples

Signed-off-by: Vikram Dattu <vikram.dattu@espressif.com>
2023-09-15 16:18:47 +05:30
sanket.wadekar
ed52355881 feature: Add APIs to enable/disable local control.
If local control is enabled via config option (CONFIG_ESP_RMAKER_LOCAL_CTRL_AUTO_ENABLE),
the enabling/disabling will happen internally and the behaviour will be
unchanged. However, if the config option is disabled, applications can
still call esp_rmaker_local_ctrl_enable/disable at runtime as and when
required, if CONFIG_ESP_RMAKER_LOCAL_CTRL_FEATURE_ENABLE option is enabled.

Note that the older config option CONFIG_ESP_RMAKER_LOCAL_CTRL_ENABLE
has been renamed to CONFIG_ESP_RMAKER_LOCAL_CTRL_AUTO_ENABLE. However,
CONFIG_ESP_RMAKER_LOCAL_CTRL_ENABLE will also continue to work and
ensure backward compatibility
2023-09-08 23:46:21 +05:30
sanket.wadekar
d789c719e6 wifi_prov: Add mfg data for improved device discovery
For BLE provisioning, adding some metadata in BLE advertisement can help
apps in filtering the scanned device list better, instead of relying
just on the prefix. It can also help show the device type even before
provisioning.

Metadata has been added in led_light and switch examples only, but can be
added in any other project too, as per the apps' requirement.
2023-08-18 18:22:06 +05:30
sanket.wadekar
e627cc6beb Added matter_light and matter_switch example 2023-08-08 14:08:29 +05:30
sanket.wadekar
58e936f79f examples: Include nvs keys partition to enable using nvs encryption
Also updates the rmaker_common submodule to include support for encrypted fctry nvs partition.
2023-07-14 14:37:24 +05:30
Piyush Shah
d347bb62e6 led_light: Add a sample usage for cmd-response 2023-06-13 19:57:59 +05:30
sanket.wadekar
d7dc0c56c9 task: create event loop in app_insights 2023-05-29 15:21:34 +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
7da0ec23db Bugfix: MQTT budget exceed causing WDT trigger in ESP-Insights
Cause: A vicious cycle:
MQTT budget exceed error print getting logged into ESP-Insights.
When the RTC memory is full, this causes it to drop the message and
raise memory full event, which then taken action as reporting Insights
data immediately. This again causes MQTT budget exceed error!

The fix: Do not try to send message when budget is not available

Signed-off-by: Vikram <vikram.dattu@espressif.com>
2023-02-01 12:43:41 +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
2f2c383e5e mqtt_topics: Added support for AWS basic ingest topics.
Signed-off-by: sanket.wadekar <sanket.wadekar@espressif.com>
2022-11-21 18:59:47 +05:30
Piyush Shah
de07b6c76b Merge branch 'task/ota_event_handlers' into 'master'
Added OTA event handlers in examples

See merge request app-frameworks/esp-rainmaker!328
2022-11-21 21:21:35 +08:00
sanket.wadekar
cf3b8d851a Added MQTT disconnect and user node mapping reset calls on WiFi/Factory Reset.
Signed-off-by: sanket.wadekar <sanket.wadekar@espressif.com>
2022-11-15 10:43:09 +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
Piyush Shah
de9521febb Merge branch 'bugfix/insights_not_working' into 'master'
Update esp-insights submodule

See merge request app-frameworks/esp-rainmaker!326
2022-10-03 17:02:28 +08:00
Piyush Shah
4abd2cf641 switch: sdkconfig IRAM optimisation for ESP32
CONFIG_FREERTOS_PLACE_FUNCTIONS_INTO_FLASH=y set to prevent IRAM overflow
on ESP32 with switch example using idf v5.0

Can be used in other projects too, if similar IRAM overflows are seen.
2022-09-30 18:31:08 +05:30
Vikram
3834314f72 Use SPIRAM for esp-insights allocations
When SPIRAM not available, it falls to internal RAM

Signed-off-by: Vikram <vikram.dattu@espressif.com>
2022-09-16 13:10:50 +05:30
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
Chirag Atal
8fb1966178 gpio_button: Renaming button to gpio_button to fix compilation errors
Multiple components with the same name are detected if the idf_component_manager also includes the button component.
2022-07-20 14:43:07 -04:00
Piyush Shah
9f87e123e7 Merge branch 'task/ota-rollback' into 'master'
ota: Better usage of App rollback feature

See merge request app-frameworks/esp-rainmaker!309
2022-07-14 19:23:26 +08:00
Chirag Atal
db2c8d3b58 minor: Fix support for cpp 2022-07-13 12:46:41 -04:00
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
67cefd68d3 led_light: Use default OTA server certificate
Earlier example used a local certificate just for demo purposes.
However, since the RainMaker OTA server is the default server anyways,
it's better to use that same default certificate.
2022-05-04 18:05:55 +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
baf1dea322 switch: Add handling of new app wifi events
Also added the call missing for RMaker Common events
2022-04-28 20:04:15 +05:30
Piyush Shah
4250addc13 app_wifi: Make provisioning prefix configurable 2022-04-28 17:21:34 +05:30
Piyush Shah
c0af462fee app_wifi: Add an option to reset prov state machine on failure
Earlier, a reset and reboot were required if wrong Wi-Fi credentials
were given during provisioning. With this change, based on some
configured number of reconnection attempts, the firmware will go back into
provisioning mode.
2022-04-28 17:21:34 +05:30
Piyush Shah
d796985bac app_wifi: Minor feature additions to provisioning workflow
- Provide an option of provisioning without PoP pin (use with caution).
- Config option for provisioning timeout (set to 30 min by default).
Useful especially when there is no PoP, and so you want to keep the device
in provisioning mode only for a few minutes after boot up.
2022-04-28 17:21:34 +05:30