- Mark new app firmware as valid only if MQTT connection is successful.
- Report OTA success to RainMaker backend only after successful
connection after booting into new firmware.
- If the new firmware cannot connect to MQTT within specified time
(Default 90 seconds, configuratble), it will roll back into older
firmware. Even if the timer logic fails for some reason, a reboot
will also trigger the rollback.
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
- 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
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.
- 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".
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)
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.
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.
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.
- 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
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.
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.