changed topic structure

This commit is contained in:
Bogdan Pilyugin 2022-09-12 16:49:57 +02:00
parent 5f6c4d62b3
commit f2b64b5c09
2 changed files with 3 additions and 3 deletions

View File

@ -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))

View File

@ -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&param2=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)
* }