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

Dave, the icons are too large to scale to the 4.3" display since the resolution is half of the 5" display.  I'll go fishing for some icons.

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)



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

 

 

 

txt
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 "api.wunderground.com"
#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;
}forecast_datas;

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

forecast_datas forecast_data;
current_datas current_data;

 Thanks,

-Barry

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.

Login or Signup to post a comment