user26848: I want to send an HTTP command to MKR1000 from outside my local network.
So far, all the googled resources point to getting the local IP (example 192.168.0.10) of MKR1000 and sending a command like http://192.168.0.10/H to it and then parse it. 
How do I send a command to MKR1000 from outside its local network?
I should clarify that I want this to be a consumer product and can't have the end-user fiddling with their routers for port forwarding etc.

user70436: You now can try this UPnP_Generic library to do the auto-portforwarding for you without manually touching the router.


Many of us are manually port-forwarding in Internet Gateway Device (IGD, Router) in order to provide access to local Web Services from the Internet.
This library provides the easier way to automatically port-forward by using the Simple Service Discovery Protocol (SSDP), running on nRF52, SAMD21/SAMD51, STM32F/L/H/G/WB/MP1, Teensy, ESP8266/ESP32, using ESP WiFi, WiFiNINA, Ethernet W5x00, ESP8266/ESP32 AT-command WiFi supporting UDP Multicast.
The SSDP provides a mechanism whereby network clients, with little or no static configuration, can discover network services. SSDP accomplishes this by providing for multicast discovery support as well as server based notification and discovery routing.
The SSDP is used for advertisement and discovery of network services and presence information. It accomplishes the task without assistance of server-based configuration mechanisms, such as Dynamic Host Configuration Protocol (DHCP) or Domain Name System (DNS), and without special static configuration of a network host. SSDP is the basis of the discovery protocol of Universal Plug and Play (UPnP) and is intended for use in residential or small office environments.
This UPnP_Generic library is created to automatically update your IGDs with the requested port-forward information, using one of the many available boards / shields. See Currently Supported Boards.
The time between checks to update the UPnP Port Mappings is configurable to match your use case, and is set in the examples at 10 minutes. The LEASE_DURATION is also configurable and default to 10hrs (36000s). The Virtual Server Name can also be specified in the sketch and is shown in the IGD, e.g. NRF52-W5X00 or ESP8266-WIFI as in the following picture:

The UPnP_Generic code is very short, can be immersed in your Projects and to be called in the loop() code.

user26856: The only way I can think of to achieve this would be to port forward your router, and forward port 80 (http) to your MKR1000. You can check out https://portforward.com/ for instructions on that.
If you don't want to port-forward, you'd have to have the MKR1000 connect to a centralized IOT server somewhere, and have the user go through the server to access the MKR1000. That's how other iot devices such as nest cameras do it.

26848: <p>I want to send an HTTP command to MKR1000 from outside my local network.</p>

<p>So far, all the googled resources point to getting the local IP (example 192.168.0.10) of MKR1000 and sending a command like <code>http://192.168.0.10/H</code> to it and then parse it. </p>

<p>How do I send a command to MKR1000 from outside its local network?</p>

<p>I should clarify that I want this to be a consumer product and can't have the end-user fiddling with their routers for port forwarding etc.</p>
 70436: <p>You <strong>now</strong> can try this <a href="https://github.com/khoih-prog/UPnP_Generic" rel="nofollow noreferrer"><strong>UPnP_Generic library</strong></a> to do the auto-portforwarding for you without manually touching the router.</p>
<hr />
<hr />
<p>Many of us are <strong>manually port-forwarding</strong> in Internet Gateway Device (IGD, Router) in order to provide access to local Web Services from the Internet.</p>
<p>This library provides the easier way to automatically port-forward by using the <a href="https://datatracker.ietf.org/doc/html/draft-cai-ssdp-v1-03" rel="nofollow noreferrer"><strong>Simple Service Discovery Protocol (SSDP)</strong></a>, running on nRF52, SAMD21/SAMD51, STM32F/L/H/G/WB/MP1, Teensy, ESP8266/ESP32, using ESP WiFi, WiFiNINA, Ethernet W5x00, ESP8266/ESP32 AT-command WiFi supporting <strong>UDP Multicast</strong>.</p>
<p>The SSDP provides a mechanism whereby network clients, with little or no static configuration, can discover network services. SSDP accomplishes this by providing for multicast discovery support as well as server based notification and discovery routing.</p>
<p>The <a href="https://en.wikipedia.org/wiki/Simple_Service_Discovery_Protocol" rel="nofollow noreferrer"><strong>SSDP</strong></a> is used for <strong>advertisement and discovery of network services and presence information</strong>. It accomplishes the task without assistance of server-based configuration mechanisms, such as Dynamic Host Configuration Protocol (DHCP) or Domain Name System (DNS), and without special static configuration of a network host. SSDP is the basis of the discovery protocol of <strong>Universal Plug and Play (UPnP)</strong> and is intended for use in residential or small office environments.</p>
<p>This <a href="https://github.com/khoih-prog/UPnP_Generic" rel="nofollow noreferrer"><strong>UPnP_Generic library</strong></a> is created to automatically <strong>update your IGDs with the requested port-forward information</strong>, using one of the many available boards / shields. See <a href="https://github.com/khoih-prog/UPnP_Generic#currently-supported-boards" rel="nofollow noreferrer"><strong>Currently Supported Boards</strong></a>.</p>
<p>The time between checks to update the UPnP Port Mappings is <strong>configurable</strong> to match your use case, and is set in the examples at 10 minutes. The LEASE_DURATION is also configurable and default to 10hrs (36000s). The Virtual Server Name can also be specified in the sketch and is shown in the IGD, e.g. <code>NRF52-W5X00</code> or <code>ESP8266-WIFI</code> as in the following picture:</p>

  <img src="https://github.com/khoih-prog/UPnP_Generic/raw/master/pics/VirtualServers.png">
</p>
<p>The UPnP_Generic code is very short, can be immersed in your Projects and to be called in the loop() code.</p>
 26856: <p>The only way I can think of to achieve this would be to port forward your router, and forward port 80 (http) to your MKR1000. You can check out <a href="https://portforward.com/" rel="nofollow">https://portforward.com/</a> for instructions on that.</p>

<p>If you don't want to port-forward, you'd have to have the MKR1000 connect to a centralized IOT server somewhere, and have the user go through the server to access the MKR1000. That's how other iot devices such as nest cameras do it.</p>
