Skip to content

rafalbromirski/nodemcu-lua-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

IoT NodeMCU webserver

IoT Webserver for NodeMCU (written in Lua)

Setup

If you don't have any experience with ESP8266 and Lua, please check: IoT Esp8266 Lua Guide

  1. Clone / Download this repository.
  2. Install nodemcu-tool using npm:
npm install nodemcu-tool -g
  1. Optional: You can install lua linter - luacheck:
luarocks install luacheck

Configuration

Before you start you have to update config.lua file and set WiFi credentials:

module.SSID["NAME"] = "PASSWORD"

Connect your NodeMCU to USB port and upload all lua scripts (/dev/cu.wchusbserial1410 - your device name might be different)

$ nodemcu-tool --port /dev/cu.wchusbserial1410 upload src/*.lua

If you're done you can try to connect to your NodeMCU:

$ nodemcu-tool --port /dev/cu.wchusbserial1410 terminal

In order to see NodeMCU / server logs press RESET button on the board - the webserver will restart and try to establish wifi connection again:

Connecting to YOUR_WIFI_NETWORK...
====================================
ESP8266 mode is: 1
MAC address is: 5e:cf:7f:1b:df:19
IP is 192.168.1.100
====================================
Server Started
Open 192.168.1.100 in your browser
====================================

Follow the instruction and open your browser with given IP address:

NodeMCU WebServer Preview

Happy Hacking.

Resources:

License

This project is distributed under the MIT license.

About

IoT Webserver for NodeMCU (written in Lua)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published