7

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).

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.

|improve this answer|||||
  • If you go the MQTT way, you're probably going to need a server outside the home network for the devices to connect to, otherwise you still have the port forwarding problem. I believe AWS IoT is based on MQTT, and potentially would be an option. Of course you'd have to check the pricing structure and features to see if it is viable or if there are better options. – Aurora0001 Aug 25 '17 at 7:33
  • 1
    I talking from my experience (I've been using blynk for about a year now) and works pretty well, with the blynk server and a local server (on a raspberry pi). Cost it's pretty low in this case. – Luis Diaz Aug 25 '17 at 7:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.