gysmo38 / mitsubishi2MQTT

Mitsubishi to MQTT with ESP8266 module
GNU Lesser General Public License v2.1
390 stars 139 forks source link

Add missing wide vane MQTT logic #97

Closed melyux closed 3 years ago

melyux commented 4 years ago

Wide vane was implemented on the web server, but was inaccessible through MQTT. The web server was also missing logic for setting the "<>" (split) option. Should resolve #96

gysmo38 commented 3 years ago

Thank you.

melyux commented 3 years ago

Hey, you merged my PR (this) and then merged @mamrai1's (#97), but @mamrai1 had done the same change as me to the wide vane web settings but placed it in the wrong order. So now there's a duplicate <> mode in the settings:

  else if (strcmp(settings.wideVane, "<>") == 0) {
    controlPage.replace("_WVANE_6_", "selected");
  }
  else if (strcmp(settings.wideVane, "SWING") == 0) {
    controlPage.replace("_WVANE_S_", "selected");
  }
  else if (strcmp(settings.wideVane, "<>") == 0) {
    controlPage.replace("_WVANE_6_", "selected");
  }

We need to get rid of the last one.

mamrai1 commented 3 years ago

and i'm not sure about this.... line ~1438 else if (strcmp(topic, ha_vane_set_topic.c_str()) == 0 { const size_t bufferSize = JSON_OBJECT_SIZE(2); StaticJsonDocument root; root["wideVane"] = message; hpSendDummy("wideVane", message, "", ""); hp.setWideVaneSetting(message); hp.update(); }

melyux commented 3 years ago

@mamrai1 I see what you're saying now. It was that dumb typo with the else if (strcmp(topic, ha_vane_set_topic.c_str()) == 0 { line. Thanks for doing a PR with the fix in #100. It is conflicting with the current though because @gysmo38 had already pulled my changes.

mamrai1 commented 3 years ago

i know i reopened a new one. Thanks:)

melyux commented 3 years ago

Looks good and working well on my unit. Now if we can get operating state working...

mamrai1 commented 3 years ago

What do you mean? If compressor works or idle?

On Fri, 4 Sep 2020, 01:00 melyux, notifications@github.com wrote:

Looks good and working well on my unit. Now if we can get operating state working...

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/gysmo38/mitsubishi2MQTT/pull/97#issuecomment-686785597, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANVCNGEXYRQRC25YBMLMCF3SEAGWJANCNFSM4QCP536A .

melyux commented 3 years ago

@mamrai1 Yep exactly.