[SOLVED] Help hardware cant connect to local server

Hello everyone, i have problem trying to connect my arduino to local server, using arduino pro mini and esp8266 as shield. i’m so newbie with this. :smiley:

My blynk apps already login to local server , but notification show arduino not in network, and this is my code.
i’m stuck for 2 days to make it right, but nothing happend

#include <ESP8266.h>
#include <BlynkSimpleShieldEsp8266.h>
#include <SoftwareSerial.h>
#include <SimpleTimer.h>
#include <OneWire.h>
#include <DallasTemperature.h>
SimpleTimer timer;
#define ONE_WIRE_BUS 12
OneWire oneWire(ONE_WIRE_BUS);
DallasTemperature sensors(&oneWire);
SoftwareSerial EspSerial(2, 3); // RX, TX
ESP8266 wifi(EspSerial);

#define WIFI_SSID  "R101 Andrians.Net"
#define WIFI_PASS  "notonline123"

int LDR = A6;
int Moisture = A7;
int sensorLDR = 0;
int sensorMoisture = 0;
int merah = 4;
int biru = 8;
int selenoid = 13;
int buzzer = 9;
int Override = 6;
int buttonPin = 10;
int tombol = 0;
int welcome = 0;

char auth[] = "02bb3311430d49df8237dfe6d51bb46f";
char server[] = "";
char port[] = "8442";

WidgetLED led1(2);
WidgetLED led2(3);
WidgetLED led3(4);
WidgetLED led4(5);
WidgetLCD lcd(10);

void setup()
  Serial.begin(9600);     // Set console baud rate
  EspSerial.begin(9600);  // Set ESP8266 baud rate
  pinMode(13, OUTPUT);
  pinMode(4, OUTPUT);
  pinMode(8, OUTPUT);
  pinMode(9, OUTPUT);
  pinMode(6, OUTPUT);
  pinMode(7, OUTPUT);
  pinMode(buttonPin, INPUT);
  pinMode(LDR, INPUT);
  pinMode(Moisture, INPUT);
  digitalWrite(buzzer, HIGH);
  Blynk.connectWiFi(WIFI_SSID, WIFI_PASS) ;
  Blynk.config(auth, server, port);
 //. Blynk.begin(AUTH_TOKEN, wifi, WIFI_SSID, WIFI_PASS);
// Blynk.begin(auth,"R101 Andrians.Net", "notonline123");
  timer.setInterval(5000L, ldr);
  timer.setInterval(2000L, moisture);
  timer.setInterval(10000L, sendUptime);
  timer.setInterval(6000L, suhu);
  //timer.setInterval(6000L, temp,light, humid);
void loop()
  digitalWrite(merah, HIGH);
 // String temp =String(value_temp);// turn integer to string
  //String light= String(value_light);// turn integer to string
  //String humid=String(value_humid);// turn integer to string

Hi. Please double check :

  1. Make sure your app connected to local server;
  2. Make sure hardware connecting to same host as application;
  3. Try to run simple blynk sketch with no additional code;
  4. Logs from local server would be nice also, most probably you’ll find answers ther by yourself
1 Like

Should be

Blynk.connectWiFi(WIFI_SSID, WIFI_PASS, "Your Server IP Address")
1 Like

Try this as a simple example, for your setup:

#include <ESP8266.h>
#include <SPI.h>
#include <BlynkSimpleShieldEsp8266.h>

// Set ESP8266 Serial object
#define EspSerial Serial

ESP8266 wifi(EspSerial);

//Local Blynk server
char auth[] = "8ef75xxx";

void setup()
  EspSerial.begin(115200);  // Set ESP8266 baud rate
  Blynk.begin(auth, wifi, "SSID", "PSK", "Local Server Ip");

void loop()
1 Like

yeah, next time, i will double check that , haha… :smile:.
i jump step 3 and dont run simple blynk skecth, and now everything its work .
thanks for the blynk and the response for my problem.

i’m trying ur simple example and now everything its working . thanks alot for ur solution . :grinning:

1 Like

Hi Robbo_SA,
I did all steps and it doesn’t work with my Local Server, with the external server (after remove the “Local Server IP”, obtain a new Auth Token…) it works fine but I want to use my Local Server already running with other Arduinos.
My app connects the Local Server
I’m running the simple blynk sketch without extra code.

I’m using the Blynk library v0.3.0…
I think It should be the way the Local Server IP is defined… the code couldn’t be more simple…
My set up is: Blynk.begin(auth, wifi, “SSID”, “PSK”, “Local Server Ip”);
Do I have to change something??

Thanks in advance!!!

Bobbo_SA i need your help. I have a esp8266evb. I just want to switch on and off the led by using blynk app. Can you help me to do it step by step. I instaled and app and added the buton. As well all is intalled in arduino ide. Thank you

thanks man I was also not able connect my hardware with the server but now everything is working

@kartik13 This is a very old topic you are replying to :wink: please make note of the timedate stamps before posting.

The directions for connecting to Local Server are in the Server Documentation.