Commit Graph

144 Commits

Author SHA1 Message Date
Piyush Shah
a5dbd2d8d9 esp_rainmaker: Add a component manager dependency for mDNS component for idf >= 5.0
Closes: https://github.com/espressif/esp-rainmaker/issues/133
2022-07-12 14:37:36 +05:30
Piyush Shah
88335d174c esp_rmaker_core: Minor changes for compilation with idf v5.0/master 2022-06-29 23:21:14 +05:30
sivar2311
07533b82a1 Merge branch 'espressif:master' into master 2022-06-09 09:10:58 +02:00
Piyush Shah
677a244fe1 Merge branch 'task/name_param_cb' into 'master'
esp_param_name: Give an option to handle name param in application callback

See merge request app-frameworks/esp-rainmaker!286
2022-06-07 16:50:24 +08:00
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
b73f9e1e63 claiming: Make self claiming as the default for esp32s3 and esp32c3
It was already the default for esp32s2. So, only esp32 will have
assisted claiming as default. This change was made because RainMaker
now supports admin roles even for Self Claimed nodes. Please check
CHANGES.md for details
2022-06-06 20:37:17 +05:30
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
e385522bcb esp_param_name: Give an option to handle name param in application callback 2022-06-06 20:33:28 +05:30
Piyush Shah
cd12423912 bugfix: Compilation fixes for different idf versions and targets 2022-06-06 16:11:36 +05:30
Piyush Shah
a72d640d93 json: Update the json parser and generator submodules
Also remove the logic to upload them to idf component manager, because
that is now managed from idf-extra-components
2022-06-06 16:11:36 +05:30
sivar2311
f1cbb8c412 Added definitions for various parameters and UI types. 2022-05-28 06:41:32 +02:00
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
295b6a3839 rmaker_user_mapping: Fixes for bugs seen during re-provisioning 2022-04-28 20:04:10 +05:30
Piyush Shah
174a38b56c Merge branch 'task/ota_improvements' into 'master'
ota: Minor improvements

See merge request app-frameworks/esp-rainmaker!295
2022-04-28 17:32:32 +08:00
Piyush Shah
1cd07a0099 ota: Minor improvements
- Expose some internal APIs
    - External OTA callbacks can now call the internal function to manage OTA
    - Applications can explicitly send the OTA fetch publish message to check
    if OTA is available in case of OTA using Topics

- Handle network connectivity loss using keep-alive

- Send "rejected" as OTA status for project/version mismatch, instead of
  "failed".
2022-04-28 14:44:28 +05:30
Piyush Shah
72283a552d esp_rmaker_node_config: Added some new fields
Node info:
- project_name: The name of the project as configured in CMakeLists.txt.
  "model" was earlier being used for this and will continue to be used
  for backward compatibility, but now it would be ok to override model
  using the esp_rmaker_node_add_model() API.
- platformm: Read from CONFIG_IDF_TARGET, tells the platform being used
  (esp32, esp32s2, esp32c3,....)

Device
- model (optional)
2022-04-27 20:20:59 +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
c445fe49fd claim_configs: Allow choosing between self/assisted claiming for esp32c3 and esp32s3 2022-03-16 23:25:18 +05:30
Piyush Shah
c1187fed84 user_node_mapping: Better handling for user reset and mapping state
Even when an explicit user reset was triggered by the firmware,
the RMAKER_EVENT_USER_NODE_MAPPING_DONE event was getting generated,
which was misleading and causing issues while integrating other
frameworks. A new event RMAKER_EVENT_USER_NODE_MAPPING_RESET has
been added to distinguish this event.

The esp_rmaker_user_node_mapping_get_state() has also been exposed
for applications to use. Note that the CONFIG_ESP_RMAKER_USER_ID_CHECK
config option should be enabled to get correct state.
2022-03-16 13:10:33 +05:30
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
13150fb042 Replace deprecated defines with the new ones
- Replace xTimerHandle     with TimerHandle_t
- Replace portTickType     with TickType_t
- Replace portTICK_RATE_MS with portTICK_PERIOD_MS
2022-03-04 17:46:33 +05:30
Shubham Patil
5c95345ff6 Update esp_insights and rmaker_common submodules 2022-03-04 17:44:27 +05:30
shixinke
a00376189d esp_schedule: Update relative seconds field data type 2022-02-27 15:36:06 +08:00
Piyush Shah
d229e35b42 esp_rmaker_core: Expose esp_rmaker_param_update() API to assist in multi param updates 2022-02-17 14:37:57 +05:30
Piyush Shah
27becc6dff Merge branch 'bugfix/one_shot_schedule' into 'master'
esp_schedule: Fix a bug which could cause wrong expiry check for one shot schedules

See merge request app-frameworks/esp-rainmaker!280
2022-02-04 10:49:05 +00:00
Piyush Shah
61eb58aae1 esp_schedule: Fix a bug which could cause wrong expiry check for one shot schedules
One shot schedules are disabled in the esp_rmaker_schedule file as soon
as they execute, resulting in their next trigger time to be set to 0.
The code in esp_schedule was considering such schedules as "Not expired"
and was erroneously starting a timer for them.
2022-02-04 00:46:48 +05:30
Piyush Shah
b145ca618b ota: Append a new server certificate for OTA for some specific AWS regions 2022-02-01 00:19:19 +05:30
Piyush Shah
8f5d4cdd6d Merge branch 'fix/bt_check_during_ota' into 'master'
esp_rmaker_ota: Disable wifi power save only if BT controller is idle

See merge request app-frameworks/esp-rainmaker!276
2022-01-27 07:26:25 +00:00
Amit Sheth
b4c2bc7a9d esp_rmaker_ota: Disable wifi power save only if BT is idle/disabled
Co-ex limitation:
https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-guides/wifi.html?highlight=power%20save#station-sleep
2022-01-27 10:48:33 +05:30
Vikram
2ee18ee6f3 esp_rmaker_core: Added an event to indicate that local control service has started
Signed-off-by: Vikram <vikram.dattu@espressif.com>
2022-01-19 17:38:06 +05:30
Piyush Shah
518a5a83c5 Merge branch 'task/local_control_sec1' into 'master'
esp_rmaker_local_ctrl: Added support for sec1

See merge request app-frameworks/esp-rainmaker!246
2022-01-18 11:24:21 +00:00
Chirag Atal
3bd64da66a esp_rmaker_local_ctrl: Added support for sec1
Also created a service which has POP as a param. The clients such as phone app can use this POP to connect to the device if the security type is sec1.
For sec0, this service is not created.
2022-01-11 14:52:46 +05:30
shixinke
d8341cb54d esp_rmaker_ota: Provide option to modify buff size in menuconfig 2021-12-02 18:07:48 +08:00
Piyush Shah
722635985e Merge branch 'bugfix/params_realloc' into 'master'
esp_rmaker_params: Fixes for buffer re-allocation and esp_rmaker_param_update_and_notify()

See merge request app-frameworks/esp-rainmaker!269
2021-11-18 17:37:57 +00:00
Piyush Shah
252b47c2cc esp_rmaker_params: Fixed an issue with esp_rmaker_param_update_and_notify()
Wrong flags were getting modified, thereby causing the param update
publish message to get skipped after sending the notification message.
2021-11-17 23:14:44 +05:30
Piyush Shah
841d59cabe esp_rmaker_params: Fixes for issues seen when sending buffer is re-allocated 2021-11-17 23:13:18 +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
Chirag Atal
7815a10095 qrcode: Replacing the qrcode component with the one from IDF.
This helps in cases where the IDF qrcode component and the RainMaker qrcode component both are included. Only one is selected in that case. When both are same, and have the same APIs, if either one is selected, it compiles without errors.
2021-09-28 13:29:19 +05:30
Piyush Shah
8738eb0fab esp32s3: Add support for the new platform ESP32-S3 2021-09-08 00:32:39 +05:30
Piyush Shah
33e7b0e4d6 Merge branch 'feature/notify' into 'master'
esp_rmaker_core: Add support for triggering phone app notifications

See merge request app-frameworks/esp-rainmaker!256
2021-09-07 17:25:00 +00:00
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
afcc67f3ec esp_rmaker_core: Add support for triggering phone app notifications
Supports two types of notifications
1. Parameter updates
2. Alerts

Please check the API docs for more information
2021-09-07 16:00:09 +05:30
Piyush Shah
dcfecc3f41 Merge branch 'task/wifi_conn_check_in_rmaker_task' into 'master'
rmaker_core: Check for wifi connection in rmaker_task

See merge request app-frameworks/esp-rainmaker!240
2021-09-03 16:51:13 +00:00
Piyush Shah
9364c1d10b esp_rmaker_user_mapping: Fixed a compilation warning 2021-09-03 18:27:02 +05:30
Shubham Patil
f6510dbd21 rmaker_core: Check for wifi connection in rmaker_task 2021-09-03 12:32:29 +05:30
Piyush Shah
2655228091 Merge branch 'bugfix/user_association' into 'master'
esp_rmaker_user_mapping: Add checks for user id for better security

See merge request app-frameworks/esp-rainmaker!260
2021-09-02 13:19:42 +00:00
Piyush Shah
412ad546c4 esp_rmaker_user_mapping: Add checks for user id for better security 2021-09-02 14:34:02 +05:30
Chirag Atal
2425b17394 esp_rmaker_core: Added a get_device_by_name API similar to params 2021-09-02 09:57:24 +05:30