8

I have an IoT device that is connected to a WiFi network. Currently, the IoT device runs a small HTTP server, and send RF signals when it receives POST requests via the internet from HTTP clients. To make this work, I have to enable port forwarding on my WiFi router, and the HTTP clients have to connect to the IP address of the router. This seems like a bad way to go about it.

I notice there are devices that work from within WiFi network - like Ring doorbell, Wink devices, etc, that does not require port forwarding, etc. I am wondering how this is done.

I am guessing that these devices are actually HTTP clients and connect to outside servers. Then, the server actually sends the commands to the client (IoT) devices.

If this is so, would you please give some guidance on how to create the server (in Python), how to connect the IoT device to the server (HTTP connection), and how to send the commands from the server to the client (cannot use POST as this is the wrong direction).

Aurora0001
  • 18,520
  • 13
  • 55
  • 169
James Yeh
  • 81
  • 1

1 Answers1

3

What device are you using? It'll depend if you're able to change the firmware or not. Check if your device is compatible with MQTT, it's a nice way to control devices through an app or a web browser.

Maybe you'll want to check blynk. It's an open source app (so, you can check how the server is made if you want to) and, if you just want to use it it's pretty easy to use.

Luis Diaz
  • 814
  • 7
  • 10