Your new topic does not fit any of the above??? Check first. Then post here. Thanks.

Moderator: igrr

User avatar
By lucasromeiro
#73382 hello, I'm using esp-12 with arduino ... I have a site that I get esp data by post html, but when my site needs to talk to esp, I have to set up a reverse connection on my client's router using port forwarding but this is very laborious and I often have trouble getting access to the client router ...
My system connects to the website every 15 minutes for sending data, I keep the wifi connection on, but I disconnect from my site after doing the html push. It's not cool to receive commands only when connecting to the site (15 minutes). I need a quick way.
Is there any way to simplify receiving commands from my site, which does not have to open the client router to configure port forwarding?
i need a help!!
User avatar
By btidey
#73394 If the transaction starts from outside then port forwarding is the mechanism used to allow the router to know where to direct that traffic.

So no it is not possible to address a device on the internal side of a conventional NAT router from the WAN side.

If this has to work with arbitrary routers and you want a faster response time then you should consider a higher poll rate from the device. Some systems poll for remote commands every few seconds to give decent response times.
User avatar
By destroyedlolo
#73397 2 solutions coming to my mind :

  • you may reverse the connection : I mean, let the ESP to query your web site. To do that, store the command somewhere on your website and create a simple webservice to retrieve the command
  • more sophisticated : use a public MQTT broker and persistent messages (QoS 1 or 2) : the web server publish commands and the ESP subscribes to the commands topics

I'm using the second one and it's working very well, but with a private MQTT broker.
User avatar
By lucasromeiro
#73399
lucasromeiro wrote:hello, I'm using esp-12 with arduino ... I have a site that I get esp data by post html, but when my site needs to talk to esp, I have to set up a reverse connection on my client's router using port forwarding but this is very laborious and I often have trouble getting access to the client router ...
My system connects to the website every 15 minutes for sending data, I keep the wifi connection on, but I disconnect from my site after doing the html push. It's not cool to receive commands only when connecting to the site (15 minutes). I need a quick way.
Is there any way to simplify receiving commands from my site, which does not have to open the client router to configure port forwarding?
i need a help!!


HTTP POST !!!!
Sorry for my mistake
I wrote wrong

the command has to come from my site. without needing to order.
port forwarding does this ... but it is very laborious to always have to configure the reverse path on the clients router ...