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

Issues with migrating my Particle platform devices to new Blynk

Hi all,

I have an existing product for a few years now intended to be connected to smartmeters that measure power consumption in homes. This platform uses Particle Photon devices in combination with Blynk. This product has worked with Blynk legacy for a few years now.
I’ve started a new iteration to attempt to migrate to Blynk IoT, yet immediately run into an issue that code blocks on a Blynk call and it doesn’t connect to your servers. I haven’t managed to debug it successfully yet myself.

Hardware

  1. Particle Photons with latest stable firmware 2.1

Firmware and other configurations

  1. Blynk library, as included in the Particle IDE under community libraries, version 1.0
  2. As I read on Blynk webpage, I need to use static provisioning for Photons. Which is fine.
  3. Device configured in Web IDE as follows (see picture)
  4. I stripped firmware to the minimum below.
  5. The Photon successfully connects to the internet, where provisioning of WiFi credentials is done through the Particle App.

The issue
The firmware blocks runtime on Blynk.begin(). If I remove the call, firmware runs normally

Can you help me point in the right direction or how to debug?


// This #include statement was automatically added by the Particle IDE.
#include <blynk.h>

#define BLYNK_PRINT Serial
#define BLYNK_DEBUG
#define BLYNK_TEMPLATE_ID "TMPLcMME7Hxk"
#define BLYNK_DEVICE_NAME "SmartmeterReader"
char auth[] = "----------------------------LqjR";


void setup() {
    Serial.begin(9600);
    while(!Serial){
        delay(10);
    }
    Particle.publish("INFO","I'm online and connected to Particle web servers.");
    Serial.println("Booted. Configuring Blynk...");
    Blynk.begin(auth);
    Serial.println("Booted. Blynk configured...");
}

void loop() {
    Blynk.run();
    delay(500);
    Serial.println("Firmware is running");
    Particle.publish("INFO","Device is online and connected to Particle server");
}

ConfiguringBlynk

Try this:
The Template ID and Device Name should be on top of your code
Also don’t use delay in loop.

Thanks for your reply.
However, I added DEBUG lines to top because it’s instructed here: Debug - Blynk Documentation

I did change it, and removed delay in loop. This makes no difference; it stays blocking on the call in Setup

Can anyone support?
I have 34 Particle devices deployed that I like to migrate.

Perhaps debug on your end whether the (new) Blynk IoT works with the Particle platform? It should be very simple to reproduce the problem.