Blynk 2.0 - Getting no data from board

Are you saying that you can’t find teh setting, or that it’s not turned on ?..

I suspect that this is connected to the fact that you haven’t selected a board type here:

Are you seeing other output in your serial monitor, when the board boots and connects to Blynk?

Pete.

Thanks Pete! :slight_smile:

Can you tell me how the “Invalidate” in setting work?

Witch board should i choose when i use Wemos D1 Mini?

In serial monitor i can se the temp is showing (with a zero in between readings). But all seems to connect to server regards to the board.

That’s a tricky one. There have been some recent changes that havent been released yet.
If you replaced your settings.h file with the one from here:

and added:
#define USE_WEMOS_D1_MINI to the list of board types then it should fix it.

I thought that previously you were seeing these zeros in the web dashboard or app, not in the serial monitor. Seeing zeros in the serial monitor won’t be because of data invalidation, it’s probably because you are reading the sensor too often.

Pete.

Thank you wery mutch.

I will try your advices later to day :slight_smile:

I have tried that settings.h file you linked to now, and that give me an error when compiling. Se screenshot.

But when i activated the NodeNMCU board in code the relay turns on when i give Wemos D1 Mini power. I doesent work with the switch, but the relay turned on and the led blinked.

And when i activated Sparkfun board in code the temperature shows without “0”. But still, the relay does not respond with that board activated.

So it must have something to do with the code?

What a big mess this is going to be when i start to convert my other devices, include my garage door opener,…

Okay, you probably need to take all the files for that Edgent example, and drop your code in to it.

I guess it depends if you want all of the Edgent dynamic provisioning and Blynk.Air features.
If not then it’s much simpler if you go for the non-dynamic provisioning route by adding-in your template ID and name to your own sketch and changing any code that uses Notifications, Time Input etc.

Pete.

Thanks :slight_smile:

I will try that.

But for the other units i have i think i do what you says about non-dynamic. I just not interested in Blynk dashboard etc. I have only used the app before, and i guess it is that i like best.

You can still use the dashboard with non-dynamic provisioning.

Pete.

Okay. I do not think i fully understand how all that works regard to “provisioning” etc. I wish i just could use my old code. Instead i have to use ALOT of time to recode all my units.

You can, as I said before…

Pete.

What exactly do i need to change regards to notification and time input?

You need to read some of the other topics that are discussing these issues, along with the documentation.

Pete.

1 Like

I have now changed all the files you linked to over and i get following error message when i try to compile.

Her is my last code:

// Fill-in information from your Blynk Template here
#define BLYNK_TEMPLATE_ID "TMPLIShmvdz8"
#define BLYNK_DEVICE_NAME "Basement Heater"

#define BLYNK_FIRMWARE_VERSION        "0.1.0"

#define BLYNK_PRINT Serial
//#define BLYNK_DEBUG

#define APP_DEBUG

// Uncomment your board, or configure a custom board in Settings.h
//#define USE_SPARKFUN_BLYNK_BOARD
//#define USE_NODE_MCU_BOARD
//#define USE_WITTY_CLOUD_BOARD
#define USE_WEMOS_D1_MINI

#include "BlynkEdgent.h"

#include <OneWire.h>
#include <DallasTemperature.h>
#define ONE_WIRE_BUS 14

OneWire oneWire(ONE_WIRE_BUS);
DallasTemperature sensors(&oneWire);

int relayPin = 15;
int onLED = 12;
int buttonState;


BlynkTimer timer_1;

void setup()
{
  Serial.begin(115200);
  delay(100);
  pinMode(relayPin, OUTPUT);
  pinMode(onLED, OUTPUT);
  timer_1.setInterval(2000L, temp);

  BlynkEdgent.begin();
}

BLYNK_CONNECTED() {
  Blynk.syncAll();
}

void emergencyOFF() {
  Blynk.virtualWrite(V1, LOW);
  digitalWrite(relayPin, LOW);
  digitalWrite(onLED, LOW);
}

void temp()
 {
  sensors.requestTemperatures();
  float reading =sensors.getTempCByIndex(0);

  Serial.print("Temperatur: ");
  Serial.println(reading );
  Blynk.virtualWrite(V2, reading);  

  if (reading  > 60)
 {
    emergencyOFF();
  }
  else {
    Blynk.virtualWrite(V3, "  ");
  }
 }

BLYNK_WRITE(V1) {
  buttonState = param.asInt();

  if (buttonState == 1) {
    digitalWrite(relayPin, HIGH);
    digitalWrite(onLED, HIGH);
    Serial.println("Relay OFF");
  }
  else {
    digitalWrite(relayPin, LOW);
    digitalWrite(onLED, LOW);
    Serial.println("Relay ON");
  }
}

void loop() {
  BlynkEdgent.run();
  timer_1.run();
}

Have you installed the complete library from the GitHub page?

Pete.

Can you please give me a direct link to the complete library?

I have installed the code inn all the files from the link you gave me, yes.

Pete.