Start a new topic

WIoT-2 Weather Station and IoT Thing

Hey gang, just blogged about my updated weather IoT thing..  Displays weather forecast and a bunch of other stuff as well.

Link:  WIoT-2 Weather Station – Nextion TFT with ESP8266

1 person likes this idea

Here are the main features.  

  • Display current and forecast weather information.  This time around, I used the Weather Underground API to pull both current and forecast data in JSON format.
  • Display weather data generated outside the house via another ESP unit.  It polls temp, humidity and battery info (it’s solar powered) – Integrated with Blynk.
  • Poll and display the temperature of the hot tub – Integrated with Blynk.
  • Poll and display the status of garage doors (open/closed) – will be integrated in the future – Also integrated with Blynk.
  • Allow our kids to interact with the unit – sends notifications via BlynkPolls waste collection calendar information to show us which waste items are being collected on a weekly basis.
  • Show the current date and time – uses Blynk RTC widget
  • I also added a picture viewer which shows family photos (for those times when people are bored standing at the door waiting for others…)

2 people like this

Nope, I flash using the NodeMCU 1.0.  Here's an Instructable showing how to get it in your Boards file.  Also, I've been using the NodeMCU Mini lately.. Nice small package and has more than enough pins for this type of project.

1 person likes this

Dave, just wanted to say that was a well invested $10.  I won't use all the code but just the time it will save me!  What can I say but thanks again for making this available. :)

Dave, quick question.  You use a NodeMCU v1.0 board but it looks like you are flashing it as a regular ESP8266.  Is this correct?

Hi Barry. I dont use the tutorial code libraries, so you may want to ask the broader group for support. You posted under my thread for WIoT-2, which may not get the attention you need.

A $5 donation is ridiculous... I donated $10 for all that great work!!  Thanks again Dave.

It is nice to see support.  Inspiring.

Paul, appreciate the generous donation.  I've sent off the sketch and HMI.


Hey guys, I'm trying to compile the Weather Station code using the latest version of the Arduino IDE. Could you point me in the right direction to fix the errors in the attached ,txt file? Thanks, -Barry





Hey Dave,

You put a lot of work into this.  Looks good by the way, nice job indeed

Dave, (or others who are interested)

very nicely done. Regarding the donations, can I interest you in a few hours of consulting?

Looking to integrate the nextion with nodemcu, controlling about 4 x 3.3v relays, reading approximately 3 5v analog sensors (will require level shifting), 1 or 2 digital in as well. wifi will be communicating to api's my web team creates. It may be some products we develop will have to have an mcu inbetween for more io's - just means we will have product variants.

I mainly needs a heads up on whether node mcu is the right way to go, and trying to avoid wasted efforts.We already do a huge amount in the IOIO / Android space and want to port some control functions to smaller production units. Plus some hardware discussions. A connection schematic would also save us a lot of effort.Ongoing there will also be a need to achieve the same connectivity via cell modem instead of wifi (another variant). We are fine with the Nextion HMI, already have very nice prototype of an advanced control system.

Unless you actively work in water management systems, there shouldn't be a conflict of interest.

Let me know here, or via my email (p dot james at water renu dot com)

Barry, What code are you trying to compile? My WIoT-2 code, or another sample? If it's, mine please contact me using the link in the OP above. Otherwise, I suggest you post the top section of the code. It may be you don't have all the correct libraries. Dave

 Hi Dave. tanks for the quick reply. I believe the code that I am using is from the ITEAD tutorial. Here's the snippet that precedes the first function definition (void Setup and void Loop are at the very end of the sketch).

#include "ESP8266.h"
#include "Timer.h"
#define SSID_NAME "#######"
#define PASSWORD "##################################################"
#define HOST_NAME ""
#define HOST_PORT (80)
#define BUFFER_SIZE (400)
#define API_KEY "#########################"
ESP8266 wifi(Serial1); 
static Timer join_ap_timer;
static int8_t  join_ap_timer_id = -1;
static Timer tcp_timer;
static int8_t tcp_timer_id = -1;
static Timer read_uart_timer;
static int8_t read_uart_timer_id = -1;
static String state =  "Australia";
static String city = "Sydney";
String json_forecast = "";
char* forecast[]={"\"celsius\":","\"celsius\":","\"icon\":","\"avehumidity\":","\"celsius\":","\"celsius\":","\"icon\":","\"avehumidity\":"};
char* conds[]={"Date: ","\"weather\":","\"temp_c\":","\"relative_humidity\":","\"wind_dir\":","\"wind_kph\":"};
String weeks[7]={"Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"};
String rain="Drizzle, Rain, Snow, Snow Grains, Ice Crystals, Ice Pellets, Hail, Low Drifting Snow,Blowing Snow,Rain Mist,Rain Showers, Snow Showers, Snow Blowing Snow Mist, Ice Pellet Showers, Hail Showers, Small Hail Showers,Freezing Drizzle,Freezing Rain, Small Hail, chanceflurries,chancerain,chancesleet,chancesnow,sleet, rain, snow";
String thunde="Thunderstorm, Thunderstorms and Rain, Thunderstorms and Snow, Thunderstorms and Ice Pellets, Thunderstorms with Hail, Thunderstorms with Small Hail,chancetstorms, tstorms";
String sunny="Clear, Unknown Precipitation, Unknown, sunny, unknown";
String cloudy ="Overcast ,Mist, Fog, FogPatches, Smoke, VolcanicAsh, WidespreadDust,Sand, Haze, Spray, DustWhirls, Sandstorm, LowDrifting WidespreadDust, LowDriftingSand, BlowingWidespreadDust, BlowingSand, FreezingFog, PatchesofFog, ShallowFog, PartlyCloudy, MostlyCloudy, ScatteredClouds, Squalls, FunnelCloud,cloudy,flurries,fog,hazy, mostlycloudy, mostlysunny, partlycloudy, partlysunny";
typedef struct _forecast_data{
    String one_temp;
    String one_weather_type;
    String one_humi;
    String two_temp;
    String two_weather_type;
    String two_humi;

typedef struct _current_data {
    String week_time;
    String tom1;
    String tom2;
    String date;
    String temp;
    String weather_type;
    String hum;
    String wind;

forecast_datas forecast_data;
current_datas current_data;



Dave, I new realize that the 5" display is much higher resolution than the 4.3" units I have.  Any chance you can send me the original art (minus the lovely pics of the kids) so I can scale them accordingly?  Thanks!

Since I created it, I'll send you the original background. It's the only one you should need to scale. Can't send the others due to copyright.

Login or Signup to post a comment