BLYNK
HOME       📲 GETTING STARTED       📗 DOCS       ❓HELP CENTER       👉 SKETCH BUILDER

Blynk Project / App Sharing and Dynamic Provisioning


#1

Team,

With all the talk of Blynk.Inject, WifiManager and more recently AutoConnect, it’s time to revisit my Blynk Project / App Sharing and Dynamic Provisioning strategy. Here are my requirements …

  • I’d prefer a native Blynk solution. I’d prefer not to introduce something like WifiManager or AutoConnect. Or even the Arduino IDE for that matter. The solution should be simple and foolproof. The user shouldn’t know anything about auth tokens or Arduino libraries (or Arduino for that matter).

  • The solution must use the Blynk cloud (no local server).

  • I’d like to share my Blynk app, however, this isn’t an option unless I spend $249 on the Blynk Startup package. I’m willing to settle on sharing my Blynk project.

  • I need to share my NodeMCU 1.0 / ESP-12E compiled binary. I’m looking for the most simple and straightforward way of uploading a binary to a virgin NodeMCU. Downloading the Arduino IDE is not an option. I’m assuming the binary must be uploaded via USB (i.e., no OTA). Any suggestions? In the past, I’ve written a simple Windows program to upload a binary. You select a USB port and click “Go”. Nothing to configure. No upload speeds, flash sizes, CPU frequencies, board managers, … Any other ideas? Arduino has a Web Editor. However, even that requires you to install a browser plug-in.

  • I need to dynamically provision the NodeMCU with a SSID / password and Blynk auth token. I really like Blynk.Inject. The need for an auth token is hidden from the user. However, the dynamically-assigned auth token seems to be tied to the Blynk app preview. Is my understanding correct? If I need to modify the project and re-generate the app preview, previously assigned auth tokens are invalid. In this situation, I’ve hacked BlynkProtocol and BlynkProvisioning to automatically reset the SSID / password. The NodeMCU reverts to wi-fi Access Point (AP) mode. However, I must then manually re-add all of the devices using the Blynk Connection Wizard. Each device is dynamically assigned a new auth token. Has anyone figured out how to seamlessly re-associate an existing device (previously provisioned using Blynk.Inject) with a new Blynk app preview? How does Blynk.Faces work as part of the app preview? You can add multiple projects to the same app preview. However, does Blynk.Faces deliver on the marketing pitch?

Blynk.Faces™ is a powerful feature of Blynk that allows you to have a Master Project which controls all the changes in the published app. Any UI updates made in a Master Project are instantly reflected for all users.

  • Would Blynk.Faces allow me to update a project, re-generate the app preview and maintain the association with existing devices?

I’d greatly appreciate any help you can offer. I’ll continue to dig into the Blynk protocol and provisioning firmware and test different hacks, however, there’s no sense in reinventing the wheel if someone else has already developed a solution that satisfies these requirements.

Thank you in advance,

Joe


App standalone
#2

I am doing something similar as I work towards determining if jumping in with Blynk on the business side makes sense. Currently the costs are too high for my needs and my programming time is currently free…

First I will start by describing what I do for my family and friends devices and will refer them as customers.

  1. I create a project under my own account for every “customer” and then have them install the Blynk app and then share the project with them. This isn’t terribly scalable but it seems to work.

  2. Every device I make is based on the WeMos D1 mini on a custom board I designed and is shipped with a base firmware that has the ability to connect to wifi (configured using WiFiManager) with a set of instructions for the user.

  3. Once the device is up an running on WiFi it calls out to a webserver for it’s Auth Token. Since I create the projects I also create the authtokens and store them on the server. Each device uses a combination of it’s MAC address to uniquely identify itself and get the correct auth token.

  4. The device also looks for a firmware update on the same webserver and will let the user know if one is available (via a blynk widget) and the user can then request the update (using the terminal widget).

  5. What would be really handy is some generic software on both Android and iOS that could be used to configure the devices based on a known wifi AP they broadcast and I have seen some on Android but not on both so far.

I have about 6 different types of devices I provision in this way and it seems to work pretty good. If my customer base gets bigger though it will have to change as scalability is an issue but it needs to get to the point where the Blynk paid model works, right now it doesn’t.


#3

Thank you very much @DrDigital for taking the time to reply!

First let me start by answering one of my own questions, then I’ll address your reply.

Blynk.Faces seems to do exactly what I’m looking for and I don’t even need (nor want) to re-generate the app preview. Upon updating my project, I simply click on the Blynk.Faces icon,

and click on Blynk.Faces “Update Apps”,

Very nice!

We’re in the exact same boat.

I’ll refer to my family and friends as “testers”.

I hate to admit it, but I’m not very familiar with “sharing”. How do the multiple instances of the project differ? You can’t share the same project with multiple customers? Your Energy Balance is depleted with each new customer?

Same here. Custom board, only with NodeMCU 1.0 / ESP-12E. However, I’d prefer (at least initially) not to ship anything. I’d prefer to let my testers order cheap parts from China and assemble it themselves. The (unpopulated) custom board (only connectors and headers) costs $0.75 in quantities of ten (including shipping).

So all of the customers / devices reference your web server. Blynk assigns you a static auth token with each new instance of the project and you store them on the webserver. You customers don’t know the webserver even exists, correct? No separate app or UI for them to deal with.

I assume that’s an OTA update. That’s nice.

So what is it that you don’t like about Blynk.Inject? Again, I haven’t done my due diligence as it relates to sharing.

I think Blynk needs an “Incubator” business plan. They’d publish your app for a fixed fee. This fee should cover Blynk’s costs and yield a modest profit. Let’s assume $99.99 USD. The app would then be sold (downloaded) for a fixed fee. Let’s assume $9.99 USD. 100% of the profits from the sale of the app would go to Blynk. Again, this fee should cover Blynk’s costs and yield a modest profit. Let’s assume your app is downloaded 20 times in the first month. Of course, you’d stick with this Incubator business model. However, if you app is downloaded 50 times in the second month, you’d switch to the Blynk Startup business plan ($299 / month). 100% of the profits from the sale of the app would go to you. At some point, you may want to lower the price of your app or even give it away for free. You’d recoup the cost through the sale of your device. The Incubator business plan would allow aspiring Blynk developers to test the waters and it would grow the Blynk (paying) customer base.


#4

I like your ideas. However, the main problem here is that there is no easy way to “publish the app”. It can’t be automated and thus - scaled and price minimized. So publishing right now is semi-automatic update that require few man days.

The only way your model could be applied right now is - some kind of “business app” that will show specific UI by scanning some qr. In other words - some generic app that becomes “your” after some code or qr scan.


#5

@Dmitriy yes the only way this would work for both you and the small guys like us would be for there to be an app which is generic and therefore isn’t specific but can assist with provisioning and then display a view that we configure. Pretty close the generic blynk app but with an easier way to provision and deploy to users who don’t need to build the displays or configure it. Does that make sense?


#6

@wickedbeernut for me the issue is that Blynk.faces and Blynk.inject etc are on the monthly paid side of things starting at $249/mnth. Doesn’t make any financial sense for me given the low volume situation I am currently in as I only dabble…I think there is an inbetween model that could work though and that is something that may be interesting…the alternative is to essential mirror the type of functionality on my own in some way.


#7

Thank you for taking the time to reply, Dmitriy. Please understand I’m trying to make Blynk (more) successful (in addition to serving my own selfish needs).

I alluded to the Apple Developer Program in my Blynk Developer Program topic. This program allows developers to invite users to test their apps. A developer can invite up to 10,000 external users to test their app using only their E-mail address. Testers are prompted to install (one time) the TestFlight app from the App Store on their iOS device. How would the TestFlight app differ from the generic app you’re describing?


#8

Actually, Blynk.faces will cost you $599 / month. Blynk.Air $1,499 / month.


#9

@Dmitriy, Could you expand on this concept a little more.

I think many of us just starting out would be absolutely thrilled with the prospect of a generic, unbranded, Blynk business app. For $X, I could share my QR code N times? Is that the idea? Or maybe I’m only limited by the total number of devices associated with my QR code(s)?

Is it conceivable this generic app could support Blynk.Inject, Blynk.Faces and Blynk.Air?

From my perspective, Blynk.Inject is an absolute must. Static auth token provisioning is a non-starter.

I’d need some way of pushing or pulling UI updates. This could be Blynk.Faces, although I’d be content with having users scan a new QR code as long as auth tokens previously assigned (dynamically) using Blynk.Inject remain valid.

In the spirit of keeping the cost down,

  • I’m not sure “Multiple Products Support” is necessary. I’d be content with one “Face” per app (rather than Faces). I don’t see a need for multiple clients / projects per app. I’d just share a different QR code with each client, if necessary.
  • Blynk.Air (typically an Enterprise capability) would certainly be nice to have, but I could probably live without it.
  • I’m not sure a “Dedicated Business Cloud” is necessary, although you’re far more qualified to speak to that.

Why don’t we give this a shot? If your profits don’t increase, we pull the plug.

Joe