-->
Page 1 of 1

Connect ESP8266 to Router

PostPosted: Mon Jan 18, 2021 10:42 am
by cloud2828
As title says, can I connect it (NodeMCU V2 to be specific) to my router such that I can check the status of it from my phone at anywhere once I have an internet connection? For example, let's say I have it setup to be connected to my house lights, would I be able to turn on and off the lights from anywhere in the world once I have an internet connection?

Re: Connect ESP8266 to Router

PostPosted: Thu Jan 21, 2021 5:15 am
by QuickFix
In short yes: that's how the Sonoff switches work (these are/were actually based on the ESP8266).

The thing with Sonoff (using their eWeLink network) is that they use their own central server (in China), which is a route you (most probably) don't want to take; you can however subscribe your ESP8266 to a MQTT server instead.

See the Tasmota project for more information and ideas. :idea:

Another option is to make your ESP into a server and forward it's port inside your router to the outside.
Please note that forwarding any webserver might/will introduce a security issue.