Commit Graph

306 Commits

Author SHA1 Message Date
Piyush Shah
b442dfcf3c node_info: Add an optional field "readme" in node info
This can point to some README url that the phone apps can fetch and show
at appropriate places.
2025-12-08 12:43:45 +05:30
Wang Qixiang
209087c7a5 esp_rainmaker: decouple esp_rcp_update from esp_rainmaker 2025-12-08 01:56:43 +05:30
Piyush Shah
da838cbf13 rmaker_common: Remove the submodule and its references 2025-11-13 09:42:38 +05:30
Piyush Shah
33d60a567b rmaker_console: Add set-param, update-param and get-param commands
- Add set-param command to set device parameter values, invoke respective callbacks and report to cloud
  Usage: set-param <device_name> <param_name> <value>
- Add update-param command to just report param value to cloud, without invoking callbacks
  Usage: update-param <device_name> <param_name> <value>
- Add get-param command to get device parameter values
  Usage: get-param <device_name> <param_name>
- Support all parameter types: boolean, integer, float, string

This enables easy interaction with ESP RainMaker devices through console interface.
2025-11-12 20:50:06 +05:30
Piyush Shah
9e4d1a683e esp_rmaker_params: Add "Firmware" as a new request source for set-params
Useful for identifying set params triggered from the firmware itself,
like from the CLI
2025-11-12 20:50:06 +05:30
Piyush Shah
4820d8d83f esp_rainmaker: Make version dependency for network_provisioning more flexible 2025-11-12 17:01:19 +05:30
Piyush Shah
c18a11fe6a Merge branch 'feature/aws_credential_api' into 'master'
Added AWS credential provider APIs

See merge request app-frameworks/esp-rainmaker!567
2025-11-11 18:43:11 +05:30
Junius Pun
925b69f959 esp_schedule: migration to idf-extra-components 2025-11-04 21:37:47 +05:30
Vikram Dattu
54ff0faf20 Added AWS credential provider APIs
- Two APIs added: get_aws_region and get_security_token
 - Useful, if an application needs to get credentials for a role
 - Also, added the facility to set MQTT_CRED_HOST
2025-10-27 10:27:55 +05:30
Vikram Dattu
f9b1948fdf Disabled esp_bt code from rmaker_ota
- There is no esp_bt.h and controller available on P4/hosted.
 - Disabled this for now
2025-10-17 15:48:56 +05:30
Piyush Shah
42af2bd344 esp_daylight: Remove component as it was moved to idf-extra-components 2025-09-24 16:08:42 +05:30
Piyush Shah
b57b750fb4 cmd_resp: Code guards were missing for some config options 2025-09-23 16:49:11 +05:30
Piyush Shah
a131a00490 esp_rainmaker: Change default MQTT HOST for public RainMaker
The MQTT Host is now under a proper domain: mqtt.rainmaker.espressif.com
2025-09-22 14:34:53 +05:30
WanqQixiang
11acb5496e rmaker: use OpenThread Partition ID as the network-id and add it to node attributes 2025-09-15 14:37:00 +08:00
Piyush Shah
2ab70b5d06 feature: Add parameter updates via command-response (command id 1)
Adds support for triggering parameter updates through the command-response
framework using the special command id 1. The feature is controlled by the new
CONFIG_ESP_RMAKER_PARAM_CMD_RESP_ENABLE option and is enabled by default
when command-response is enabled.

The status and updated params are returned in the response data

Sample command payload: {"params":{"Light":{"Power":false}}}
Sample response payload: {"status":"success","params":{"Light":{"Power":false}}}

This will also update the values in the params DB returned via the
regular get params APIs like GET /user/nodes/params
2025-09-12 19:51:00 +05:30
Jim
e0bc3f5e99 ota: Add resumption ota feature 2025-09-12 09:18:40 +08:00
Piyush Shah
726a8e8d06 esp_rainmaker: Add support for sunrise/sunset based schedules
Can be enabled using CONFIG_ESP_RMAKER_SCHEDULE_ENABLE_DAYLIGHT, which
depends on CONFIG_ESP_SCHEDULE_ENABLE_DAYLIGHT=y.

These can be more reliable compared to the cloud driven daylight
automations as the calculations happen locally on the device and
schedules can take effect even when the device is offline.

This also supports offset so that you can schedule actions before/after
sunrise/sunset.

Together, these have a binary size impact of about 12,250 bytes.
CONFIG_ESP_SCHEDULE_ENABLE_DAYLIGHT contributes 11,500 bytes
CONFIG_ESP_RMAKER_SCHEDULE_ENABLE_DAYLIGHT contributes additional 750
bytes.
2025-09-10 18:23:40 +05:30
Piyush Shah
decb722fa4 esp_schedule: Add support for sunrise/sunset schedules
Enable using CONFIG_ESP_SCHEDULE_ENABLE_DAYLIGHT (default enabled)
Has a binary size impact of about 11,500 bytes
2025-09-10 18:23:40 +05:30
Piyush Shah
d7d67e1865 esp_daylight: Add a component to get sunrise/sunset time for a given location
Using NOAA equations as per the reference: https://gml.noaa.gov/grad/solcalc/
2025-09-10 18:23:40 +05:30
Piyush Shah
f3f7f74f4e esp_rainmaker: Remove legacy code for esp-idf versions < 5.1
Also removed CONFIG_ESP_RMAKER_USING_NETWORK_PROV

Made network prov as default since it is supported for esp-idf v5.1
onwards and esp-idf v5.0 has reached end of life.

This will make the code more readable
2025-08-29 19:54:54 +05:30
Piyush Shah
7e2dd9e5db esp_schedule: Remove legacy code for esp-idf versions < 5.1 2025-08-29 19:52:06 +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
eb187e13c1 chall_resp: Allow challenge-response based mapping with Assisted Claiming 2025-08-29 18:54:10 +05:30
Piyush Shah
8371bc0bbf bugfix: User-Node mapping could fail if esp-insights is enabled 2025-08-26 16:13:12 +05:30
Piyush Shah
a87c825fbb chal_resp: Add support for challange response based user node association
This is a synchronous user-node mapping method that is performed during
provisioning, but even before sending Wi-Fi credentials and does not require
any communication from the node to the cloud. Check the esp_rainmaker
component CHANGELOG for details.
2025-08-08 20:02:38 +05:30
sanket.wadekar
cf49ba4219 esp_rmaker_ota: Added OTA Updates over MQTT
The regular OTA upgrades with ESP RainMaker required an additional https
connection to fetch the OTA image, which has a significant impact on
heap usage.

With MQTT OTA, the same MQTT channel used for rest of the RainMaker
communication is used to fetch the OTA image, thereby saving on RAM.
This could be slightly slower and may odd some cost. but the overall
impact would be low enough when compared against the advantages.

Signed-off-by: sanket.wadekar <sanket.wadekar@espressif.com>
Co-authored-by: Piyush Shah <piyush.shah@espressif.com>
2025-08-04 21:27:08 +05:30
Piyush Shah
b2bd4c1e9a bugfix: Duplicate otafetch was causing crashes
Triggering a new otafetch while one was already in progress was causing
crashes due to incorrect setting/clearing of data.

This happened specifically on rebooting into new firmware after an OTA
when both, CONFIG_BOOTLOADER_APP_ROLLBACK_ENABLE and CONFIG_ESP_RMAKER_OTA_AUTOFETCH
are enabled.
2025-08-04 14:46:19 +05:30
jim
4a0ff0d0eb esp_rainmaker: make esp_rmaker_params_mqtt_init function execute in
queue so that it will not block event task
2025-08-01 14:00:40 +08:00
Shubham Patil
af03e62381 components/esp_rainmaker: make cmd response payload publish api public
also bump the minimum required rmaker_common's version to 1.4.12 to use
the newly added payload generator APIs.
2025-07-13 11:24:26 +05:30
Shubham Patil
8076c0dd76 rmaker_common: update submodule to add tlv payload generator api 2025-07-11 18:14:09 +05:30
Piyush Shah
d0d0e27a98 Merge branch 'task/ota_reliability' into 'master'
ota: Enhance OTA fetch reliability with retry mechanism and delivery confirmation

See merge request app-frameworks/esp-rainmaker!548
2025-06-25 06:49:32 +05:30
Piyush Shah
b2dd13214c esp_rainmaker: Bump up component version and dependency for OTA reliability improvements 2025-06-24 19:58:21 +05:30
Piyush Shah
085b5da9cf esp_rmaker_ota: Retry on failure
- Try OTA multiple times (as per `CONFIG_ESP_RMAKER_OTA_MAX_RETRIES`, set to 3 by default) if it fails
- Schedule an OTA fetch as per `CONFIG_ESP_RMAKER_OTA_RETRY_DELAY_MINUTES` if all retries fail
2025-06-24 19:53:32 +05:30
esp
8bacc14517 fix(local_ctrl): Fix srp host name is too short for some node id used with uuid 2025-06-24 11:11:46 +08:00
Piyush Shah
e081eef5c2 ota: Enhance OTA fetch reliability with retry mechanism and delivery confirmation
- Monitor message publish acknowledgement for the otafetch message
- Add retry logic if otafetch fails
2025-06-20 14:13:20 +05:30
Piyush Shah
4ab40d00d8 esp_rainmaker: Bump up component version for OTA Progress reporting feature 2025-06-13 18:28:29 +05:30
jim
04613d9c0f ota: Add ota upgrade progress report feature 2025-06-13 18:28:11 +05:30
Piyush Shah
45d2001a28 Merge branch 'task/c5support' into 'master'
esp32c5: Add ESP32-C5 support to RainMaker

See merge request app-frameworks/esp-rainmaker!544
2025-06-10 14:18:46 +05:30
Hrishikesh Dhayagude
48a2ccdc80 Merge branch 'fix-matter-main' into 'master'
examples/matter: fix matter builds with main branch

See merge request app-frameworks/esp-rainmaker!534
2025-06-09 16:15:05 +08:00
Piyush Shah
1d3b86e232 esp32c5: Add ESP32-C5 support to RainMaker core component
- Add ESP32-C5 secure boot header include in esp_rmaker_secure_boot_digest.h
- Bump component version from 1.5.5 to 1.5.6 for ESP32-C5 support
2025-06-06 17:50:32 +05:30
Piyush Shah
6c839a9251 Merge branch 'task/simple_ts_ttl' into 'master'
simple timeseries: Add an option to include ttl field (in days) while reporting values

See merge request app-frameworks/esp-rainmaker!540
2025-05-30 13:28:56 +05:30
Shubham Patil
1f56bf5fde components/esp_rainmaker: use latest version of esp_rcp_update to fix conflict 2025-05-29 22:49:44 +05:30
Piyush Shah
2dcc01c665 esp_rainmaker: Bump up the component version for new simple TS TTL feature 2025-05-22 20:41:31 +05:30
Piyush Shah
08c419da85 simple timeseries: Add a new helper API to directly report time series data
This allows users to avoid the double reporting that happens when using
esp_rmaker_param_update_and_report(), once for regular param update and
once for time series update. This can help reduce cost, especially when
the apps are using values only from the simple time series API.
2025-05-22 20:41:25 +05:30
Piyush Shah
d319d1d7c7 simple timeseries: Add an option to include ttl field (in days) while reporting values
This will ensure that the size of simple time series data in backend
does not keep growing and gets deleted after the configured time.

Typically, 30-60 days would be enough for most use cases.
2025-05-21 16:58:34 +05:30
WanqQixiang
72b54cf485 esp-rmaker: fix the host name check for Thread local control 2025-05-12 18:01:33 +08:00
WanqQixiang
3c019227b4 esp_rmaker: Add local control for Thread devices 2025-04-10 10:34:08 +08:00
Vikram Dattu
699df878b1 Extend signature generation to work on RSA signature
- Added signature generation for RSA signature in addition to ECDSA
 - Bugfix: use inlen, instead of doing strlen on input data
 - Bugfix: outlen should be `2 * slen` and not `slen` as we convert this to HEX
 - Also added a sign-data console command

 - component manager: Updated patch version for rainmaker component
2025-03-26 15:56:19 +05:30
Piyush Shah
327f35437e esp_rainmaker_components: Remove all external dependencies from codebase
Removed
- esp-insights
- jsmn
- json_generator
- json_parser

Instead, pick them up from idf component manager
2025-03-25 17:11:07 +05:30
Piyush Shah
6ed65d92fc Merge branch 'bugfix/fix_string_param_memory_leak' into 'master'
fix(esp_rainmaker): Fix memory leak when set string parameter

See merge request app-frameworks/esp-rainmaker!522
2025-03-04 16:04:34 +08:00