Miscellaneous minor fixes

This commit is contained in:
Piyush Shah
2020-10-14 22:43:12 +05:30
parent cd072cd23a
commit fd094fb045
17 changed files with 70 additions and 8 deletions

View File

@@ -97,7 +97,7 @@ menu "ESP RainMaker Config"
config ESP_RMAKER_DEF_TIMEZONE
string "Default Timezone"
default ""
default "Asia/Shanghai"
help
Default Timezone to use. Eg. "Asia/Shanghai", "America/Los_Angeles".
Check documentation for complete list of valid values. This value

View File

@@ -495,7 +495,7 @@ char *esp_rmaker_device_get_name(const esp_rmaker_device_t *device);
* @return NULL terminated device type string on success.
* @return NULL in case of failure, or if the type wasn't provided while creating the device.
*/
char *esp_rmaker_device_get_name(const esp_rmaker_device_t *device);
char *esp_rmaker_device_get_type(const esp_rmaker_device_t *device);
/**
* Add a parameter to a device/service

View File

@@ -26,6 +26,8 @@ extern "C"
*
* It is recommended to set the timezone while using schedules. Check [here](https://rainmaker.espressif.com/docs/time-service.html#time-zone) for more information on timezones
*
* @note This API should be called after esp_rmaker_node_init() but before esp_rmaker_start().
*
* @return ESP_OK on success.
* @return error in case of failure.
*/

View File

@@ -12,6 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#include <time.h>
#include <string.h>
#include <esp_log.h>
#include <esp_err.h>

View File

@@ -86,7 +86,13 @@ void app_main()
esp_rmaker_device_add_param(fan_device, esp_rmaker_speed_param_create(ESP_RMAKER_DEF_SPEED_NAME, DEFAULT_SPEED));
esp_rmaker_node_add_device(node, fan_device);
/* Enable scheduling */
/* Enable scheduling.
* Please note that you also need to set the timezone for schedules to work correctly.
* Simplest option is to use the CONFIG_ESP_RMAKER_DEF_TIMEZONE config option.
* Else, you can set the timezone using the API call `esp_rmaker_time_set_timezone("Asia/Shanghai");`
* For more information on the various ways of setting timezone, please check
* https://rainmaker.espressif.com/docs/time-service.html.
*/
esp_rmaker_schedule_enable();
/* Start the ESP RainMaker Agent */

View File

@@ -11,3 +11,8 @@ CONFIG_PARTITION_TABLE_MD5=y
CONFIG_MBEDTLS_DYNAMIC_BUFFER=y
CONFIG_MBEDTLS_DYNAMIC_FREE_PEER_CERT=y
CONFIG_MBEDTLS_DYNAMIC_FREE_CONFIG_DATA=y
# For BLE Provisioning using NimBLE stack (ESP32 only)
CONFIG_BT_ENABLED=y
CONFIG_BTDM_CTRL_MODE_BLE_ONLY=y
CONFIG_BT_NIMBLE_ENABLED=y

View File

@@ -11,3 +11,8 @@ CONFIG_PARTITION_TABLE_MD5=y
CONFIG_MBEDTLS_DYNAMIC_BUFFER=y
CONFIG_MBEDTLS_DYNAMIC_FREE_PEER_CERT=y
CONFIG_MBEDTLS_DYNAMIC_FREE_CONFIG_DATA=y
# For BLE Provisioning using NimBLE stack (ESP32 only)
CONFIG_BT_ENABLED=y
CONFIG_BTDM_CTRL_MODE_BLE_ONLY=y
CONFIG_BT_NIMBLE_ENABLED=y

View File

@@ -1,6 +1,6 @@
# HomeKit Switch Example
This example demonstrates ESP RaimMaker + HomeKit integration using the [esp-homekit-sdk](https://github.com/espressif/esp-homekit-sdk).
This example demonstrates ESP RainMaker + HomeKit integration using the [esp-homekit-sdk](https://github.com/espressif/esp-homekit-sdk).
## Setup

View File

@@ -30,7 +30,7 @@ static hap_char_t *on_char;
static void app_homekit_show_qr(void)
{
#ifdef CONFIG_EXAMPLE_USE_HARDCODED_SETUP_CODE
#define QRCODE_BASE_URL "https://api.qrserver.com/v1/create-qr-code/"
#define QRCODE_BASE_URL "https://espressif.github.io/esp-homekit-sdk/qrcode.html"
char *setup_payload = esp_hap_get_setup_payload(CONFIG_EXAMPLE_SETUP_CODE,
CONFIG_EXAMPLE_SETUP_ID, false, HAP_CID_SWITCH);
if (setup_payload) {

View File

@@ -21,3 +21,8 @@ CONFIG_LWIP_MAX_LISTENING_TCP=12
CONFIG_LWIP_UDP_RECVMBOX_SIZE=10
CONFIG_LWIP_AUTOIP=y
CONFIG_LWIP_AUTOIP_RATE_LIMIT_INTERVAL=60
# For BLE Provisioning using NimBLE stack (ESP32 only)
CONFIG_BT_ENABLED=y
CONFIG_BTDM_CTRL_MODE_BLE_ONLY=y
CONFIG_BT_NIMBLE_ENABLED=y

View File

@@ -107,7 +107,13 @@ void app_main()
};
esp_rmaker_ota_enable(&ota_config, OTA_USING_PARAMS);
/* Enable scheduling */
/* Enable scheduling
* Please note that you also need to set the timezone for schedules to work correctly.
* Simplest option is to use the CONFIG_ESP_RMAKER_DEF_TIMEZONE config option.
* Else, you can set the timezone using the API call `esp_rmaker_time_set_timezone("Asia/Shanghai");`
* For more information on the various ways of setting timezone, please check
* https://rainmaker.espressif.com/docs/time-service.html.
*/
esp_rmaker_schedule_enable();
/* Start the ESP RainMaker Agent */

View File

@@ -11,3 +11,8 @@ CONFIG_PARTITION_TABLE_MD5=y
CONFIG_MBEDTLS_DYNAMIC_BUFFER=y
CONFIG_MBEDTLS_DYNAMIC_FREE_PEER_CERT=y
CONFIG_MBEDTLS_DYNAMIC_FREE_CONFIG_DATA=y
# For BLE Provisioning using NimBLE stack (ESP32 only)
CONFIG_BT_ENABLED=y
CONFIG_BTDM_CTRL_MODE_BLE_ONLY=y
CONFIG_BT_NIMBLE_ENABLED=y

View File

@@ -115,7 +115,13 @@ void app_main()
temp_sensor_device = esp_rmaker_temp_sensor_device_create("Temperature Sensor", NULL, app_get_current_temperature());
esp_rmaker_node_add_device(node, temp_sensor_device);
/* Enable scheduling */
/* Enable scheduling.
* Please note that you also need to set the timezone for schedules to work correctly.
* Simplest option is to use the CONFIG_ESP_RMAKER_DEF_TIMEZONE config option.
* Else, you can set the timezone using the API call `esp_rmaker_time_set_timezone("Asia/Shanghai");`
* For more information on the various ways of setting timezone, please check
* https://rainmaker.espressif.com/docs/time-service.html.
*/
esp_rmaker_schedule_enable();
/* Start the ESP RainMaker Agent */

View File

@@ -11,3 +11,8 @@ CONFIG_PARTITION_TABLE_MD5=y
CONFIG_MBEDTLS_DYNAMIC_BUFFER=y
CONFIG_MBEDTLS_DYNAMIC_FREE_PEER_CERT=y
CONFIG_MBEDTLS_DYNAMIC_FREE_CONFIG_DATA=y
# For BLE Provisioning using NimBLE stack (ESP32 only)
CONFIG_BT_ENABLED=y
CONFIG_BTDM_CTRL_MODE_BLE_ONLY=y
CONFIG_BT_NIMBLE_ENABLED=y

View File

@@ -160,7 +160,13 @@ void app_main()
};
esp_rmaker_ota_enable(&ota_config, OTA_USING_PARAMS);
/* Enable scheduling */
/* Enable scheduling.
* Please note that you also need to set the timezone for schedules to work correctly.
* Simplest option is to use the CONFIG_ESP_RMAKER_DEF_TIMEZONE config option.
* Else, you can set the timezone using the API call `esp_rmaker_time_set_timezone("Asia/Shanghai");`
* For more information on the various ways of setting timezone, please check
* https://rainmaker.espressif.com/docs/time-service.html.
*/
esp_rmaker_schedule_enable();
/* Start the ESP RainMaker Agent */

View File

@@ -11,3 +11,8 @@ CONFIG_PARTITION_TABLE_MD5=y
CONFIG_MBEDTLS_DYNAMIC_BUFFER=y
CONFIG_MBEDTLS_DYNAMIC_FREE_PEER_CERT=y
CONFIG_MBEDTLS_DYNAMIC_FREE_CONFIG_DATA=y
# For BLE Provisioning using NimBLE stack (ESP32 only)
CONFIG_BT_ENABLED=y
CONFIG_BTDM_CTRL_MODE_BLE_ONLY=y
CONFIG_BT_NIMBLE_ENABLED=y

View File

@@ -11,3 +11,8 @@ CONFIG_PARTITION_TABLE_MD5=y
CONFIG_MBEDTLS_DYNAMIC_BUFFER=y
CONFIG_MBEDTLS_DYNAMIC_FREE_PEER_CERT=y
CONFIG_MBEDTLS_DYNAMIC_FREE_CONFIG_DATA=y
# For BLE Provisioning using NimBLE stack (ESP32 only)
CONFIG_BT_ENABLED=y
CONFIG_BTDM_CTRL_MODE_BLE_ONLY=y
CONFIG_BT_NIMBLE_ENABLED=y