changed topic structure
This commit is contained in:
parent
5f6c4d62b3
commit
f2b64b5c09
|
|
@ -115,7 +115,7 @@ static void mqtt_system_event_handler(void *handler_args, esp_event_base_t base,
|
|||
ESP_LOGI(TAG, "MQTT_EVENT_CONNECTED client %d", ctx->mqtt_index);
|
||||
ComposeTopic(topic,
|
||||
GetSysConf()->mqttStation[ctx->mqtt_index].RootTopic,
|
||||
"DOWNLINK",
|
||||
"DWLINK",
|
||||
GetSysConf()->mqttStation[ctx->mqtt_index].ClientID,
|
||||
"SYSTEM");
|
||||
msg_id = esp_mqtt_client_subscribe(client, (const char*) topic, 0);
|
||||
|
|
@ -144,7 +144,7 @@ static void mqtt_system_event_handler(void *handler_args, esp_event_base_t base,
|
|||
//Check if topic is SYSTEM and pass data to handler
|
||||
ComposeTopic(topic,
|
||||
GetSysConf()->mqttStation[ctx->mqtt_index].RootTopic,
|
||||
"DOWNLINK",
|
||||
"DWLINK",
|
||||
GetSysConf()->mqttStation[ctx->mqtt_index].ClientID,
|
||||
"SYSTEM");
|
||||
if (!memcmp(topic, event->topic, event->topic_len))
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@
|
|||
* "messid":12345, //uint32_t message id for request/response context
|
||||
* "api":"2.0", //string of current API version
|
||||
* "request":"GET", //string request type - "GET" or "POST" allowed
|
||||
* "url":"iotronic.cloud", //string url of resource
|
||||
* "url":"status.json", //string url of resource (generally a file name)
|
||||
* "postdata":"param1=value¶m2=value", //string of POST data payload (required if request is POST)
|
||||
* "reload":"true" //string "true" or "false" is needed reload page after POST request (required if request is POST)
|
||||
* }
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user