How to get Blynk running on OpenWrt?

After creating a new project and renewing the auth token, the latest example goes fine.

1 Like

For some reason I cannot connect the lua script with the local, private server. I get once and again the message,

Connecting Blynk (secure)...
Invalid auth token
Disconnected.

The project is seen on the server, but the client does not connect.

I think this a different topic.
Invalid token means server doesn’t know anything about it.
Does Arduino with the same token work?

I am not using Arduino but a mere OpenWRT router. Lua script is called from command line like this,

lua ./client.lua <here_goes_the_full_token>

The auth token is the same the one being on the server.

I think you’re missing something. It still works with public cloud? Same rules apply as for other hardware. Please start a different topic for local server connection issues.
Did you try plain TCP connection?

No. How?

The example sketch contains all the connection code

By mistake, I have been editing a script and launching a wrong one. Both ssl and tcp connections do work right. Just my fault.

To use ssl connection set

local use_ssl, ssl = pcall(require, "ssl")

and for tcp connection

local use_ssl, ssl = pcall(require, "tcp")

Easy as a pie, but keep in mind that it will only work if changes are made to the exactly same script to be run. :blush:

1 Like

I think it was obvious you need just set it to false :wink:
No need to change require('ssl')