ESP8266 network problem

Hi everyone, Now i try to connect my esp8266 to Blynk 2.0. After I upload the code, esp8266 do not show the same SSID name on the network. As you can see on the figure below, the correct SSID name is ‘‘Blynk Monitoring Energy Consumption-49F61’’, whereas show in network is ‘‘ESP-17D241’’.
Then i try to connect this network ‘‘ESP-17D241’’ in blynk app on my phone, but it fails.
I using Lolin new NodeMCU V3 microcontroller.

Here is my code.

// Fill-in information from your Blynk Template here
#define BLYNK_TEMPLATE_ID "TMPLZxyDHzLA"
#define BLYNK_DEVICE_NAME "Monitoring Energy Consumption"

#define BLYNK_FIRMWARE_VERSION        "0.1.0"

#define BLYNK_PRINT Serial
//#define BLYNK_DEBUG

#define APP_DEBUG

// Uncomment your board, or configure a custom board in Settings.h
//#define USE_SPARKFUN_BLYNK_BOARD
#define USE_NODE_MCU_BOARD
//#define USE_WITTY_CLOUD_BOARD
//#define USE_WEMOS_D1_MINI

#include "BlynkEdgent.h"
#include "EmonLib.h"

EnergyMonitor emon1;

int PinA= A0; //sct pins
float Power;
double Current;
float Energy = 0;
float Voltage = 240;
double noise1 = 0.26; //0.26
double noise2 = 0.36; //0.36

unsigned long lastmillis=millis();
long prevMillis=0;

void setup()
{
 Serial.begin(9600);
 emon1.current(PinA, 100);             // Current: input pin, calibration.
 
 BlynkEdgent.begin();
 delay (10000);

}


void loop()
{
   if (millis()-prevMillis>15000) // Every 5 seconds it measure the current
   {
     Current = emon1.calcIrms(5000);  // Calculate Irms only=1480
     double calcurrent=Current*0.7071;

   if (noise1<calcurrent<noise2)
  {
   calcurrent=0; 
  }
   Serial.print(calcurrent,4);             // Irms
   Serial.println("A");
   Power = calcurrent*Voltage;
   Serial.print(Power,4);
   Serial.println("W");// Apparent power
   
   Energy = Energy + Power*(millis()-lastmillis)/36000000000.0;
   Serial.print(Energy,5);
   Serial.println("kwh");
   lastmillis=millis();
   prevMillis=millis();
   Serial.println(" ");
   
   Blynk.virtualWrite(V0,calcurrent);
   Blynk.virtualWrite(V1,Power);
   Blynk.virtualWrite(V2,Energy);
   
   BlynkEdgent.run();
   }
}

Please edit your post and add triple backticks ( ``` ) before and after your sketch.

Sorry Sir, I already edit my post

That’s too long for an ESP8266 SSID name. I think the limit is 32 characters.

Pete.

Thank you Pete, Its works after I reduce SSID name. Thanks again sir

1 Like