mirror of
https://github.com/lumapu/ahoy.git
synced 2025-05-10 23:46:37 +02:00
Meine anpassungen wegen
MQTT Intervall MQTT Test MQTT Subscribe muss nur nach dem MQTT Connect nicht bei jedem Connect Check
This commit is contained in:
parent
6276957b22
commit
4dc64eb2d7
2 changed files with 28 additions and 6 deletions
|
@ -121,12 +121,13 @@ class mqtt {
|
|||
else
|
||||
mClient->connect(mDevName);
|
||||
}
|
||||
// ein Subscribe ist nur nach einem connect notwendig
|
||||
char topic[MQTT_TOPIC_LEN + 13 ]; // "/devcontrol/#" --> + 6 byte
|
||||
// ToDo: "/devcontrol/#" is hardcoded
|
||||
snprintf(topic, MQTT_TOPIC_LEN + 13, "%s/devcontrol/#", mTopic);
|
||||
DPRINTLN(DBG_INFO, F("subscribe to ") + String(topic));
|
||||
mClient->subscribe(topic); // subscribe to mTopic + "/devcontrol/#"
|
||||
}
|
||||
char topic[MQTT_TOPIC_LEN + 13 ]; // "/devcontrol/#" --> + 6 byte
|
||||
// ToDo: "/devcontrol/#" is hardcoded
|
||||
snprintf(topic, MQTT_TOPIC_LEN + 13, "%s/devcontrol/#", mTopic);
|
||||
DPRINTLN(DBG_INFO, F("subscribe to ") + String(topic));
|
||||
mClient->subscribe(topic); // subscribe to mTopic + "/devcontrol/#"
|
||||
}
|
||||
|
||||
WiFiClient mEspClient;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue