diff --git a/HTML/services.html b/HTML/services.html index e0d1d5c..fbc243b 100644 --- a/HTML/services.html +++ b/HTML/services.html @@ -1,77 +1,79 @@ - - - - - - - - - - ~name~ - - - - -
-
-
- -
-
-
-
SNTP
- - - - -
Включить SNTP клиент
Адрес SNTP сервера:
- - -
- Установить текущее время вручную:
- -


-
- -
-
-
- -
-
-
-
MQTT
- - -
- -
-
-
- -
-
-
- - + + + + + + + + + + ~name~ + + + + +
+
+
+ +
+
+
+
SNTP
+ + + + +
Включить SNTP клиент
Адрес SNTP сервера:
+ + +
+ Установить текущее время вручную:
+ +


+
+ +
+
+
+ +
+
+
+
MQTT
+ + +
+ +
+
+
+ +
+
+
+ + \ No newline at end of file diff --git a/components/webguiapp b/components/webguiapp index f957648..a813d33 160000 --- a/components/webguiapp +++ b/components/webguiapp @@ -1 +1 @@ -Subproject commit f9576486d104b0e84bedb6f0a7f7c2913548cb73 +Subproject commit a813d33168458e4d0492f72b1c1e679dcbe1e084 diff --git a/main/MQTTCustom.c b/main/MQTTCustom.c index 5edda02..f549514 100644 --- a/main/MQTTCustom.c +++ b/main/MQTTCustom.c @@ -32,11 +32,7 @@ esp_err_t UserMQTTSendExample(int idx) { memcpy(buf, resp, strlen(resp)); DATA_SEND_STRUCT DSS; - ComposeTopic(DSS.topic, - GetSysConf()->mqttStation[idx].RootTopic, - "UPLINK", - GetSysConf()->mqttStation[idx].ClientID, - "USER"); + ComposeTopic(DSS.topic, idx, "USER", "UPLINK"); DSS.raw_data_ptr = buf; DSS.data_length = strlen(resp); if (xQueueSend(GetMQTTHandlesPool(idx)->mqtt_queue, &DSS, pdMS_TO_TICKS(1000)) == pdPASS) @@ -61,22 +57,14 @@ void UserMQTTEventHndlr(void *handler_args, esp_event_base_t base, int32_t event switch ((esp_mqtt_event_id_t) event_id) { case MQTT_EVENT_CONNECTED: - ComposeTopic(topic, - GetSysConf()->mqttStation[ctx->mqtt_index].RootTopic, - "DWLINK", - GetSysConf()->mqttStation[ctx->mqtt_index].ClientID, - "USER"); + ComposeTopic(topic, ctx->mqtt_index, "USER", "DWLINK"); //Subscribe to the service called "USER" msg_id = esp_mqtt_client_subscribe(client, (const char*) topic, 0); ESP_LOGI(TAG, "sent subscribe successful, msg_id=%d", msg_id); break; case MQTT_EVENT_DATA: - ComposeTopic(topic, - GetSysConf()->mqttStation[ctx->mqtt_index].RootTopic, - "DWLINK", - GetSysConf()->mqttStation[ctx->mqtt_index].ClientID, - "USER"); + ComposeTopic(topic, ctx->mqtt_index, "USER", "DWLINK"); if (!memcmp(topic, event->topic, event->topic_len)) { //Here data for service called "USER" diff --git a/sdkconfig b/sdkconfig index 126f4b8..e3120fb 100644 --- a/sdkconfig +++ b/sdkconfig @@ -1232,6 +1232,8 @@ CONFIG_WEBGUIAPP_PROJECT_VER="0.0.0.0003" CONFIG_WEBGUIAPP_HOSTNAME="DEVICE_HOSTNAME" CONFIG_WEBGUIAPP_USERNAME="user" CONFIG_WEBGUIAPP_USERPASS="password" +CONFIG_MAIN_FUNCTIONAL_BUTTON_GPIO=15 +# CONFIG_DEBUG_MODE_ENABLE is not set # # SPI settings @@ -1310,7 +1312,8 @@ CONFIG_WEBGUIAPP_MQTT_SERVER_URL="myfirstmqttserver.com" CONFIG_WEBGUIAPP_MQTT_SERVER_PORT=1883 CONFIG_WEBGUIAPP_MQTT_CLIENT_ID_1="DEVID1" CONFIG_WEBGUIAPP_MQTT_CLIENT_ID_2="DEVID2" -CONFIG_WEBGUIAPP_MQTT_ROOT_TOPIC="ROOTTOPIC" +CONFIG_WEBGUIAPP_MQTT_SYSTEM_NAME="SYSTEMNAME" +CONFIG_WEBGUIAPP_MQTT_GROUP_NAME="GROUPNAME" CONFIG_WEBGUIAPP_MQTT_USERNAME="username" CONFIG_WEBGUIAPP_MQTT_PASSWORD="password" # end of MQTT settings