I am trying to send UDP packets to an InfluxDB but can't seem to get it to work. The influx instance is setup properly and can receive packets when I send from another PC. The code below is simply sending the same data point every 5 seconds but it does not seem to work. The ESP8266 is online, has an IP address and can be pinged. Any ideas?
#include <ESP8266WiFi.h>
#include <WiFiUdp.h>
const char* ssid = "SSID";
const char* password = "PASS";
WiFiUDP Udp;
void setup() {
Serial.begin(115200);
WiFi.begin(ssid, password);
while (WiFi.status() != WL_CONNECTED){
delay(500);
Serial.print(".");
}
}
void loop() {
delay(10);
Udp.beginPacket("192.168.4.1", 8888);
Udp.write("voltage value=20");
Udp.endPacket();
delay(5000);
}