get and set config via mqtt messages

This commit is contained in:
Emanuele Trabattoni
2025-07-25 14:37:38 +02:00
parent 31c6cd9606
commit 74a97a7dd6
7 changed files with 190 additions and 17 deletions

View File

@@ -69,7 +69,7 @@ void loop()
if (commands::commandMap.contains(cmd))
{ // call command from command map in this same thread (the MQTT thread)
LOG_INFO("Executing command", cmd.c_str());
auto answer = std::move(commands::commandMap.at(cmd)(devices, params));
auto answer = std::move(commands::commandMap.at(cmd)(devices, params)); // here the magic happens
if (answer.isNull())
return;
mqtt.publish(conf.m_mqttPublish["answers"], answer);