NodeMCU webserver control anywhere (ESP)

Hello!

I have a NodeMCU device, I created a webserver and I can control my home system (2 relay, RGB LED etc.) on the same network. It is very cool but i want to control this system far away from home.
So I want to control this system anywhere.

If you have an idea please write down.

PS: I am so sorry my language mistake. I am learning this language. I hope It was clear.

You have to use online free servers for this purpose. Something like Cayenne might help if all you want to do is control lights and relays.

^ not exactly true.

If this is set-up in your house… then you’d need to open up a port on your router and forward that port/traffic over to the IP of the webserver that is hosting/parsing your HTML/CSS (web page) interface…

Google port forwarding and there will be 10000’s of tutorials on it.

Question about your home automation set-up though… (not related to your original question/situation at all)

How are your ‘connected devices’ set-up?

Is there a ‘central brain’ (the nodeMCU?) that servers up this GUI? or do you have some sort of web server (WAMP) install going on?

How do these connected devices know to toggle the relay (for example) when you interact with your interface/GUI?

Is everything connected to the nodeMCU? does each connected deivice have its own ESP/Arduino or something to connect them to this ‘home automation network’?

Are do they poll (constantly) checking on the state of some value/variable? (not very efficient)

If it is the later, you may want to look into setting up a MQTT server somewhere… (its worth the minimal time and low costs IMHO)