判断HA命令mav地址

This commit is contained in:
zogodo
2020-02-19 14:32:54 +08:00
parent 8793d905f4
commit 2678e69aa9
3 changed files with 3 additions and 1 deletions

View File

@@ -14,7 +14,7 @@
#define wifi_log(M, ...) do { custom_log("WIFI", M, ##__VA_ARGS__); web_log("WIFI", M, ##__VA_ARGS__) } while(0)
#define power_log(M, ...) do { custom_log("POWER", M, ##__VA_ARGS__); web_log("POWER", M, ##__VA_ARGS__) } while(0)
#define VERSION "v1.0.18"
#define VERSION "v1.0.19"
#define TYPE 1
#define TYPE_NAME "zTC1"

View File

@@ -386,6 +386,7 @@ void ProcessHaCmd(char* cmd)
{
int i, on;
sscanf(cmd, "set socket %s %d %d", mac, &i, &on);
if (strcmp(mac, str_mac)) return;
mqtt_log("set socket[%d] on[%d]", i, on);
UserRelaySet(i, on);
UserMqttSendSocketState(i);