Weather Station on ESP8266 using LUA

Robo India presents tutorial to make an online weather station using ESP8266 WiFi module and LUA platform.

Detailed Tutorial

1. Introduction:

This tutorial explains how to make an online weather station using ESP8266 wifi module and LUA programming. It is an stand alone weather station that collect weather updates from and displays the retrieved information on 16X2 LCD.

1.1 Prerequisites

You need to have basic understanding of ESP8266, below mentioned tutorials of Robo India may help you out in this.

1. This tutorial explains configuration and setup of ESP8266

2. This tutorial explains basic of ESPlorer.

3. I2C Scanner : This tutorial will help you to know i2C LCD address.

4. Using i2C LCD on ESP8266 : This tutorial will help you to use i2C LCD on ESP8266.

2. Circuit

This tutorial does not require any special except i2c LCD connections and connections to Computer to uploading program, all these circuits are explained in above mentioned tutorials.

3. Getting API Key From OpenWeather

1. go to and create an account if you do not have one.

2. Login to your account account you will find API Key in the HOME>SETUP tab.

3. Copy and paste this key to a separate notepad file will will need it later.

3.1 Getting city code from OpenWeather

Search your city in the search box at Click on your city on search result and here is your city code as highlighted in the following image.


Another way of getting city code -

Download list of city codes from the above file. After downloading extract the file and open the same in Notepad or Wordpad and find the code of your city.

As you know the city code please note the same where you noted API Key we will need it later.

4. Programming

Fill the following information and generate the programme. Extract the downloaded zip file and upload all three files to your ESP8266.

Reset your device and you will see flashing Weather Update on the LCD connected to ESP8266 wifi Module. Information
I2C LCD Information
WiFi Access point Information

If you have any query please write us at

our whatsapp helpline: whatsapp-logo-robo-india +91 9694011188

Thanks and Regards
Content Development Team
Robo India

Related Tutorials
ESP8266 Connecting to Internet

Robo India presents tutorial on connecting ESP8266 wifi module to internet.

NodeMCU Amica Installation - ESP8266 Based Development Board

Robo India presents tutorial on how to install NodeMCU Amica, ESP8266 wifi module based development board.

LCD on ESP8266 using LUA

Robo India presents tutorial on how to run LCD on ESP8266 using LUA programming.

Robo India Tutorial portal

Illustrated tutorials and guides.

Feel free to contact us

© Robo India |