diff --git a/TC1/http_server/web/index.html b/TC1/http_server/web/index.html
index 56c8c2f..3255f2b 100644
--- a/TC1/http_server/web/index.html
+++ b/TC1/http_server/web/index.html
@@ -438,20 +438,6 @@
循环 |
操作 |
-
- | 02-15 07:11 |
- 1 |
- 0 |
- 0 |
- 删除 |
-
-
- 2020-02-15 07:11:08 |
- 1 |
- 0 |
- 6 |
- 删除 |
-
@@ -610,23 +596,23 @@
| 版本 |
- v1.0.33 |
+ |
| IP |
- 192.168.33.222 |
+ |
| 子网掩码 |
- 255.255.255.0 |
+ |
| 网关 |
- 192.168.33.1 |
+ |
| 启动时间 |
- 10:13:43 |
+ |
diff --git a/TC1/mqtt_server/user_mqtt_client.c b/TC1/mqtt_server/user_mqtt_client.c
index e9e4c9a..63e5200 100644
--- a/TC1/mqtt_server/user_mqtt_client.c
+++ b/TC1/mqtt_server/user_mqtt_client.c
@@ -471,7 +471,9 @@ void ProcessHaCmd(char *cmd) {
childLockEnabled = on;
UserMqttSendChildLockState();
mico_system_context_update(sys_config);
- }else if (strcmp(cmd, "reboot") == 0) {
+ }else if (strcmp(cmd, "reboot") == ' ') {
+ sscanf(cmd, "reboot %s", mac);
+ if (strcmp(mac, str_mac)) return;
MicoSystemReboot(); // 立即重启设备
}
}
@@ -626,13 +628,13 @@ void UserMqttHassAutoRebootButton(void) {
"\"uniq_id\":\"tc1_%s_reboot\","
"\"object_id\":\"tc1_%s_reboot\","
"\"cmd_t\":\"device/ztc1/set\","
- "\"pl_prs\":\"reboot\","
+ "\"pl_prs\":\"reboot %s\","
"\"device\":{"
"\"identifiers\":[\"tc1_%s\"],"
"\"name\":\"%s\","
"\"model\":\"TC1\","
"\"manufacturer\":\"PHICOMM\"}}",
- str_mac,str_mac,str_mac, sys_config->micoSystemConfig.name);
+ str_mac,str_mac,str_mac,str_mac, sys_config->micoSystemConfig.name);
UserMqttSendTopic(topic_buf, send_buf, 1);
}
if (send_buf) free(send_buf);