Skip to content

Commit

Permalink
correct data path
Browse files Browse the repository at this point in the history
  • Loading branch information
softwarecrash committed Sep 18, 2023
1 parent e6f8fff commit 65021fe
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -537,7 +537,7 @@ bool connectMQTT()

mqttclient.publish(topicBuilder(buff, "Alive"), "true", true); // LWT online message must be retained!
mqttclient.publish(topicBuilder(buff, "IP"), (const char *)(WiFi.localIP().toString()).c_str(), true);
mqttclient.subscribe(topicBuilder(buff, "Device_Control/Set_Command"));
mqttclient.subscribe(topicBuilder(buff, "DeviceControl/Set_Command"));

if (strlen(settings.data.mqttTriggerPath) >= 1)
{
Expand Down Expand Up @@ -591,7 +591,7 @@ bool sendtoMQTT()
}
if (mppClient.get.raw.commandAnswer.length() > 0)
{
mqttclient.publish((String(settings.data.mqttTopic) + String("/Device_Control/Set_Command_answer")).c_str(), (mppClient.get.raw.commandAnswer).c_str());
mqttclient.publish((String(settings.data.mqttTopic) + String("/DeviceControl/Set_Command_answer")).c_str(), (mppClient.get.raw.commandAnswer).c_str());
}
// RAW
#ifdef DEBUG
Expand Down Expand Up @@ -648,7 +648,7 @@ void mqttcallback(char *top, unsigned char *payload, unsigned int length)
return;

// send raw control command
if (strcmp(top, topicBuilder(buff, "Device_Control/Set_Command")) == 0 && messageTemp.length() > 0)
if (strcmp(top, topicBuilder(buff, "DeviceControl/Set_Command")) == 0 && messageTemp.length() > 0)
{
DEBUG_PRINT(F("Send Command message recived: "));
DEBUG_PRINTLN(messageTemp);
Expand Down

0 comments on commit 65021fe

Please sign in to comment.