9

This question already has an answer here:

Situation

I need to access an ESP8266's Wi-Fi local server from outside.

Like Xiaomi Yeelight (YeeLight Introduction Web Site Link) or LOHAS LED (LOHAS LED Web Site), I have to control it from outside not in same Wi-Fi.

I can only think of port forwarding, but I don't think Yeelight uses port forwarding (just my opinion).

I don't know whether YeeLight forces one to activate port forwarding or not using port forwarding, but I wonder how YeeLight can control the light bulb from the outside.

Question

  1. In order to control Wi-Fi IoT product like YeeLight, I have to create local server which can control Wi-Fi IoT product's GPIO. Is it right?

  2. If question 1 is right, how I can access to Wi-Fi IoT product's local server from outside without port forwarding?

  3. Is there any way to force to activate port forwarding in end-point (not in router)?

marked as duplicate by Chris Stratton, Bence Kaulics, hardillb, Sean Houlihane, Goufalite Jan 4 '18 at 7:57

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

7
  1. You have to provide an endpoint of some sort to allow control over a given device.

  2. Port forwarding is not the only option, the device could connect out to a publicly accessable server on the internet, once this connection is created then commands can be sent via this to the device. This is how many IoT devices work. Example protocols used for this include MQTT, but long poll HTTP is also an option.

  3. Look at something called UPnP, this is a way for devices to request a router sets up a specific set of port forwarding rules for a given device.

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