Closed ptareco1 closed 3 years ago
Issue Label Bot is not confident enough to auto-label this issue. See dashboard for more details.
My guess is that you are not getting internet access via your router when you set a static IP. EasyDDNS internally sends a HTTP request to a URL to fetch your public IP, if there is no internet access, it fails.
I'll suggest you to check if you are able to make a HTTP request in your static IP nodemcu to see if there is internet access or not, Use this code to check:
HTTPClient http;
http.begin("http://ipv4bot.whatismyipaddress.com/");
int httpCode = http.GET();
if (httpCode > 0) {
if (httpCode == HTTP_CODE_OK) {
Serial.println(http.getString());
} else {
Serial.println("HTTP Request NOT OK: "+String(httpCode));
}
} else {
http.end();
Serial.println("HTTP Request Failed: "+String(httpCode));
return;
}
http.end();
Send me the serial output to diagnose it.
Regards, Ayush
Hi Ayush,
Many thanks for the reply.
It is working now!
You are right. The one with Static IP address although had internet access it did not have the DNS setup, so it did not work because it was not resolving the http://ipv4bot.whatismyipaddress.com/.
I've setup the DNS on it and it is working now.
Again many thanks and keep the good work!
Thanks BRs PT
Hi.
First let me thank you for your great library and support to it. It is really very useful.
My problem seems that setting a static IP on the app it does not let the EasyDDNS update the Duch DNS.
The issue I'm facing is that I cannot integrate it on my NodeMCU lolin v3 (ESP8266) application. I have running on oneNodeMCU a Web server. I need to access this from the internet. So I use a port forwarding on my Router from the outside to the static IP on the nodeMCU on port 80. Then I have a DuckDNS account that I use your library to get updated.
On my router I set: Application | Protocol | Source Port | Destination IP | Destination port myApp| TCP+UDP | 80 | 192.168.1.230 | 80
If I run another standalone app (no Web server) with your EasyDDNS on a second NodeMCU it runs perfectly and updates the public IP address on the Duck DNS without any problems. It works!
My problem seems that setting a static IP on the app it does not let the EasyDDNS update the Duch DNS. So I'm using 2 NodeMCUs. I would like to integrate all the code on one NodeMCU only. Any suggestions?
This is some of the code on my first NodeMCU
This is the code on my second NodeMCU:
Many thanks Regards Pedro