Connecting NodeMCU with Blynk app

I am trying to integrate nodemcu with Blynk app. In the app I have configured node mcu and trying tp connect. Serial monitor show the ip address. router is recording ip address.

I have tested Node mcu with example code and its working fine. Same thing if i do client application it will work.Currently i dont have internet connectivity ,just connecting to wifi and posted my authorization code.

It will popup window something went wrong .error msg shown below

My testing code.Here i have not posted my authorization code simply posted last digit

![code2|690x387]

Screenshot_20180721-095101|281x500

#define BLYNK_PRINT Serial


#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>

// You should get Auth Token in the Blynk App.
char auth[] = "xxxxxxxxxxxxxx9960";
 
// Your WiFi credentials.
// Set password to "" for open networks.
char ssid[] = "esp8266";
char pass[] = "Test123456";

void setup()
{
  // Debug console
  Serial.begin(115200);

  Blynk.begin(auth, ssid, pass);
}

void loop()
{
  Blynk.run();
}

it seems Blynk server isn’t reachable.
did you try to ping blynk server?
do you have a firewall ?

If you don’t use a local server but try to connect to the server on the internet without being connected to the internet it will not work - no surprise :wink:

yes i tried . if i ping 192.168.1.2 it wil respond.

weather software blynk wont work on local server. without internet connection.
i have tested device using local server with same ip 192.168.1.2 its working . if i use blynk library and connected to common router local web server must work right.

Without internet connectivity how can i test nodemcu unit using local server??

Need to try this

Yes, that is it. Quickest way to test is to run it from a Windows PC for testing if you don’t have something like a RasPi available.

maybe blynk local server could run if there is only WiFi but the gateway must be online and DHCP running.
to try …

@Blynk_Coeur: No need for a gateway if you don’t want to go to the internet. Server, App and nodemcu are in the same IP subnet. The minimum needed is a PC/Laptop and a small “router” that has Wifi.

I’ve tested a setup like this with a small 3G access point with no SIM card in it - i.e. not internet connection.
In its config I only had to allow the connected device to communicate internally.

yes , only in that case, but router is needed.

I am testing same method. I have already tested dht11 and other with nodemcu using local Web server using client app. But I can’t able to connect using blynk app. I don’t have Internet connection but just using laptop nodemcu WiFi router. And connected locally

@ajitnayak87: Is the local server configured in your app in the server settings ?

Given. But that is the scenario we are talking about … :wink:

Currently I am trying simple evirtual led using
Blynk software. I have configured like shown in example. Only there is no where mention about Internet connectivity. So I am facing this issue. Like I share you tube video I need to test it out.

I have tested nodemcu with local server without Internet using client application. But I can’t able to connect locally using blynk.

It’s entirely possible to run local server without an Internet connection. In fact, you can do it without a router, wireless access point etc if you wish. See this topic:

@ajitnayak87 if you want others to help you with your problem then your communication needs to be much clearer and more detailed. You need to explain your network architecture in detail, and show how you’ve set-up your app, including which port you’ve chosen in your app configuration.

Pete.

2 Likes

Blynk consists of three parts, The App, the Server and the MCU (Arduino, ESP, RPi (as client), etc.) that runs the Blynk Library & script. All three must communicate together, via a network.

APPnetwork/internetSERVER (Cloud or Local)network/InternetMCU

If the server used is the default Cloud Server, then that requires the internet. However you can install a Local Server on a PC or Linux device like a Raspberry Pi (as server), and then run everything on an internal network.

1 Like

Just did a test with local server running on my Windows PC. App and ESP-01 connected to a LAN/Wifi router with the PC in the same IP subnet. Working 100% without problem.

On thing to consider:
For this test I simply start the server with

java -jar server-0.39.1.jar -dataFolder ./Blynk

Without using port forwarding on the server PC from port 80 to port 8080 or changes in the server.config
the IP port 8080 needs to be explicitly defined in Blynk.begin() as shown in the corresponding examples.

This does NOT work as the default port 80 is used:

Blynk.begin(auth, "WLANxxx", "PASSyyyy", IPAddress(192,168,2,10));

This does work:

Blynk.begin(auth, "WLANxxx", "PASSyyyy", IPAddress(192,168,2,10), 8080);

can you guide me in detial … how to add java sdk and What are things you applied to make work on local server

@ajitnayak87: The instruction on github is worth reading. :wink:

Sorry for my English. I may not communicate properly here .

I have Nodemcu Hardware -> Wifi router which are all connected to same network . I have blynk app connected to same network .

i would like to create a local server where i could develop APP that can communicate via app locally .

Local Webserver that can be used to view data locally . I am thinking of using Nodered for local web communication later use port forwarding

These plan to execute my project @ first level. Since i am new to this how can i go ahead here.

1)which Platfrom used to create own dashboard with local server
2) How can i create my own local server without connect internet. I tried following link . But facing issue while installation

If you can’t even get the local Blynk server setup to run without an internet connection then I think you’re being far too ambitious with your overall project.

Personally, I don’t see why you need a dashboard in addition to Blynk.

Pete.