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.
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.
- 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
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.