mirror of
https://github.com/alexandrebobkov/ESP-Nodes.git
synced 2025-08-08 03:22:21 +00:00
.
This commit is contained in:
@@ -201,7 +201,7 @@ void app_main()
|
||||
.enable_time_sync = false,
|
||||
};
|
||||
// Define device name and description as they should appear in logs
|
||||
esp_rmaker_node_t *node = esp_rmaker_node_init(&rainmaker_cfg, "ESP RainMaker Device", "Node ESP32C3 LuatOS");
|
||||
esp_rmaker_node_t *node = esp_rmaker_node_init(&rainmaker_cfg, "ESP Server Node", "ESP32-C3");
|
||||
if (!node) {
|
||||
ESP_LOGE(TAG, "Could not initialise node. Aborting!!!");
|
||||
vTaskDelay(5000/portTICK_PERIOD_MS);
|
||||
@@ -214,7 +214,7 @@ void app_main()
|
||||
*/
|
||||
|
||||
// Define device name and description as they should appear in RainMaker UI app
|
||||
switch_device = esp_rmaker_device_create("Node ESP32C3 LuatOS", ESP_RMAKER_DEVICE_SWITCH, NULL);
|
||||
switch_device = esp_rmaker_device_create("Server Lights", 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.
|
||||
@@ -225,7 +225,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, "Node ESP32C3 LuatOS"));
|
||||
esp_rmaker_device_add_param(switch_device, esp_rmaker_name_param_create(ESP_RMAKER_DEF_NAME_PARAM, "ESP32-C3"));
|
||||
|
||||
/* Add the standard power parameter (type: esp.param.power), which adds a boolean param
|
||||
* with a toggle switch ui-type.
|
||||
@@ -244,12 +244,7 @@ void app_main()
|
||||
/* CREATE TEMPERATURE SENSOR DEVICE*/
|
||||
// esp.device.temperature-sensor
|
||||
// Use pre-defined function
|
||||
temp_sensor_device = esp_rmaker_temp_sensor_device_create("Temperature Sensor", NULL, app_get_current_temperature());
|
||||
//temp_sensor_device = esp_rmaker_device_create("Node ESP32C3 Temperature", ESP_RMAKER_DEVICE_TEMP_SENSOR, NULL);
|
||||
//esp_rmaker_device_add_param(temp_sensor_device, esp_rmaker_name_param_create(ESP_RMAKER_DEF_NAME_PARAM, "Node ESP32C3"));
|
||||
//esp_rmaker_param_t *temp_param_primary = esp_rmaker_temperature_param_create(ESP_RMAKER_DEF_TEMPERATURE_NAME, app_get_current_temperature());
|
||||
//esp_rmaker_device_add_param(temp_sensor_device, temp_param_primary);
|
||||
//esp_rmaker_device_assign_primary_param(temp_sensor_device, temp_param_primary);
|
||||
temp_sensor_device = esp_rmaker_temp_sensor_device_create("Server Temp", NULL, app_get_current_temperature());
|
||||
esp_rmaker_node_add_device(node, temp_sensor_device);
|
||||
|
||||
/* CREATE AMBIENT LIGHT SENSOR DEVICE*/
|
||||
|
Reference in New Issue
Block a user