Why Smart Plugs don't require setting port forwarding on router and how to accomplish this with NodeMCU...

Can a dragon be stuck looking like a human?

Is there some relative to Dutch word "kijken" in German?

Every character has a name - does this lead to too many named characters?

Can an insurance company drop you after receiving a bill and refusing to pay?

Cat is tipping over bed-side lamps during the night

What's the most convenient time of year to end the world?

Would these multi-classing house rules cause unintended problems?

Why would the Pakistan airspace closure cancel flights not headed to Pakistan itself?

What's a good word to describe a public place that looks like it wouldn't be rough?

How would a Dictatorship make a country more successful?

Isn't using the Extrusion Multiplier like cheating?

What is better: yes / no radio, or simple checkbox?

How to prevent cleaner from hanging my lock screen in Ubuntu 16.04

Am I a Rude Number?

Prove the support of a real function is countable

Quenching swords in dragon blood; why?

Why zero tolerance on nudity in space?

Why does a metal block make a shrill sound but not a wooden block upon hammering?

Grade 10 Analytic Geometry Question 23- Incredibly hard

Why Normality assumption in linear regression

Recrystallisation of dibenzylideneacetone

Explain the objections to these measures against human trafficking

Word or phrase for showing great skill at something without formal training in it

Compress command output by piping to bzip2



Why Smart Plugs don't require setting port forwarding on router and how to accomplish this with NodeMCU (ESP8266)


Wifi networking with ESP8266 (NODEMCU version)How To Read Serial Data With NodeMCUNodeMCU serial port - use with computer and device at the same timeNodeMCU powered with battery and use WiFiCommunicate between NodeMCU ESP8266 gateway and multiple sensor nodesIs it possible to connect nodemcu to mobile internet and how?Problems with NodeMCU and RelayHow to integrate nRF24L01 to esp8266 nodeMCU?NodeMCU Ping working on one but not anotherWhy is this Code not working with Esp8266 when it worked perfectly with Arduino Uno?













2















I have a NodeMCU (ESP8266) board that I use to control some devices over the internet. To be able to access it I have to enable port forwarding on my router and set the port manually like in the image below:



enter image description here



But with Smart Plugs (that use a cloud based app) I don't have to set up anything on my router. I am only required to type my Wi-Fi password. So my question is how Smart Plugs are accessed over the router (why they don't need manual port forwarding setting), and how to apply this to my NodeMCU so I don't have to set port forwarding manually.










share|improve this question







New contributor




Slaven Tojic is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

























    2















    I have a NodeMCU (ESP8266) board that I use to control some devices over the internet. To be able to access it I have to enable port forwarding on my router and set the port manually like in the image below:



    enter image description here



    But with Smart Plugs (that use a cloud based app) I don't have to set up anything on my router. I am only required to type my Wi-Fi password. So my question is how Smart Plugs are accessed over the router (why they don't need manual port forwarding setting), and how to apply this to my NodeMCU so I don't have to set port forwarding manually.










    share|improve this question







    New contributor




    Slaven Tojic is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.























      2












      2








      2


      1






      I have a NodeMCU (ESP8266) board that I use to control some devices over the internet. To be able to access it I have to enable port forwarding on my router and set the port manually like in the image below:



      enter image description here



      But with Smart Plugs (that use a cloud based app) I don't have to set up anything on my router. I am only required to type my Wi-Fi password. So my question is how Smart Plugs are accessed over the router (why they don't need manual port forwarding setting), and how to apply this to my NodeMCU so I don't have to set port forwarding manually.










      share|improve this question







      New contributor




      Slaven Tojic is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.












      I have a NodeMCU (ESP8266) board that I use to control some devices over the internet. To be able to access it I have to enable port forwarding on my router and set the port manually like in the image below:



      enter image description here



      But with Smart Plugs (that use a cloud based app) I don't have to set up anything on my router. I am only required to type my Wi-Fi password. So my question is how Smart Plugs are accessed over the router (why they don't need manual port forwarding setting), and how to apply this to my NodeMCU so I don't have to set port forwarding manually.







      nodemcu






      share|improve this question







      New contributor




      Slaven Tojic is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.











      share|improve this question







      New contributor




      Slaven Tojic is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      share|improve this question




      share|improve this question






      New contributor




      Slaven Tojic is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      asked 11 hours ago









      Slaven TojicSlaven Tojic

      1134




      1134




      New contributor




      Slaven Tojic is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.





      New contributor





      Slaven Tojic is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






      Slaven Tojic is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






















          1 Answer
          1






          active

          oldest

          votes


















          5














          Port forwarding is required to allow a device outside your router to access a device inside a router that performs NAT (Network Address Translation).



          When a NodeMCU is acting as a simple server to respond to requests, it is inside your network, and so the port-forwarding is required so that your phone or computer on the Outside can access it.



          However, for the cloud-based "smart" devices, it is different. The smart device opens a connection from itself to a server (the cloud) outside your network. In this case, the router understands that a new two-way connection is created between the cloud server and your smart device.



          The only communication to your smart device is from the cloud server to the smart device. If you have an app on your mobile device or computer, that app or website only accesses the cloud server, when then passes the instruction on to your smart device. Reverse direction for status info from the smart device to your app, etc.



          These smart devices rely on the infrastructure of their creators to continue to work. There are no LAN-to-LAN connections from the client to the device. Everything goes through the Internet to the remote cloud server, and back.



          Many home routers support a protocol called uPNP, that allows a device inside the network to request port forwarding to itself. Some routers require this to be explicitly enabled, because it's a security risk to allow any device to be able to open holes in your firewall/router.



          To have your NodeMCU device do this, look for libraries for ESP8266 that implement uPNP. I did a quick search and found https://github.com/ofekp/TinyUPnP though I cannot vouch for it's effectiveness or safety.






          share|improve this answer
























          • Great answer, thanks for the quick response.

            – Slaven Tojic
            11 hours ago











          • MQTT is another protocol worth looking at. It's commonly used in IoT devices (and supported cloud platforms such as the Amazon/Azure IoT offerings) to solve the same problem.

            – oznu
            4 hours ago













          Your Answer






          StackExchange.ifUsing("editor", function () {
          return StackExchange.using("schematics", function () {
          StackExchange.schematics.init();
          });
          }, "cicuitlab");

          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "540"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: false,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });






          Slaven Tojic is a new contributor. Be nice, and check out our Code of Conduct.










          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2farduino.stackexchange.com%2fquestions%2f62117%2fwhy-smart-plugs-dont-require-setting-port-forwarding-on-router-and-how-to-accom%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          5














          Port forwarding is required to allow a device outside your router to access a device inside a router that performs NAT (Network Address Translation).



          When a NodeMCU is acting as a simple server to respond to requests, it is inside your network, and so the port-forwarding is required so that your phone or computer on the Outside can access it.



          However, for the cloud-based "smart" devices, it is different. The smart device opens a connection from itself to a server (the cloud) outside your network. In this case, the router understands that a new two-way connection is created between the cloud server and your smart device.



          The only communication to your smart device is from the cloud server to the smart device. If you have an app on your mobile device or computer, that app or website only accesses the cloud server, when then passes the instruction on to your smart device. Reverse direction for status info from the smart device to your app, etc.



          These smart devices rely on the infrastructure of their creators to continue to work. There are no LAN-to-LAN connections from the client to the device. Everything goes through the Internet to the remote cloud server, and back.



          Many home routers support a protocol called uPNP, that allows a device inside the network to request port forwarding to itself. Some routers require this to be explicitly enabled, because it's a security risk to allow any device to be able to open holes in your firewall/router.



          To have your NodeMCU device do this, look for libraries for ESP8266 that implement uPNP. I did a quick search and found https://github.com/ofekp/TinyUPnP though I cannot vouch for it's effectiveness or safety.






          share|improve this answer
























          • Great answer, thanks for the quick response.

            – Slaven Tojic
            11 hours ago











          • MQTT is another protocol worth looking at. It's commonly used in IoT devices (and supported cloud platforms such as the Amazon/Azure IoT offerings) to solve the same problem.

            – oznu
            4 hours ago


















          5














          Port forwarding is required to allow a device outside your router to access a device inside a router that performs NAT (Network Address Translation).



          When a NodeMCU is acting as a simple server to respond to requests, it is inside your network, and so the port-forwarding is required so that your phone or computer on the Outside can access it.



          However, for the cloud-based "smart" devices, it is different. The smart device opens a connection from itself to a server (the cloud) outside your network. In this case, the router understands that a new two-way connection is created between the cloud server and your smart device.



          The only communication to your smart device is from the cloud server to the smart device. If you have an app on your mobile device or computer, that app or website only accesses the cloud server, when then passes the instruction on to your smart device. Reverse direction for status info from the smart device to your app, etc.



          These smart devices rely on the infrastructure of their creators to continue to work. There are no LAN-to-LAN connections from the client to the device. Everything goes through the Internet to the remote cloud server, and back.



          Many home routers support a protocol called uPNP, that allows a device inside the network to request port forwarding to itself. Some routers require this to be explicitly enabled, because it's a security risk to allow any device to be able to open holes in your firewall/router.



          To have your NodeMCU device do this, look for libraries for ESP8266 that implement uPNP. I did a quick search and found https://github.com/ofekp/TinyUPnP though I cannot vouch for it's effectiveness or safety.






          share|improve this answer
























          • Great answer, thanks for the quick response.

            – Slaven Tojic
            11 hours ago











          • MQTT is another protocol worth looking at. It's commonly used in IoT devices (and supported cloud platforms such as the Amazon/Azure IoT offerings) to solve the same problem.

            – oznu
            4 hours ago
















          5












          5








          5







          Port forwarding is required to allow a device outside your router to access a device inside a router that performs NAT (Network Address Translation).



          When a NodeMCU is acting as a simple server to respond to requests, it is inside your network, and so the port-forwarding is required so that your phone or computer on the Outside can access it.



          However, for the cloud-based "smart" devices, it is different. The smart device opens a connection from itself to a server (the cloud) outside your network. In this case, the router understands that a new two-way connection is created between the cloud server and your smart device.



          The only communication to your smart device is from the cloud server to the smart device. If you have an app on your mobile device or computer, that app or website only accesses the cloud server, when then passes the instruction on to your smart device. Reverse direction for status info from the smart device to your app, etc.



          These smart devices rely on the infrastructure of their creators to continue to work. There are no LAN-to-LAN connections from the client to the device. Everything goes through the Internet to the remote cloud server, and back.



          Many home routers support a protocol called uPNP, that allows a device inside the network to request port forwarding to itself. Some routers require this to be explicitly enabled, because it's a security risk to allow any device to be able to open holes in your firewall/router.



          To have your NodeMCU device do this, look for libraries for ESP8266 that implement uPNP. I did a quick search and found https://github.com/ofekp/TinyUPnP though I cannot vouch for it's effectiveness or safety.






          share|improve this answer













          Port forwarding is required to allow a device outside your router to access a device inside a router that performs NAT (Network Address Translation).



          When a NodeMCU is acting as a simple server to respond to requests, it is inside your network, and so the port-forwarding is required so that your phone or computer on the Outside can access it.



          However, for the cloud-based "smart" devices, it is different. The smart device opens a connection from itself to a server (the cloud) outside your network. In this case, the router understands that a new two-way connection is created between the cloud server and your smart device.



          The only communication to your smart device is from the cloud server to the smart device. If you have an app on your mobile device or computer, that app or website only accesses the cloud server, when then passes the instruction on to your smart device. Reverse direction for status info from the smart device to your app, etc.



          These smart devices rely on the infrastructure of their creators to continue to work. There are no LAN-to-LAN connections from the client to the device. Everything goes through the Internet to the remote cloud server, and back.



          Many home routers support a protocol called uPNP, that allows a device inside the network to request port forwarding to itself. Some routers require this to be explicitly enabled, because it's a security risk to allow any device to be able to open holes in your firewall/router.



          To have your NodeMCU device do this, look for libraries for ESP8266 that implement uPNP. I did a quick search and found https://github.com/ofekp/TinyUPnP though I cannot vouch for it's effectiveness or safety.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered 11 hours ago









          jose can u cjose can u c

          6,2592724




          6,2592724













          • Great answer, thanks for the quick response.

            – Slaven Tojic
            11 hours ago











          • MQTT is another protocol worth looking at. It's commonly used in IoT devices (and supported cloud platforms such as the Amazon/Azure IoT offerings) to solve the same problem.

            – oznu
            4 hours ago





















          • Great answer, thanks for the quick response.

            – Slaven Tojic
            11 hours ago











          • MQTT is another protocol worth looking at. It's commonly used in IoT devices (and supported cloud platforms such as the Amazon/Azure IoT offerings) to solve the same problem.

            – oznu
            4 hours ago



















          Great answer, thanks for the quick response.

          – Slaven Tojic
          11 hours ago





          Great answer, thanks for the quick response.

          – Slaven Tojic
          11 hours ago













          MQTT is another protocol worth looking at. It's commonly used in IoT devices (and supported cloud platforms such as the Amazon/Azure IoT offerings) to solve the same problem.

          – oznu
          4 hours ago







          MQTT is another protocol worth looking at. It's commonly used in IoT devices (and supported cloud platforms such as the Amazon/Azure IoT offerings) to solve the same problem.

          – oznu
          4 hours ago












          Slaven Tojic is a new contributor. Be nice, and check out our Code of Conduct.










          draft saved

          draft discarded


















          Slaven Tojic is a new contributor. Be nice, and check out our Code of Conduct.













          Slaven Tojic is a new contributor. Be nice, and check out our Code of Conduct.












          Slaven Tojic is a new contributor. Be nice, and check out our Code of Conduct.
















          Thanks for contributing an answer to Arduino Stack Exchange!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2farduino.stackexchange.com%2fquestions%2f62117%2fwhy-smart-plugs-dont-require-setting-port-forwarding-on-router-and-how-to-accom%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Fairchild Swearingen Metro Inhaltsverzeichnis Geschichte | Innenausstattung | Nutzung | Zwischenfälle...

          Pilgersdorf Inhaltsverzeichnis Geografie | Geschichte | Bevölkerungsentwicklung | Politik | Kultur...

          Marineschifffahrtleitung Inhaltsverzeichnis Geschichte | Heutige Organisation der NATO | Nationale und...