TODO:
- on power try to connect to wifi, if failed create hotpost
- establish telnet server
- change env variables and restart from master server and by its own api (server name, wifi credentials)
- on wifi connect, ping master server
- sleep mode?
- read pins and forward input to master server
- inteligently pool master server for pin commands
LINKS:
- api doc https://github.com/nodemcu/nodemcu-firmware/wiki/nodemcu_api_en#crypto-module
- http framework https://github.com/marcoskirsch/nodemcu-httpserver
- http server https://stackoverflow.com/questions/30628899/trouble-connecting-to-esp8266-nodemcu-server
- some project https://github.com/lrozema/nodemcu-stuff
- lua promises https://github.com/zserge/lua-promises
- tutorial http://www.esp8266.com/wiki/doku.php?id=nodemcu