Blynk library 1.3.2 for Particle not compiling

I am updating a Particle device and created a new project in Workbench. Using a working .ino file but using the latest Blynk library I get this error on compile.

c:/Particlefirmware/Greenhousever3/lib/blynk/src/Blynk/BlynkApi.h:39:6: error: #error "Please specify your BLYNK_TEMPLATE_ID and BLYNK_TEMPLATE_NAME"
   39 |     #error "Please specify your BLYNK_TEMPLATE_ID and BLYNK_TEMPLATE_NAME"

If I do a local compile using the old version 1.1.0 it compiles fine. Looking at Github I saw nothing stating changes needed. Moving the Blynk template and name after the Blynk.h include statement didn’t help.

I’d start by posting your code. Replace your actual template ID and Auth token with the word “REDACTED”.


My code is quite long and it works on 1.1.0. Below is Blynk related portions:

#define BLYNK_TEMPLATE_ID "Redacted"

#define BLYNK_DEVICE_NAME "Redacted"

#include "blynk.h"

#include "adafruit-sht31.h"

#include "LiquidCrystal_I2C_Spark.h"


void setup(void)

Blynk.config("AUTH redacted"); // in place of Blynk.begin(auth, ssid, pass);

Change this to #define BLYNK_TEMPLATE_NAME "Redacted" as it says in the error message and it will fix the problem.

TBH, it’s far better practice to copy the three lines of configuration code from the device screen in the web console and use BLYNK_AUTH_TOKEN throughout.


Yes that did fix it. I have always copied from the web console but I suspect this is leftovers from the early beta days of the new version of Blynk. BLYNK_AUTH_TOKEN wouId not compile at all either in the early days. I looked at a recent file when I was doing some testing of a spare controller of the same code and it showed the new format and had compiled but I didn’t notice the change. Thanks for your help Pete.

I said rather more than that, because you obviously haven’t taken the approach I advocated in this sketch.


Or maybe I had thought I had done what you had said but misunderstood. Sometimes things you say come off harsh for people like me that aren’t good at this.

You’re free to ignore any and all of the advice I, or anyone else, gives you.

Happy to refrain from advising in future if you wish?