https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json #include #include const char* WIFI_SSID = "NOME_WIFI"; const char* WIFI_PASS = "PASSWORD_WIFI"; const char* TV_IP = "192.168.1.9"; const int TV_PORT = 55000; String soapEnvelope(const String& key) { return "" "" "" "" "" + key + "" "" "" ""; } void sendKey(const String& key) { HTTPClient http; WiFiClient client; String url = String("http://") + TV_IP + ":" + TV_PORT + "/nrc/control_0"; http.begin(client, url); http.addHeader("Content-Type", "text/xml; charset=\"utf-8\""); http.addHeader("SOAPAction", "\"urn:panasonic-com:service:p00NetworkControl:1#X_SendKey\""); int code = http.POST(soapEnvelope(key)); Serial.print("HTTP code: "); Serial.println(code); http.end(); } void setup() { Serial.begin(115200); WiFi.begin(WIFI_SSID, WIFI_PASS); Serial.print("Connecting WiFi"); while (WiFi.status() != WL_CONNECTED) { delay(300); Serial.print("."); } Serial.println("\nWiFi connected"); delay(1000); Serial.println("Sending VOL+"); sendKey("NRC_VOLUP-ONOFF"); } void loop() { }