     Serial.println(WIFI_SSID);
 
     delay(10);
+    wifi_set_phy_mode(PHY_MODE_11N);
+    WiFi.setOutputPower(20);
     WiFi.mode(WIFI_STA);
     WiFi.begin(WIFI_SSID, WIFI_PASSWORD);
     WiFi.hostname("esp-irbedroom");

#include <SI7021.h>
#include <Average.h>

#define IR_TX_PIN 4
#define AC_CONF_TYPE 1    // 0: tower, 1: wall
#define AC_CONF_HEATING 0   // 0: cooling, 1: heating

  sendmqttMsg(reporting_topic, json, false);
}

void parseMqttMsg(String receivedpayload, String receivedtopic)
{
  char json[] = "{\"ac_mode\":0,\"ac_temp\":27,\"ac_flow\":2}";

