show mqtt-count and sensor-reads in info

This commit is contained in:
MichaelDvP
2021-05-10 15:28:53 +02:00
parent 28068bdb98
commit 5cccfacbc4
4 changed files with 15 additions and 15 deletions

View File

@@ -347,15 +347,9 @@ void Mqtt::on_message(const char * fulltopic, const char * payload, size_t len)
return; // invalid topic name
}
cmd_only++; // skip the /
int8_t id = -1;
// check for hcx/ prefix, commented out, this is now in command::call
// if (cmd_only[0] == 'h' && cmd_only[1] == 'c' && cmd_only[3] == '/') {
// id = cmd_only[2] - '0';
// cmd_only += 4;
// }
// LOG_INFO(F("devicetype= %d, topic = %s, cmd = %s, message = %s, id = %d"), mf.device_type_, topic, cmd_only, message, id);
if (!Command::call(mf.device_type_, cmd_only, message, id)) {
LOG_ERROR(F("No matching cmd (%s) in topic %s, id %d, or invalid data"), cmd_only, topic, id);
// LOG_INFO(F("devicetype= %d, topic = %s, cmd = %s, message = %s), mf.device_type_, topic, cmd_only, message);
if (!Command::call(mf.device_type_, cmd_only, message)) {
LOG_ERROR(F("No matching cmd (%s) in topic %s, or invalid data"), cmd_only, topic);
Mqtt::publish(F_(response), "unknown");
}
return;