Press "Enter" to skip to content

Looking for the best way to push commands to my ESP

Hi first of all, first-time poster so sorry if I broke any rules.
So I'm building a connected working buddy and I'm looking for the best way to send commands to my device from a web service hosted somewhere in the cloud. Obviously I cannot send a request directly to a local IP from outside of the network and port forwarding is not an option.
I'm contemplating between:

  1. Something like a polling system where the ESP will check a URL every few seconds and if there is a new command for it, the ESP will see that on the URL and send an acknowledgment that the message has been received.
  2. A WebSocket connection between the ESP and the web service where messages will be instantaneously received. I have seen some Websocket libs for ESP ( https://github.com/espressif/esp-idf/tree/7d75213674b4572f90c68162ad6fe9b16dae65ad/components/esp_websocket_client )
  3. Something else?

What would be the best option to tackle this problem? and what would be the easiest?

Thanks! also, non-native English speaker. Bear with me :)

submitted by /u/reversetec
[link] [comments]

Be First to Comment

Leave a Reply

%d bloggers like this: