mirror of
https://github.com/alexandrebobkov/ESP-Nodes.git
synced 2024-10-05 20:47:50 -04:00
.
This commit is contained in:
parent
61ca50499f
commit
169af8b5d6
@ -180,7 +180,7 @@ void app_main()
|
||||
esp_rmaker_config_t rainmaker_cfg = {
|
||||
.enable_time_sync = false,
|
||||
};
|
||||
esp_rmaker_node_t *node = esp_rmaker_node_init(&rainmaker_cfg, "ESP RainMaker Device", "Switch");
|
||||
esp_rmaker_node_t *node = esp_rmaker_node_init(&rainmaker_cfg, "ESP RainMaker Table Lamp", "Lamp");
|
||||
if (!node) {
|
||||
ESP_LOGE(TAG, "Could not initialise node. Aborting!!!");
|
||||
vTaskDelay(5000/portTICK_PERIOD_MS);
|
||||
@ -191,7 +191,7 @@ void app_main()
|
||||
* You can optionally use the helper API esp_rmaker_switch_device_create() to
|
||||
* avoid writing code for adding the name and power parameters.
|
||||
*/
|
||||
switch_device = esp_rmaker_device_create("Switch", ESP_RMAKER_DEVICE_SWITCH, NULL);
|
||||
switch_device = esp_rmaker_device_create("Lamp", ESP_RMAKER_DEVICE_SWITCH, NULL);
|
||||
|
||||
/* Add the write callback for the device. We aren't registering any read callback yet as
|
||||
* it is for future use.
|
||||
@ -202,7 +202,7 @@ void app_main()
|
||||
* user friendly custom name from the phone apps. All devices are recommended to have this
|
||||
* parameter.
|
||||
*/
|
||||
esp_rmaker_device_add_param(switch_device, esp_rmaker_name_param_create(ESP_RMAKER_DEF_NAME_PARAM, "Switch"));
|
||||
esp_rmaker_device_add_param(switch_device, esp_rmaker_name_param_create(ESP_RMAKER_DEF_NAME_PARAM, "Lamp"));
|
||||
|
||||
/* Add the standard power parameter (type: esp.param.power), which adds a boolean param
|
||||
* with a toggle switch ui-type.
|
||||
|
Loading…
Reference in New Issue
Block a user