New Blynk Library v0.5.1 is Released (important for local server owners)

Even as simple as Blink Sketch was ended the same:


// the setup function runs once when you press reset or power the board
void setup() {
  // initialize digital pin LED_BUILTIN as an output.
  pinMode(2, OUTPUT);

// the loop function runs over and over again forever
void loop() {
  digitalWrite(2, HIGH);   // turn the LED on (HIGH is the voltage level)
  delay(500);                       // wait for a second
  digitalWrite(2, LOW);    // turn the LED off by making the voltage LOW
  delay(500);                       // wait for a second

FYI: I’m using ESP 8266-12E, and tried several circuits and ended the same … fortunately the system is running well … :slight_smile: Just worried maybe causing a long term problem …

I am completely confused from this discussion.
What is changed? I think, new sketch use port 8080 instead of port 8442.
That’s all. Or are there also any other changes?
Why I should add this port forwarding to the Blynk server:
sudo iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-port 8080

What has port 80 to do with 8080 or 8442 ? Many people use port 80 for HTTP server. It is not possible to forward it to 8080.

@cj190133 with latest firmware default port is 80 unless you change it. So if you owner of local server you have to do port forwarding as local server uses 8080 by default (as 80 port requires root right). That’s it. For those who uses Blynk cloud you have nothing to worry about.

Hi Dmitriy,
thank you for answer.
I use my own Blynk server and currently I am using following command in sketch:
Blynk.begin(auth, server_ip, 8442, arduino_ip, dns_ip, gateway_ip, subnet_mask, arduino_mac);

After update Blynk Library to 0.5.1 I can use following command:
Blynk.begin(auth, server_ip, 8080, arduino_ip, dns_ip, gateway_ip, subnet_mask, arduino_mac);
I am right ?

Which port is preffered for hardware on local Blynk server in the future ?
Best Regards



Does the SSL hardware connection still work on port 8441 by default?

Yes. This part is unchanged for now. However, in future we plan to move this to 8443/443 as well.

@Dmitriy, after upgrading from 0.5.0 to 0.5.1, i observed that the device type changed from “esp8266” to “arduino”. this could be because of some changes in the new library? or why is it so?

anyone else observed this? please look at the terminal line 3 and last.

I had simular (un-responded to) issue here that was “resolved” by changing the device in my IDE.

I think the library’s board detection routines are a little off at times :wink:

well, i also updated the esp core from 2.4.0-rc2 to 2.4.0 maybe that has something to do with this?
i always select “generic esp8266” board in menu.

up to now the blynk always displayed the correct device… will do more investigation tomorrow.

@vshymanskyy should know better.

That’s OK, “fixed”!
It looks like hardware calls use the same port as RESTful api.
I was wondering is there any way to “ping” the local server via REST?

Best Regards

Sure, YOu may do any request and parse the answer.

Sure i can. i’m already using REST to exchange data between my hardware, server and app.
The weird thing with REST is that while exchange of data is normal, there is an “Offline” indication in the application.
There should be some kind of “ping” from the hardware to the server periodically, informing that hardware is alive.
This is missing from REST. I was wondering if there is a way to implement it.

Http is http. Hardware is hardware. How pinging http should affect hardware?

If your hardware is offline than this is the correct thing.

Not necessarily :wink: OP said “that while exchange of data is normal”

@Gunner I saw it. Ticket created.

1 Like

OK, thanks.

Ok, I give up. I can not get the new library 5.1 to work not matter what I try.

sudo iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-port 8080 Causes raspberry pi 3 to freeze

#define BLYNK_DEFAULT_PORT 8080 // does not work.

Blynk.config(auth_local_server, local_server, 8080); // does not work.

Or make port forwarding from 80 to 8080. // is not available because I have a web server.

I see these statements. They conflict me.
----- @cj190133 with latest firmware default port is 80 unless you change it.
----- 8080 now is the default port for hardware on the Local Server.

I done a port forward of 8080 to the pi server ( Blynk server) . // does not work.

I’m just going to go back to library 5.0 until we get finished monkey-ing with all the ports

Try to define it directly inside BlynkConfig.h

It worked for me. :slight_smile: (although different port)

edit: this #define doesn’t work in sketch (for me), as it is overwritten by lib. It might be, the compiler must know you want to use local server (another #define?)