IoT with ESP8226: Real-time communication

I’d like guidance on an IoT issue with ESP8266 in the communication part. My ESP has been programmed with Arduino, has a Webserver running on it, It has Static IP, it’s connected to a router in my house, in my house also has a Static IP on the internet. I’ve created a mobile app wich access the Static IP of my house and sends a command that should reach the ESP8266 device. The goal is to make the communication in real time, where by pressing a button in the app, will immediately trigger “something” in the ESP.

My question is:
How does the command sent from my cell phone find the ESP8266 device connected to the router?
IMPORTANT: I don’t wanna have to change anything on my router, that is, I don’t want to access my router settings to redirect requests to the IP of the ESP8266.

Yes. Port forwarding on your router is complex and introduces a security risk. Look at the architecture of Blynk as an example to get round this. You can do something similar if you use a network service which includes a Apache/php/MySQL or an equivalent. In principle, your cell phone application posts a transaction via an external web server and your iot application polls the web server constantly (as an http client) to find these transactions.

I didn't want to quote Blynk, but that's exactly what I imagined. However, if I create an HTTP Client and do Polling on a server (as I suppose Blynk does...), I'm imagining there will be a huge number of requests to the server in a short time. Also, I'm imagining that when there are many IoT devices running, my internal network (provided by my router) will also be overloaded with the requests. Isn't it? Thanks!


I am trying to do something similar. Is there any examples that I can look at.

I just like to be able to send and receive data from a website to the ESP8266 module. The module I bought is called HUZZAH made by adafruit. I am using Ardunio environment to program it.

I then will send data back and forth between the WiFi module and a MEGA2560 via the RX0/TX0 port.

I think doing it from a website would be easier than creating an APP. Since the website can be access with a phone, computers, etc.

I appreciate any help. Thanks Bobby