MQTT subscribe to devices - Refactor MQTT subscriptions and API calls #173

This commit is contained in:
proddy
2021-11-03 22:12:21 +01:00
parent 3e0f6f55fb
commit 452921d198
2 changed files with 8 additions and 7 deletions

View File

@@ -699,9 +699,9 @@ void System::commands_init() {
Command::add(EMSdevice::DeviceType::SYSTEM, F("test"), System::command_test, F("run tests"));
#endif
// MQTT subscribe "ems-esp/system/#"
// There is no need to subscribe only to 'ems-esp/system' as the commands send and pin require the fullpath for security
// MQTT subscribe "ems-esp/system/#" and "ems-esp/system"
Mqtt::subscribe(EMSdevice::DeviceType::SYSTEM, "system/#", nullptr); // use empty function callback
Mqtt::subscribe(EMSdevice::DeviceType::SYSTEM, "system", nullptr); // use empty function callback
}
// flashes the LED