Skip to content

Commit

Permalink
Fix debug packet topic
Browse files Browse the repository at this point in the history
  • Loading branch information
gysmo38 committed Nov 27, 2022
1 parent 137a502 commit 0c10769
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/mitsubishi2mqtt/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

//#define MY_LANGUAGE fr-FR // define your language

const PROGMEM char* m2mqtt_version = "2022.11";
const PROGMEM char* m2mqtt_version = "2022.11.1";

//Define global variables for files
#ifdef ESP32
Expand Down
7 changes: 2 additions & 5 deletions src/mitsubishi2mqtt/mitsubishi2mqtt.ino
Original file line number Diff line number Diff line change
Expand Up @@ -1329,10 +1329,9 @@ void hpPacketDebug(byte* packet, unsigned int length, const char* packetDirectio
root[packetDirection] = message;
String mqttOutput;
serializeJson(root, mqttOutput);
// TODO REMOVE to get packet cpature on debug
/*if (!mqtt_client.publish(ha_debug_topic.c_str(), mqttOutput.c_str())) {
if (!mqtt_client.publish(ha_debug_topic.c_str(), mqttOutput.c_str())) {
mqtt_client.publish(ha_debug_topic.c_str(), (char*)("Failed to publish to heatpump/debug topic"));
}*/
}
}
}

Expand Down Expand Up @@ -1363,7 +1362,6 @@ void mqttCallback(char* topic, byte* payload, unsigned int length) {
// HA topics
// Receive power topic
if (strcmp(topic, ha_power_set_topic.c_str()) == 0) {
mqtt_client.publish(ha_debug_topic.c_str(), (char*)("Get Power message"));
String modeUpper = message;
modeUpper.toUpperCase();
if (modeUpper == "OFF") {
Expand All @@ -1374,7 +1372,6 @@ void mqttCallback(char* topic, byte* payload, unsigned int length) {

}
else if (strcmp(topic, ha_mode_set_topic.c_str()) == 0) {
mqtt_client.publish(ha_debug_topic.c_str(), (char*)("Get Mode message"));
String modeUpper = message;
modeUpper.toUpperCase();
if (modeUpper == "OFF") {
Expand Down

0 comments on commit 0c10769

Please sign in to comment.