How to get Blynk running on OpenWrt?

An integrated solution would be nice. Like on the Pi platform. Running both client and server on one device.

Pi has an issue with SD card getting corrupted after some time , if no option to use Openwrt router.
i will install it on my Old case which is running as NAS

After initial SD card boot run Blynk on a USB or external hard drive?

Or get a specialized read/write SD card. They cost a bit more, but they are better than cheap crap from China :wink:

Do you have a source / url for the special cards @Lichtsignaal ?

No, not really, but I see companies like HPE use them for their vmware servers. I have a couple of those. The ones I have are really rotten expensive, like 50 euro’s each, but that’s retail price.

@valent @DJ_Wever @scropion86 @Lichtsignaal @Costas, check this out: https://github.com/vshymanskyy/blynk-library-openwrt

I didn’t test it on real hardware yet, but will do soon.

Did you finally test it on real hardware?

Yes it was tested

BTW, OpenWRT has Lua by default, maybe the Lua protocol implementation can be ported to OpenWRT… - that would be awesome!

I took a glance at Lua for OpenWRT, and unfortunately it doesn’t support creating tcp/ssl connections out of the box.
What a disappointment…

P.S. I may be wrong here - just found that luasocket and luasec are available from opkg

In addition to luasec and luasocket there is also a package called lua-openssl.

@raphik you look to have some experience with this. Between luasec and lua-openssl, which one is better?

Actually I have no experience, but it seems that luasec integrates well with luasocket.

@raphik I was able to create a Lua script that runs fluently on OpenWrt.
I’m planning to publish it soon. Would you be willing to test it?

2 Likes

do you think it could run on a lynksys wrt54gs?
I’m not sure, but I think it could run on a dlink NAS DNS320

@Blynk_Coeur if you can install lua (which should be there already if you have LuCI), luasocket and luasec packages - it should work

thank you Volodymyr ,

and what about DNS320 NAS witch has java 8 installed ?

Here is an example on how to run a Blynk client with Lua: https://github.com/vshymanskyy/blynk-library-lua
It was tested on OpenWrt and Ubuntu Linux.

1 Like

@Blynk_Coeur I’m talking about Blynk client.
The server should work with all the hardware, that is capable of running the latest Java Runtime.

Running a client was a pain for OpenWrt, as it required:

  • Node.js, Python (which aren’t welcome on most routers)
  • or C++ (required advanced skills and recompiling your code every time).

Now with the Lua library, you can easily install it and develop your scripts.
Hope that helps!

1 Like