Commit Graph

125 Commits

Author SHA1 Message Date
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
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
Piyush Shah
5d6b1ef055 Merge branch 'bugfix/fix_system_reboot_reset' into 'master'
esp_rmaker_system_service: Add checks for the param values received before taking action

See merge request app-frameworks/esp-rainmaker!255
2021-07-30 16:49:05 +00:00
Piyush Shah
69574aa8e9 Merge branch 'bugfix/ota_cert_doc' into 'master'
Fixed typo in docs for ota server_cert

See merge request app-frameworks/esp-rainmaker!253
2021-07-30 12:40:45 +00:00
yuanjm
291f249f92 esp_rmaker_system_service: Add checks for the param values received before taking action 2021-07-30 18:01:46 +08:00
Bruno Binet
5e2ff08671 Don't skip common name check if not required
CONFIG_ESP_RMAKER_SKIP_COMMON_NAME_CHECK should be set if common name check must be skipped.
2021-07-30 00:48:41 +05:30
Piyush Shah
c9a53103f8 Merge branch 'bugfix/button_gpio_mask' into 'master'
Updated gpio pin bit mask. This fixed issue #81

See merge request app-frameworks/esp-rainmaker!252
2021-07-26 15:00:19 +00:00
Michal Dvořák
8977045b06 Fixed typo in docs for ota server_cert
Correct cert constant name is ESP_RMAKER_OTA_DEFAULT_SERVER_CERT, not ESP_RMAKER_DEFAULT_OTA_SERVER_CERT
2021-07-23 17:57:29 +05:30
shixinke
f1430a2ea6 esp_rmaker_schedule: Add info and flags field 2021-07-22 23:36:20 +05:30
aadwaitkale
52bf91d617 Updated gpio pin bit mask. This fixed issue #81 2021-07-19 12:14:27 +05:30
Piyush Shah
a78fca21bf Merge branch 'feature/rel_time_schedule' into 'master'
schedules: Add support for schedules with relative time

See merge request app-frameworks/esp-rainmaker!243
2021-07-09 17:02:17 +00:00
Piyush Shah
d6c30c2ac2 schedules: Add support for schedules with relative time 2021-07-09 21:14:00 +05:30
yuanjm
b5952ed4ac esp_rmaker_param: Fix for a 4000 byte limitation on persistent param values
Parameters with PROP_FLAG_PERSIST could not be stored to NVS if their size was greater 4000 bytes
since they were getting stored as strings. Changed them to blobs, which allows much higher limit.
This does not break any existing devices since the firmware code checks for blobs as well as strings
for backward compatibility.
2021-07-09 19:54:47 +08:00
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
Sergei Silnov
ef81d4370c Upload components to the service 2021-06-07 14:27:30 +02:00
Piyush Shah
8f73dda4fb esp_rmaker_core: Add an API to get parameter value from Rmaker core 2021-06-01 20:09:37 +05:30
Piyush Shah
f8b833ac2f esp_rmaker_core: Add a new field "subtype" for devices 2021-06-01 20:08:28 +05:30
Piyush Shah
c68b4ed535 esp_rainmaker_core: Allow larger node config and param JSONs
The node config and node params JSON were limited by the size specified
in config options, since the JSON generator required pre-allocated buffer.

Now that the JSON generator gives a facility of finding out the total length
required to create the JSON, this config based limitation could be removed.

ESP_RMAKER_MAX_NODE_CONFIG_SIZE has been removed and instead, the required
node config size is dynamically computed and allocated.

ESP_RMAKER_MAX_PARAM_DATA_SIZE has still been retained and used as the
default size of params JSON, since params sizes keep on changing and it is
best to not keep re-allocating buffers. However, if the required size
exceeds the current max size, the node params buffer is re-allocated.

Similar logic has also been used in schedules JSON and the default max
scheduled count has been increased from 5 to 10, since higher number of
schedules can no more cause buffer overflow issues.
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
7a4146c4df submodules: Updated the RainMaker Common and CLI submodules
Common: Additional metadata for tracking RainMaker platform connections in AWS.
CLI: Modified workflow for Node Sharing.
2021-04-08 17:11:10 +05:30