   switch (irType) {
 #if SEND_KELVINATOR
     case KELVINATOR:
-      irsend.sendKelvinator(reinterpret_cast<uint8_t *>(state));
+      irsend->sendKelvinator(reinterpret_cast<uint8_t *>(state));
       break;
 #endif
 #if SEND_TOSHIBA_AC
     case TOSHIBA_AC:
-      irsend.sendToshibaAC(reinterpret_cast<uint8_t *>(state));
+      irsend->sendToshibaAC(reinterpret_cast<uint8_t *>(state));
       break;
 #endif
 #if SEND_DAIKIN
     case DAIKIN:
-      irsend.sendDaikin(reinterpret_cast<uint8_t *>(state));
+      irsend->sendDaikin(reinterpret_cast<uint8_t *>(state));
       break;
 #endif
 #if SEND_DAIKIN2
     case DAIKIN2:
-      irsend.sendDaikin2(reinterpret_cast<uint8_t *>(state));
+      irsend->sendDaikin2(reinterpret_cast<uint8_t *>(state));
       break;
 #endif
 #if SEND_MITSUBISHI_AC
     case MITSUBISHI_AC:
-      irsend.sendMitsubishiAC(reinterpret_cast<uint8_t *>(state));
+      irsend->sendMitsubishiAC(reinterpret_cast<uint8_t *>(state));
       break;
 #endif
 #if SEND_TROTEC
     case TROTEC:
-      irsend.sendTrotec(reinterpret_cast<uint8_t *>(state));
+      irsend->sendTrotec(reinterpret_cast<uint8_t *>(state));
       break;
 #endif
 #if SEND_ARGO
     case ARGO:
-      irsend.sendArgo(reinterpret_cast<uint8_t *>(state));
+      irsend->sendArgo(reinterpret_cast<uint8_t *>(state));
       break;
 #endif
 #if SEND_GREE
     case GREE:
-      irsend.sendGree(reinterpret_cast<uint8_t *>(state));
+      irsend->sendGree(reinterpret_cast<uint8_t *>(state));
       break;
 #endif
 #if SEND_FUJITSU_AC
     case FUJITSU_AC:
-      irsend.sendFujitsuAC(reinterpret_cast<uint8_t *>(state), stateSize);
+      irsend->sendFujitsuAC(reinterpret_cast<uint8_t *>(state), stateSize);
       break;
 #endif
 #if SEND_HAIER_AC
     case HAIER_AC:
-      irsend.sendHaierAC(reinterpret_cast<uint8_t *>(state));
+      irsend->sendHaierAC(reinterpret_cast<uint8_t *>(state));
       break;
 #endif
 #if SEND_HAIER_AC_YRW02
     case HAIER_AC_YRW02:
-      irsend.sendHaierACYRW02(reinterpret_cast<uint8_t *>(state));
+      irsend->sendHaierACYRW02(reinterpret_cast<uint8_t *>(state));
       break;
 #endif
 #if SEND_HITACHI_AC
     case HITACHI_AC:
-      irsend.sendHitachiAC(reinterpret_cast<uint8_t *>(state));
+      irsend->sendHitachiAC(reinterpret_cast<uint8_t *>(state));
       break;
 #endif
 #if SEND_HITACHI_AC1
     case HITACHI_AC1:
-      irsend.sendHitachiAC1(reinterpret_cast<uint8_t *>(state));
+      irsend->sendHitachiAC1(reinterpret_cast<uint8_t *>(state));
       break;
 #endif
 #if SEND_HITACHI_AC2
     case HITACHI_AC2:
-      irsend.sendHitachiAC2(reinterpret_cast<uint8_t *>(state));
+      irsend->sendHitachiAC2(reinterpret_cast<uint8_t *>(state));
       break;
 #endif
 #if SEND_WHIRLPOOL_AC
     case WHIRLPOOL_AC:
-      irsend.sendWhirlpoolAC(reinterpret_cast<uint8_t *>(state));
+      irsend->sendWhirlpoolAC(reinterpret_cast<uint8_t *>(state));
       break;
 #endif
 #if SEND_SAMSUNG_AC
     case SAMSUNG_AC:
-      irsend.sendSamsungAC(reinterpret_cast<uint8_t *>(state), stateSize);
+      irsend->sendSamsungAC(reinterpret_cast<uint8_t *>(state), stateSize);
       break;
 #endif
 #if SEND_ELECTRA_AC
     case ELECTRA_AC:
-      irsend.sendElectraAC(reinterpret_cast<uint8_t *>(state));
+      irsend->sendElectraAC(reinterpret_cast<uint8_t *>(state));
       break;
 #endif
 #if SEND_PANASONIC_AC
     case PANASONIC_AC:
-      irsend.sendPanasonicAC(reinterpret_cast<uint8_t *>(state));
+      irsend->sendPanasonicAC(reinterpret_cast<uint8_t *>(state));
       break;
 #endif
 #if SEND_MWM
     case MWM:
-      irsend.sendMWM(reinterpret_cast<uint8_t *>(state), stateSize);
+      irsend->sendMWM(reinterpret_cast<uint8_t *>(state), stateSize);
       break;
 #endif
 #if SEND_TCL112AC
     case TCL112AC:
-      irsend.sendTcl112Ac(reinterpret_cast<uint8_t *>(state));
+      irsend->sendTcl112Ac(reinterpret_cast<uint8_t *>(state));
       break;
 #endif
     default:

      repeat = atoi(server.arg(i).c_str());
  }
  debug("New code received via HTTP");
  lastSendSucceeded = sendIRCode(ir_type, data, data_str.c_str(), nbits,
                                 repeat);
  handleRoot();
}


 *
 * or
 *
 * Send a MQTT message to the topic 'ir_server/send' (or 'ir_server/send_0' etc)
 * using the following format (Order is important):
 *   protocol_num,hexcode
 *     e.g. 7,E0E09966
 *          which is: Samsung(7), Power On code, default bit size,
 *                    default nr. of repeats.
 *
 *   protocol_num,hexcode,bits
 *     e.g. 4,f50,12
 *          which is: Sony(4), Power Off code, 12 bits & default nr. of repeats.
 *
 *   protocol_num,hexcode,bits,repeats
 *     e.g. 19,C1A2E21D,0,8
 *          which is: Sherwood(19), Vol Up, default bit size & repeated 8 times.
 *
 *   30,frequency,raw_string
 *     e.g. 30,38000,9000,4500,500,1500,500,750,500,750
 *          which is: Raw (30) @ 38kHz with a raw code of
 *            "9000,4500,500,1500,500,750,500,750"
 *
 *   31,code_string
 *     e.g. 31,40000,1,1,96,24,24,24,48,24,24,24,24,24,48,24,24,24,24,24,48,24,24,24,24,24,24,24,24,1058
 *          which is: GlobalCache (31) & "40000,1,1,96,..." (Sony Vol Up)
 *
 *   25,Rrepeats,hex_code_string
 *     e.g. 25,R1,0000,006E,0022,0002,0155,00AA,0015,0040,0015,0040,0015,0015,0015,0015,0015,0015,0015,0015,0015,0015,0015,0040,0015,0040,0015,0015,0015,0040,0015,0015,0015,0015,0015,0015,0015,0040,0015,0015,0015,0015,0015,0040,0015,0040,0015,0015,0015,0015,0015,0015,0015,0015,0015,0015,0015,0040,0015,0015,0015,0015,0015,0040,0015,0040,0015,0040,0015,0040,0015,0040,0015,0640,0155,0055,0015,0E40
 *          which is: Pronto (25), 1 repeat, & "0000 006E 0022 0002 ..."
 *             aka a "Sherwood Amp Tape Input" message.
 *
 *   ac_protocol_num,really_long_hexcode
 *     e.g. 18,190B8050000000E0190B8070000010F0
 *          which is: Kelvinator (18) Air Con on, Low Fan, 25 deg etc.
 *          NOTE: Ensure you zero-pad to the correct number of digits for the
 *                bit/byte size you want to send as some A/C units have units
 *                have different sized messages. e.g. Fujitsu A/C units.
 *
 *   In short:
 *     No spaces after/before commas.
 *     Values are comma separated.
 *     The first value is always in Decimal.
 *     For simple protocols, the next value (hexcode) is always hexadecimal.
 *     The optional bit size is in decimal.
 *     CAUTION: Some AC protocols DO NOT use the really_long_hexcode method.
 *              e.g. < 64bit AC protocols.
 *
 *   Unix command line usage example:
 *     # Install a MQTT client
