Commit Graph

85 Commits

Author SHA1 Message Date
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
Piyush Shah
f57a5ec62d Merge branch 'feature/scenes' into 'master'
esp_rmaker_scenes: Add scenes support.

See merge request app-frameworks/esp-rainmaker!245
2022-03-29 21:48:25 +08:00
Piyush Shah
2a08ed9cfe Fixes for idf v5.0 2022-03-15 20:53:20 +05:30
Chirag Atal
764db8d072 esp_rmaker_scenes: Add scenes support.
This adds a new standard service and its standard params.
The implementation is similar to the schedule structure but without triggers.
2022-03-09 16:16:23 +05:30
Shubham Patil
e3573c81da app_insights: Insights transport changes 2022-03-04 17:44:31 +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
dc65f11661 esp_insights: Update submodule and minor fixes
- app_insights:
 - Replaced esp_insights_rmaker_enable() API with esp_insights_enable()
 - Enable errors, warnings, and events when user selects LOG_TYPE_ALL
 - Fixed compilation errors and warnings
2021-10-29 09:48:59 +05:30
Shubham Patil
e69372a2fe examples: Fixed typos in comment 2021-09-09 10:53:31 +05:30
Piyush Shah
8738eb0fab esp32s3: Add support for the new platform ESP32-S3 2021-09-08 00:32:39 +05:30
Piyush Shah
036e2dae48 switch: Add sample usage for mobile push notifications
Enabling CONFIG_EXAMPLE_ENABLE_TEST_NOTIFICATIONS for the switch example will
enable the test mobile notifications on push button events. Turning the switch
on would report a parameter notification like {"Switch":{"Power":true}} and
turning off would report an alert "Switch was turned off".

Note that push notifications should be used only when users need to be specifically
alerted about some event even when the app is in background, not otherwise.
2021-09-07 16:00:13 +05:30
Piyush Shah
f1b92c293f Minor fixes
- Compilation issues were seen on some hosts after insights components were included.
- app_wifi: CMake file had esp_rainmaker as a dependency even if it was no dependent on it.
- WS2812 could not be used for ESP32 due to Kconfig logic
2021-07-06 23:02:24 +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
0b819949cf examples: Add timezone service in some examples
Setting correct timezone is mandatory for scheduling to work correctly.
Earlier, the default timezone was set to "Asia/Shanghai" and a config
change was required for setting appropriate timezone.

However, now that the phone apps have support for setting the timezone
using the RainMaker timezone service, it has been enabled in all
examples that had scheduling enabled.
2021-06-07 11:16:45 +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
fce91c4fb0 esp_rmaker_core: Add a system service for reboot/reset 2021-05-28 23:21:58 +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
8854443e4e examples: Use FreeRTOS timer instead of esp_timer for periodic tasks
esp_timer is generally recommended when high precision is required.
However, since that is not the case for periodic reporting of temperature
values, replaced it with freeRTOS Timer.
2021-03-23 01:24:39 +05:30
Piyush Shah
009c6d7ab3 Remove a stale file added mistakenly 2021-03-23 01:02:03 +05:30