Split connand and value topics. 1st attempt

This commit is contained in:
2019-08-10 23:20:23 +03:00
parent fa1127190c
commit 94810689c2
3 changed files with 140 additions and 70 deletions

View File

@@ -317,7 +317,7 @@ lan_status lanLoop() {
//Unsubscribe from status topics..
//strncpy_P(buf, outprefix, sizeof(buf));
setTopic(buf,sizeof(buf),T_OUT);
strncat(buf, "#", sizeof(buf));
strncat(buf, "+/+/#", sizeof(buf)); // Subscribing only on separated command/parameters topics
mqttClient.unsubscribe(buf);
lanStatus = OPERATION;//3;
@@ -582,7 +582,7 @@ void ip_ready_config_loaded_connecting_to_broker() {
// strncpy_P(buf, outprefix, sizeof(buf));
setTopic(buf,sizeof(buf),T_OUT);
strncat(buf, "#", sizeof(buf));
strncat(buf, "+/+/#", sizeof(buf)); // Only on separated cmd/val topics
mqttClient.subscribe(buf);
//Subscribing for command topics