Google sheet doesn't show temperature value, is anything missing in the sketch/Blynk?

Hi,

Problem Statement:
I can see temperature data in the super chart of Blynk app without any issue, now I am using Blynk Webhook Button + IFTTT Webhooks to write DS18b20 temperature into google spreadsheet, only shows time stamp in column 1 & event name (Temperature) in column 2, it’s supposed to be shown temperature value in column 3, but somehow it’s missing, see screenshots below, please.

Devices:

  1. Nodemcu ESP8266 V3
  2. DS18b20, one wire digital temperature probe

IFTTT Webhooks Configuration:
Event Name:Temperature
Formatted row: {{OccurredAt}} ||| {{EventName}} ||| {{Value1}}

Blynk Webhooks URL:
https://maker.ifttt.com/trigger/Temperature/with/key/---Key---

Sketch:

#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>
#include <OneWire.h>
#include <DallasTemperature.h>
#include <TimeLib.h>
#include <SimpleTimer.h>
#define ONE_WIRE_BUS D3 //Pin to which is attached a temperature sensor
OneWire oneWire(ONE_WIRE_BUS);
DallasTemperature sensors(&oneWire);
char auth[] = "Blynk Token Here";
SimpleTimer timer;
BLYNK_WRITE(V0)
{
Serial.println("WebHook data:");
Serial.println(param.asStr());
}
void setup()
{
Serial.begin(9600);
Blynk.begin(auth, "SSID", "Password");
sensors.begin();
timer.setInterval(10000L, sendTemps); // Temperature sensor polling interval (10000L = 10 seconds)
}
void sendTemps()
{
sensors.requestTemperatures(); // Polls the sensors
float Refrigerator = sensors.getTempCByIndex(0); // Gets first probe on wire
Blynk.virtualWrite(1, Refrigerator);
}
void loop()
{
Blynk.run();
timer.run();
}

I have never been playing with this widget (take it into consideration) but I’m wondering how you are feeding the Virtual pin related webhook.
I can see “Blynk.virtualWrite(1, Refrigerator);” where I think it should be “Blynk.virtualWrite(0, Refrigerator);”
Can you test it? Not sure obviously…

Thanks for reply, I did the test, but it doesn’t work, still got nothing in column 3.
^.^

@Zephyr is Blynk and Serial Monitor showing the correct data?

Blynk is showing correct temperature value, but the serial monitor only shows the following data, see screenshot, please.

But… Where is the link between Vpin 0 and Vpin 1?

Hi psoro,

I am totally newbie for that, would you please kindly help me out with the link?
Thank you so much.

I’m sorry @Zephyr but I have no idea… As I said, I have never been playing with webhook… :sweat_smile:
If I have time enough, I’ll play a little bit.

Thanks for taking good care of this thread, I appreciate it. ^.^

Presumably you have an api key in the url but you also need /pin/ for the actual temperature.
Precisely where the /pin/ goes within the url will depend on the required syntax of the applet.

OP should be sending temperature to Vpin0, not Vpin1.

I tried /pin/ or /pin0/ or /pin1/, all show “Moved Temporarily. Redirecting to Webhooks Integrations - Connect Your Apps with IFTTT
Google sheet doesn’t show column 1(Timestamp), column 2(Event Name) and column 3.

Webhooks Integrations - Connect Your Apps with IFTTT

Webhooks Integrations - Connect Your Apps with IFTTT

Webhooks Integrations - Connect Your Apps with IFTTT

@Zephyr do you have a link to the Applet?

We have used Blynk’s webhook widget to send directly to Google Sheets and @Dmitriy added acceptance of the 301/ 302 redirect to cover this. Take care though as you will receive a temporary block if you send the wrong url via Blynk more than 10 times.

I guess I’m missing something…
According the code, the temperature readings are linked to V1:

void sendTemps()
{
sensors.requestTemperatures(); // Polls the sensors
float Refrigerator = sensors.getTempCByIndex(0); // Gets first probe on wire
Blynk.virtualWrite(1, Refrigerator);

But Webhook is linked to V0

image

Is that OK??

:face_with_raised_eyebrow:

No, the value you want to send to an API must be sent to the “webhook” pin, unless that webhook pin already has the full url. It’s very unlikely to have the full url, but not impossible.

In this case as the temperature keeps changing then it needs the additional pin data for the url, like 99% of all API calls.

Yes, I have a link to the Applet. I changed the event name from “Temperature” to “temperature”.

I am still confused about the Blynk Webhook URL, I tried to put /pin/ (ex: https://maker.ifttt.com/trigger/Temperature/with/key/---Key---/pin/), but no temperature value reported in the super chart, if I delete /pin/, super chart starts showing correct temperature value, but no temperature value in the google sheet, so what’s wrong with my Arduino sketch or Blynk Webhook settings?

Hi @Zephyr can you share how to install ifttt so can integrated with blynk and google sheet? i build project nearly same with your project but i dont know how to connect blynk+ifttt+google sheet

My topic here - Can someone share code about send data from sensor to google sheet?