user57082: I'm currently working with an ESP8266 NodeMCU V3 and an IR transmitter breakout board. The module receives NEC IR commands trough a HTTP request and then sends them trough the IR transmitter. Getting the command from the HTTP request and sending static (pre-programmed) IR NEC commands works perfectly. The problem however is that the NEC IR command I receive trough HTTP is in a String variable/data type (after processing). irsend.sendNEC(); however requires uint64_t as the input type, according to the error message I get in the Arduino IDE.
I don't really know my way around C data types to be honest. Searches like "Arduino String to uint64_t" have came up empty or reversed. One post came close to what I'm trying to accomplish, but irsend.sendNEC(strtoul(irrequest)); didn't do the trick either.
Arduino code;

Check for // Send IR NEC command almost at the bottom
The second and third irsend.sendNEC(); are an example and not in the final code
HTTP request is formatted like http://192.168.1.xxx/rest/ir/nec/0xFB0042BD

Sketch.ino

// Configuration
const char* CONFIG_SSID      = "mywifi";
const char* CONFIG_PSK       = "wifipassword";
const int   CONFIG_SERIAL    = 115200;
const int   CONFIG_PORT      = 80;
const int   CONFIG_TIMEOUT   = 5000;
const int   CONFIG_IRTPIN    = 2;

/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */

// Include libraries
#include <Arduino.h>
#include <ESP8266WiFi.h>
#include <IRremoteESP8266.h>
#include <IRsend.h>
#include <IRrecv.h>
#include <IRutils.h>

// Create webserver object
WiFiServer server(CONFIG_PORT);

// Create IR Send object
IRsend irsend(CONFIG_IRTPIN);

// Setup instructions
void setup() {

  // Start serial and LED
  Serial.begin(CONFIG_SERIAL);
  Serial.println();
  Serial.println("Starting setup");
  pinMode(LED_BUILTIN, OUTPUT);
  digitalWrite(LED_BUILTIN, 1);

  // Start WiFi connection
  Serial.print("Connecting to: ");
  Serial.println(CONFIG_SSID);
  WiFi.mode(WIFI_STA);
  WiFi.begin(CONFIG_SSID, CONFIG_PSK);

  // Wait for WiFi connection
  while (WiFi.status() != WL_CONNECTED) {
    delay(500);
    Serial.print(".");
  }
  Serial.println();
  Serial.println("WiFi connected!");

  // Print WiFi connection information
  Serial.print("  SSID: ");
  Serial.println(WiFi.SSID());
  Serial.print("  RSSI: ");
  Serial.print(WiFi.RSSI());
  Serial.println(" dBm");
  Serial.print("  Local IP: ");
  Serial.println(WiFi.localIP());

  // Start webserver
  Serial.println("Starting webserver...");
  server.begin();
  delay(1000);
  Serial.println("Webserver started!");

  // Print webserver information
  Serial.print("  Host: ");
  Serial.println(WiFi.localIP());
  Serial.print("  Port: ");
  Serial.println(CONFIG_PORT);

  // Start IR Send
  Serial.println("Starting IR Send...");
  irsend.begin();
  delay(1000);
  Serial.println("IR Send started!");

  // Setup complete
  Serial.println("Setup completed");
  digitalWrite(LED_BUILTIN, 0);
  Serial.println();

}

// Loop instructions
void loop() {

  // Wait for new client
  WiFiClient client = server.available();
  if (client) {

    // New client
    digitalWrite(LED_BUILTIN, 1);
    Serial.println("New client connected");

    // Wait nicely for the client to complete its full request
    unsigned long timeout = millis() + CONFIG_TIMEOUT;
    Serial.println("Waiting for client request to finish...");
    while (!client.available() && millis() < timeout) {
      delay(1);
    }

    // End client connection when timeout is reached to not hold up availability
    if (millis() < timeout) {
      Serial.println("Client request finished!");
    } else {
      Serial.println("Client request timeout!");
      client.flush();
      client.stop();
      digitalWrite(LED_BUILTIN, 0);
      Serial.println();
      return;
    }

    // Catch client request
    String req = client.readStringUntil('\r');
    Serial.print("Request header: ");
    Serial.println(req);
    if (req.indexOf(F("/rest/ir/nec/")) != -1) {

      // Get IR Send NEC request
      String irrequest = req;
      irrequest.remove(0, ((irrequest.lastIndexOf("/rest/ir/nec/")) + 13));
      irrequest.remove((irrequest.indexOf(" ")));
      Serial.print("IR Send NEC code: ");
      Serial.println(irrequest);

      // Send IR NEC command
      Serial.println("Sending IR NEC command");
      irsend.sendNEC(irrequest);    // <<< here lays the problem
      irsend.sendNEC(0xFB0042BD);   // This works
      irsend.sendNEC("0xFB0042BD"); // This doesn't

      // Send HTTP response
      Serial.println("Sending HTTP/1.1 200 OK");
      client.println("HTTP/1.1 200 OK");
      client.println("Content-Type: text/plain");
      client.println("Connection: close");
      client.println();
      client.println("OK");

    } else {

      // Invalid request
      Serial.println("Invalid client request");
      Serial.println("Sending HTTP/1.1 404 response");
      client.println("HTTP/1.1 404 Not Found\r\nContent-Type: text/html\r\n\r\n<!DOCTYPE HTML>\r\n<html><body>Not found</body></html>");

    }

    // Flush output buffer
    Serial.println("Flushing output buffer");
    client.flush();
    digitalWrite(LED_BUILTIN, 0);
    Serial.println();
    return;

  }

}


user57082: irsend.sendNEC(strtoul(irrequest.c_str(), NULL, 10)); did the trick with the help of Juraj. Much thanks! I only had the set 10 to 16 to get it to work.
Working code:

// Configuration
const char* CONFIG_SSID      = "mywifi";
const char* CONFIG_PSK       = "wifipassword";
const int   CONFIG_SERIAL    = 115200;
const int   CONFIG_PORT      = 80;
const int   CONFIG_TIMEOUT   = 5000;
const int   CONFIG_IRTPIN    = 2;

/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */

// Include libraries
#include <Arduino.h>
#include <ESP8266WiFi.h>
#include <IRremoteESP8266.h>
#include <IRsend.h>
#include <IRrecv.h>
#include <IRutils.h>

// Create webserver object
WiFiServer server(CONFIG_PORT);

// Create IR Send object
IRsend irsend(CONFIG_IRTPIN);

// Setup instructions
void setup() {

  // Start serial and LED
  Serial.begin(CONFIG_SERIAL);
  Serial.println();
  Serial.println("Starting setup");
  pinMode(LED_BUILTIN, OUTPUT);
  digitalWrite(LED_BUILTIN, 1);

  // Start WiFi connection
  Serial.print("Connecting to: ");
  Serial.println(CONFIG_SSID);
  WiFi.mode(WIFI_STA);
  WiFi.begin(CONFIG_SSID, CONFIG_PSK);

  // Wait for WiFi connection
  while (WiFi.status() != WL_CONNECTED) {
    delay(500);
    Serial.print(".");
  }
  Serial.println();
  Serial.println("WiFi connected!");

  // Print WiFi connection information
  Serial.print("  SSID: ");
  Serial.println(WiFi.SSID());
  Serial.print("  RSSI: ");
  Serial.print(WiFi.RSSI());
  Serial.println(" dBm");
  Serial.print("  Local IP: ");
  Serial.println(WiFi.localIP());

  // Start webserver
  Serial.println("Starting webserver...");
  server.begin();
  delay(1000);
  Serial.println("Webserver started!");

  // Print webserver information
  Serial.print("  Host: ");
  Serial.println(WiFi.localIP());
  Serial.print("  Port: ");
  Serial.println(CONFIG_PORT);

  // Start IR Send
  Serial.println("Starting IR Send...");
  irsend.begin();
  delay(1000);
  Serial.println("IR Send started!");

  // Setup complete
  Serial.println("Setup completed");
  digitalWrite(LED_BUILTIN, 0);
  Serial.println();

}

// Loop instructions
void loop() {

  // Wait for new client
  WiFiClient client = server.available();
  if (client) {

    // New client
    digitalWrite(LED_BUILTIN, 1);
    Serial.println("New client connected");

    // Wait nicely for the client to complete its full request
    unsigned long timeout = millis() + CONFIG_TIMEOUT;
    Serial.println("Waiting for client request to finish...");
    while (!client.available() && millis() < timeout) {
      delay(1);
    }

    // End client connection when timeout is reached to not hold up availability
    if (millis() < timeout) {
      Serial.println("Client request finished!");
    } else {
      Serial.println("Client request timeout!");
      client.flush();
      client.stop();
      digitalWrite(LED_BUILTIN, 0);
      Serial.println();
      return;
    }

    // Catch client request
    String req = client.readStringUntil('\r');
    Serial.print("Request header: ");
    Serial.println(req);
    if (req.indexOf(F("/rest/ir/nec/")) != -1) {

      // Get IR Send NEC request
      String irrequest = req;
      irrequest.remove(0, ((irrequest.lastIndexOf("/rest/ir/nec/")) + 13));
      irrequest.remove((irrequest.indexOf(" ")));
      Serial.print("IR Send NEC code: ");
      Serial.println(irrequest);

      // Send IR NEC command
      Serial.println("Sending IR NEC command");
      irsend.sendNEC(strtoul(irrequest.c_str(), NULL, 16));

      // Send HTTP response
      Serial.println("Sending HTTP/1.1 200 OK");
      client.println("HTTP/1.1 200 OK");
      client.println("Content-Type: text/plain");
      client.println("Connection: close");
      client.println();
      client.println("OK");

    } else {

      // Invalid request
      Serial.println("Invalid client request");
      Serial.println("Sending HTTP/1.1 404 response");
      client.println("HTTP/1.1 404 Not Found\r\nContent-Type: text/html\r\n\r\n<!DOCTYPE HTML>\r\n<html><body>Not found</body></html>");

    }

    // Flush output buffer
    Serial.println("Flushing output buffer");
    client.flush();
    digitalWrite(LED_BUILTIN, 0);
    Serial.println();
    return;

  }

}


57082: <p>I'm currently working with an ESP8266 NodeMCU V3 and an IR transmitter breakout board. The module receives NEC IR commands trough a HTTP request and then sends them trough the IR transmitter. Getting the command from the HTTP request and sending static (pre-programmed) IR NEC commands works perfectly. The problem however is that the NEC IR command I receive trough HTTP is in a <code>String</code> variable/data type (after processing). <code>irsend.sendNEC();</code> however requires <code>uint64_t</code> as the input type, according to the error message I get in the Arduino IDE.</p>

<p>I don't really know my way around C data types to be honest. Searches like "Arduino String to uint64_t" have came up empty or reversed. One <a href="https://forum.arduino.cc/index.php?topic=123486.0" rel="nofollow noreferrer">post</a> came close to what I'm trying to accomplish, but <code>irsend.sendNEC(strtoul(irrequest));</code> didn't do the trick either.</p>

<p>Arduino code;</p>

<ul>
<li>Check for <code>// Send IR NEC command</code> almost at the bottom</li>
<li>The second and third <code>irsend.sendNEC();</code> are an example and not in the final code</li>
<li>HTTP request is formatted like <a href="http://192.168.1.xxx/rest/ir/nec/0xFB0042BD" rel="nofollow noreferrer">http://192.168.1.xxx/rest/ir/nec/0xFB0042BD</a></li>
</ul>

<p><code>Sketch.ino</code>
</p>

<pre class="lang-cpp prettyprint-override"><code>// Configuration
const char* CONFIG_SSID      = "mywifi";
const char* CONFIG_PSK       = "wifipassword";
const int   CONFIG_SERIAL    = 115200;
const int   CONFIG_PORT      = 80;
const int   CONFIG_TIMEOUT   = 5000;
const int   CONFIG_IRTPIN    = 2;

/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */

// Include libraries
#include &lt;Arduino.h&gt;
#include &lt;ESP8266WiFi.h&gt;
#include &lt;IRremoteESP8266.h&gt;
#include &lt;IRsend.h&gt;
#include &lt;IRrecv.h&gt;
#include &lt;IRutils.h&gt;

// Create webserver object
WiFiServer server(CONFIG_PORT);

// Create IR Send object
IRsend irsend(CONFIG_IRTPIN);

// Setup instructions
void setup() {

  // Start serial and LED
  Serial.begin(CONFIG_SERIAL);
  Serial.println();
  Serial.println("Starting setup");
  pinMode(LED_BUILTIN, OUTPUT);
  digitalWrite(LED_BUILTIN, 1);

  // Start WiFi connection
  Serial.print("Connecting to: ");
  Serial.println(CONFIG_SSID);
  WiFi.mode(WIFI_STA);
  WiFi.begin(CONFIG_SSID, CONFIG_PSK);

  // Wait for WiFi connection
  while (WiFi.status() != WL_CONNECTED) {
    delay(500);
    Serial.print(".");
  }
  Serial.println();
  Serial.println("WiFi connected!");

  // Print WiFi connection information
  Serial.print("  SSID: ");
  Serial.println(WiFi.SSID());
  Serial.print("  RSSI: ");
  Serial.print(WiFi.RSSI());
  Serial.println(" dBm");
  Serial.print("  Local IP: ");
  Serial.println(WiFi.localIP());

  // Start webserver
  Serial.println("Starting webserver...");
  server.begin();
  delay(1000);
  Serial.println("Webserver started!");

  // Print webserver information
  Serial.print("  Host: ");
  Serial.println(WiFi.localIP());
  Serial.print("  Port: ");
  Serial.println(CONFIG_PORT);

  // Start IR Send
  Serial.println("Starting IR Send...");
  irsend.begin();
  delay(1000);
  Serial.println("IR Send started!");

  // Setup complete
  Serial.println("Setup completed");
  digitalWrite(LED_BUILTIN, 0);
  Serial.println();

}

// Loop instructions
void loop() {

  // Wait for new client
  WiFiClient client = server.available();
  if (client) {

    // New client
    digitalWrite(LED_BUILTIN, 1);
    Serial.println("New client connected");

    // Wait nicely for the client to complete its full request
    unsigned long timeout = millis() + CONFIG_TIMEOUT;
    Serial.println("Waiting for client request to finish...");
    while (!client.available() &amp;&amp; millis() &lt; timeout) {
      delay(1);
    }

    // End client connection when timeout is reached to not hold up availability
    if (millis() &lt; timeout) {
      Serial.println("Client request finished!");
    } else {
      Serial.println("Client request timeout!");
      client.flush();
      client.stop();
      digitalWrite(LED_BUILTIN, 0);
      Serial.println();
      return;
    }

    // Catch client request
    String req = client.readStringUntil('\r');
    Serial.print("Request header: ");
    Serial.println(req);
    if (req.indexOf(F("/rest/ir/nec/")) != -1) {

      // Get IR Send NEC request
      String irrequest = req;
      irrequest.remove(0, ((irrequest.lastIndexOf("/rest/ir/nec/")) + 13));
      irrequest.remove((irrequest.indexOf(" ")));
      Serial.print("IR Send NEC code: ");
      Serial.println(irrequest);

      // Send IR NEC command
      Serial.println("Sending IR NEC command");
      irsend.sendNEC(irrequest);    // &lt;&lt;&lt; here lays the problem
      irsend.sendNEC(0xFB0042BD);   // This works
      irsend.sendNEC("0xFB0042BD"); // This doesn't

      // Send HTTP response
      Serial.println("Sending HTTP/1.1 200 OK");
      client.println("HTTP/1.1 200 OK");
      client.println("Content-Type: text/plain");
      client.println("Connection: close");
      client.println();
      client.println("OK");

    } else {

      // Invalid request
      Serial.println("Invalid client request");
      Serial.println("Sending HTTP/1.1 404 response");
      client.println("HTTP/1.1 404 Not Found\r\nContent-Type: text/html\r\n\r\n&lt;!DOCTYPE HTML&gt;\r\n&lt;html&gt;&lt;body&gt;Not found&lt;/body&gt;&lt;/html&gt;");

    }

    // Flush output buffer
    Serial.println("Flushing output buffer");
    client.flush();
    digitalWrite(LED_BUILTIN, 0);
    Serial.println();
    return;

  }

}
</code></pre>
 57082: <p><code>irsend.sendNEC(strtoul(irrequest.c_str(), NULL, 10));</code> did the trick with the help of <a href="https://arduino.stackexchange.com/users/37622/juraj">Juraj</a>. Much thanks! I only had the set <code>10</code> to <code>16</code> to get it to work.</p>

<p>Working code:
</p>

<pre class="lang-cpp prettyprint-override"><code>// Configuration
const char* CONFIG_SSID      = "mywifi";
const char* CONFIG_PSK       = "wifipassword";
const int   CONFIG_SERIAL    = 115200;
const int   CONFIG_PORT      = 80;
const int   CONFIG_TIMEOUT   = 5000;
const int   CONFIG_IRTPIN    = 2;

/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */

// Include libraries
#include &lt;Arduino.h&gt;
#include &lt;ESP8266WiFi.h&gt;
#include &lt;IRremoteESP8266.h&gt;
#include &lt;IRsend.h&gt;
#include &lt;IRrecv.h&gt;
#include &lt;IRutils.h&gt;

// Create webserver object
WiFiServer server(CONFIG_PORT);

// Create IR Send object
IRsend irsend(CONFIG_IRTPIN);

// Setup instructions
void setup() {

  // Start serial and LED
  Serial.begin(CONFIG_SERIAL);
  Serial.println();
  Serial.println("Starting setup");
  pinMode(LED_BUILTIN, OUTPUT);
  digitalWrite(LED_BUILTIN, 1);

  // Start WiFi connection
  Serial.print("Connecting to: ");
  Serial.println(CONFIG_SSID);
  WiFi.mode(WIFI_STA);
  WiFi.begin(CONFIG_SSID, CONFIG_PSK);

  // Wait for WiFi connection
  while (WiFi.status() != WL_CONNECTED) {
    delay(500);
    Serial.print(".");
  }
  Serial.println();
  Serial.println("WiFi connected!");

  // Print WiFi connection information
  Serial.print("  SSID: ");
  Serial.println(WiFi.SSID());
  Serial.print("  RSSI: ");
  Serial.print(WiFi.RSSI());
  Serial.println(" dBm");
  Serial.print("  Local IP: ");
  Serial.println(WiFi.localIP());

  // Start webserver
  Serial.println("Starting webserver...");
  server.begin();
  delay(1000);
  Serial.println("Webserver started!");

  // Print webserver information
  Serial.print("  Host: ");
  Serial.println(WiFi.localIP());
  Serial.print("  Port: ");
  Serial.println(CONFIG_PORT);

  // Start IR Send
  Serial.println("Starting IR Send...");
  irsend.begin();
  delay(1000);
  Serial.println("IR Send started!");

  // Setup complete
  Serial.println("Setup completed");
  digitalWrite(LED_BUILTIN, 0);
  Serial.println();

}

// Loop instructions
void loop() {

  // Wait for new client
  WiFiClient client = server.available();
  if (client) {

    // New client
    digitalWrite(LED_BUILTIN, 1);
    Serial.println("New client connected");

    // Wait nicely for the client to complete its full request
    unsigned long timeout = millis() + CONFIG_TIMEOUT;
    Serial.println("Waiting for client request to finish...");
    while (!client.available() &amp;&amp; millis() &lt; timeout) {
      delay(1);
    }

    // End client connection when timeout is reached to not hold up availability
    if (millis() &lt; timeout) {
      Serial.println("Client request finished!");
    } else {
      Serial.println("Client request timeout!");
      client.flush();
      client.stop();
      digitalWrite(LED_BUILTIN, 0);
      Serial.println();
      return;
    }

    // Catch client request
    String req = client.readStringUntil('\r');
    Serial.print("Request header: ");
    Serial.println(req);
    if (req.indexOf(F("/rest/ir/nec/")) != -1) {

      // Get IR Send NEC request
      String irrequest = req;
      irrequest.remove(0, ((irrequest.lastIndexOf("/rest/ir/nec/")) + 13));
      irrequest.remove((irrequest.indexOf(" ")));
      Serial.print("IR Send NEC code: ");
      Serial.println(irrequest);

      // Send IR NEC command
      Serial.println("Sending IR NEC command");
      irsend.sendNEC(strtoul(irrequest.c_str(), NULL, 16));

      // Send HTTP response
      Serial.println("Sending HTTP/1.1 200 OK");
      client.println("HTTP/1.1 200 OK");
      client.println("Content-Type: text/plain");
      client.println("Connection: close");
      client.println();
      client.println("OK");

    } else {

      // Invalid request
      Serial.println("Invalid client request");
      Serial.println("Sending HTTP/1.1 404 response");
      client.println("HTTP/1.1 404 Not Found\r\nContent-Type: text/html\r\n\r\n&lt;!DOCTYPE HTML&gt;\r\n&lt;html&gt;&lt;body&gt;Not found&lt;/body&gt;&lt;/html&gt;");

    }

    // Flush output buffer
    Serial.println("Flushing output buffer");
    client.flush();
    digitalWrite(LED_BUILTIN, 0);
    Serial.println();
    return;

  }

}
</code></pre>
