BLYNK
HOME       📲 GETTING STARTED       📗 DOCS       ❓HELP CENTER       👉 SKETCH BUILDER

Local Server, ESP8266 outside local wifi

Hi,

I´m using a local Server on a raspberry and I can reach the server from outside of my wifi.
Now I want to use a ESP8266 in my caravan in my holiday.

Can I connect the ESP8266 in my caravan over the Internet with my local server at home?

Grave

Yes.
I assume you have a DDNS service? If so then use the URL and port. You’ll need to forward traffic on that port to your Pi, in your router.

Pete.

Yes, I have a DDNS service. Is it the same port, which the app use?

Grave

Depends on whether you’re wanting to use SSL or not, and how you’ve configured your local server, but it’s normally 8080

Pete.

Where do I use the URL? Blynk.config? But how?
I use wifimanager from here: https://github.com/tzapu/WiFiManager

Blynk.config(BlynkAuthCode,"yourDDNS.com", 8080);

Pete.

@PeteKnight, dosn’t the ESP8266 need to connect to a WIFI access point?

Thanks Pete. It works. I had a stupid mistake. I have forgotten to forward to port 8080.

Grave

1 Like

Yes, of course.

Pete.

@PeteKnight, so how does this work in the sketch
Blynk.config(BlynkAuthCode,"yourDDNS.com", 8080);

surely the OP would configure the esp device using wifimanager and set the APP server to his DDNS address?

I do t really understand the question.
When using Blynk.config you have to set-up the WiFi connection before calling Blynk.connect or Blynk.run for the first time.
Presumably the OP is using credentials entered via WiFiManager to input and store this data.
If only the Auth code is specified in Blynk.config then the library will attempt to connect to the Blynk cloud servers.
Normally with a local server you would specify Auth code, local server IP address and port.
In this case, the local server IP address has to be replaced with either the public IP address of the router (if it’s static) or a DDNS URL if the IP address is dynamic.

Pete.

thanks for clarity Pete, i run a local server but never used Blynk.config.