Manual Device Activation
Manual device creation can be used with any device supported by Blynk no matter which type of connection they use.
Such workflow is mostly used during prototyping or for devices that don't require end-user activation.
Let's guide you on how to do it!

Preparing your sketch

    1.
    Install the latest version of Blynk Library to the IDE you use
    2.
    After that, you should see Blynk folder under the File > Examples
    3.
    Select the example for the hardware you use. We will use the one for Arduino UNO + Ethernet shield
1
#define BLYNK_PRINT Serial
2
#define BLYNK_TEMPLATE_ID "TMPLXtg6ltzI"
3
#define BLYNK_DEVICE_NAME "Test"
4
#include <BlynkSimpleEsp32.h>
5
char auth[] = "1jIajShg30JO-QQZmlWf1NjdH5FNi2wW";
6
void setup()
7
{
8
Serial.begin(115200);
9
Blynk.begin(auth, "wifi-ssid", "wifi-pass");
10
}
11
void loop()
12
{
13
Blynk.run();
14
}
Copied!
Pay attention to these 4 lines: you would need to fill them.
1
...
2
#define BLYNK_TEMPLATE_ID ""
3
#define BLYNK_DEVICE_NAME ""
4
...
5
char auth[] = "YourAuthToken";
6
...
7
Blynk.begin(auth, "wifi-ssid", "wifi-pass");
Copied!

Getting Template ID and Auth Token for device

Template ID and Device Name

    1.
    Log in to your Blynk.Console developer account
    2.
    If you don't have a Device Templates -> Create New Template or open an existing one
    3.
    Copy the contents of this section and paste them to your sketch
Template ID

Getting Auth Token

When the Template is ready, go to Search -> Devices - Create New Device
Choose a Template and give your new device a name
After the device was created, you will get the notification with TemplateID and AuthToken. Also, this info is always available in Device View -> Device Info
AuthToken
Now you have all the information you need to update your sketch:
1
#define BLYNK_PRINT Serial
2
#define BLYNK_TEMPLATE_ID "TMPLbu8•••••"
3
#define BLYNK_DEVICE_NAME "My First Device 01"
4
#include <BlynkSimpleEsp32.h>
5
char auth[] = "••••••••••••••VoFvaUOH2U_sI";
6
void setup()
7
{
8
Serial.begin(115200);
9
Blynk.begin(auth, "your_wifi-ssid", "your_wifi-pass");
10
}
11
void loop()
12
{
13
Blynk.run();
14
}
Copied!
Upload the sketch to your device and open Serial Monitor. Wait until you see something like this:
1
Blynk v.X.X.X
2
Your IP is 192.168.0.11
3
Connecting to...
4
Ready (ping: 40ms)
Copied!

Congrats! Your device is now online!

Last modified 1mo ago