-->
Page 1 of 1

Esp8266 nodemcu lua get data from website to push a button

PostPosted: Sun Jun 25, 2017 12:49 pm
by Dreadgoiboi
Hello,
for my project i was trying to turn a led on with esp8266 i managed to do it but I can't connect from anywhere because i have private Ip and can't use port forwarding to solve it.

So i was thinking is it possible to create free website and then read data from the website to push a button or turn a led on? If it is possible could you post links for tutorials how to do it? I was trying to find something like this but i was unable, propably looking for wrong stuff.

I was thinking i'd create a website on free hosting domains and then set up some buttons and read their state with esp8266 to turn led on is this possible?

Re: Esp8266 nodemcu lua get data from website to push a butt

PostPosted: Wed Jun 28, 2017 9:24 am
by alex_g
I am sure that there are several ways to solve the type of problem you describe, but none of them concern the ESP8266, since you are really looking at internet setups, probably off-topic here.

The easiest way to handle this kind of problem, in my opinion, would be to use MQTT on the server side and then configure your ESP chip as an MQTT client which can control whatever you want.

There are a lot of MQTT tutorials around, and even YouTube videos (here are some of them), so have a look and see if it's what you're after. If it is, there are MQTT client libraries both for Arduino IDE and NodeMCU, very easy to use once you've taught yourself the basics of MQTT.

Re: Esp8266 nodemcu lua get data from website to push a butt

PostPosted: Wed Jun 28, 2017 4:09 pm
by gbafamily1
I was thinking i'd create a website on free hosting domains and then set up some buttons and read their state with esp8266 to turn led on is this possible?


Here is one example. The Adafruit site uses mqtt as the transport wrapped with colorful web interface widgets. Their libraries work on ESP8266 boards. Adafruit hardware is not required.

https://learn.adafruit.com/adafruit-io- ... e?view=all

EDIT: Opps, I see you want a Lua solution while this is an Arduino solution.