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

In this release

  • New hardware support:
    • TI CC3220 (Energia IDE)
  • General improvements
    • Blynk switched to using port 80 by default. :tada:
    • Certificates added for easier switching from Blynk Cloud to Let’s Encrypt
    • Add setMin & setMax to widgets
  • Bugfixes:
    • Fix pinMode command
    • Fix ESP32 WiFi credentials provisioning

PlatformIO, Particle, ARM mbed and OpenWRT packages have been updated accordingly.
Full list of supported hardware is available here

NOTE: if you have local server and uploaded new firmware, you need to add addtional port forwarding:

sudo iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-port 8080

or add to sketch:

#define BLYNK_DEFAULT_PORT 8080

or

Blynk.config(auth_local_server, local_server, 8080);

8080 now is the default port for hardware on the Local Server.

Grab the update here: https://github.com/blynkkk/blynk-library/releases/latest
:star2: BTW, if you like Blynk, don’t forget to give us a github star! :star2:

9 Likes

hi @Dmitriy

I installed v0.5.1 (i am using local server v0.32.0 on windows 10).
I included #define BLYNK_DEFAULT_PORT 8080 and re-compiled but my sketch no longers connects :frowning:
My port forwarding setup which was working without a hitch when using v0.50.0 is below - it now no longer works with v0.50.1. Any guidance would be highly appreciated.

what do i change here?

180221_portforwarddetails

thanks!

Hmmm… OK, so just over 8 hours ago, I had upgraded to 0.5.1 and Local Server 0.30.0 … before this latest “addendum”… and everything was working.

But, just to be safe, I just ran that iptables command anyhow on my server and rebooted… and no surprise, everything is still working…

So, I guess I shouldn’t worry about what isn’t broken :stuck_out_tongue: but out of curiosity, what has changed that required the addendum as it appears to have affected some users and not others… inquiring minds what to know why :smiley:

And finally, can you clarify this statement.

Does that mean in the hardware sketches we should NOT be using 8442 anymore?? I mean, it stiill works for me…

Blynk.begin(auth, wifi, ssid, pass, server, 8442);

PS, for other users benefits… this is what I have set for my Blynk port forwarding and everything seems fine.

image

As usually old sketches will work and connected to old 8442 port. All new sketches will connect to 80 port. Thus local server can’t run on 80 port without root rights, you either have to do port forwarding or connect directly to port 8080 or 8442 (not recomended, as it will be dropped soon).

Please try to move DEFINE before/after include section.

Server can run on port 80 but port 80 is used for other service on router. So port 80 is not possible to use for fort forwarding. Is possible to use in sketch #define BLYNK_DEFAULT_PORT 8080 or Blynk.begin(auth, wifi, ssid, pass, server, 8080) then we can forward 8080 -> 80

is there any different between 8442 and 80 on local server? i mean, could i use Blynk.begin(auth, wifi, ssid, pass, server, 8442) or #define BLYNK_DEFAULT_PORT 8442 and forward 8442 to 80 ? then all skechtes will use same port, old one 8442 by default, new one 8442 because -> #define BLYNK_DEFAULT_PORT 8442

@Robot from above post

8080 now is the default port for hardware on the Local Server.

Your hardware now should connect to 8080 port. Port forwarding is needed only when you leave default port in sketch as 80. 8442 will be dropped in next server versions. Of course for deployed hardware you still may do port forwarding from 8442 to 8080.

@Dmitriy
Do we have to modify server.properties as well,?
Or the 8442 line remains untouched there?

No need.

Correct. But I recommend to switch hardware to 8080 port as 8442 port will be dropped in next server updates.

Ok. Thank you. I will edit server.properties

No need. Server already uses both 8442 and 8080 for hardware. You only need to update your sketch to use 8080. Or make port forwarding from 80 to 8080.

Hi @Dmitry I trying to get my head around this and get a clearer picture

Two questions:

  1. My hardware sketch uses port 9443 as part of Blynk connect command…I assume that would mean the hardware sketch will try to initiate a session over the internet to my local blynk server using port 9443 (https) … this works today for me [do I have this logic correct ?]
  2. By moving to 0.5.1 it does not work any longer. I’m trying to understand how does the 8080 change effect my situation from point 1.

Did you change server.properties?

nope. just did update from v0.5.0 to v0.5.1 and re-compile.

Than it is impossible you have 9443 for hardware.

apology - perhaps I’m not doing a good job in explaining myself.
Here is the extract on my server.properties file:


#hardware ssl port
hardware.ssl.port=8441

#hardware plain tcp/ip port
hardware.default.port=8442

#http port MY note default is 8080]
http.port=8080

#web sockets ssl port
ssl.websocket.port=8081
#web sockets plain tcp port
tcp.websocket.port=8082


#https port My note default is 9443
https.port=9443

#application ssl port
app.ssl.port=8443

Yeah. But we are talking about hardware. "My hardware sketch uses port 9443 "

so hard to understand this…

what do we have to change!?!?!

literally - is this all we have to do? either of these?

why would you do the sketch based one?

i have more than 10 hardware running off my local server - surely the server based update is best fo rme?