active power limit added via mqtt and setup page

This commit is contained in:
Andreas Schiffler 2022-08-01 21:26:25 +02:00
parent a2c44e1ce8
commit 7ed5a0a9e1
5 changed files with 116 additions and 35 deletions

View file

@ -99,7 +99,10 @@ class mqtt {
else
mClient->connect(DEF_DEVICE_NAME);
}
mClient->subscribe("home/huette/powerset");
char topic[MQTT_TOPIC_LEN + 13 ]; // "/devcontrol/#" --> + 6 byte
// ToDo: "/devcontrol/#" is hardcoded
snprintf(topic, MQTT_TOPIC_LEN + 13, "%s/devcontrol/#", mTopic);
mClient->subscribe(topic); // subscribe to mTopic + "/devcontrol/#"
}
WiFiClient mEspClient;