Webhook ... Read all the documentation but still having issues

NodeMCU is easy to use, I don’t know where is the difficulty compare to the unknown cytron esp8266.
I can’t help you, the first thing you have to do is to get your cytron esp8266 works with Blynk library.
I’m not sure this MCU support HTTPClient, and I can’t try with CytronWiFiClient.h :thinking:

@Blynk_Coeur It works with the blynk library for the one with webhook widgets just the data no print out at the serial monitor

You said it can’t compile :

image

@Blynk_Coeur @PeteKnight For the normal features such as blynk button, notification and superchart works. But when it comes to webhook widgets then error shown. This ESP8266WiFi.h error happens bcuz i normally use arduino uno board run with blynk then everything looks fine.

So please add Serial.println and see what you get on the serial monitor

void forecast(){
    HTTPClient http;  //Declare an object of class HTTPClient
    http.begin("https://api.openweathermap.org/data/2.5/weather?id=xxx&appid=xxx");  //Specify request destination
    int httpCode = http.GET();     //Send the request

//here
    Serial.print("returned code : ");
    Serial.println(httpCode );

    if (httpCode > 0) { //Check the returning code
      payload = http.getString();   //Get the request response payload

//here
     Serial.print("payload  : ");
     Serial.println(payload );
        }
    http.end();   //Close connection
      JsonRequest();//call Json to decript weather
} 

As long as you use this Cryton ESP8255 as a WiFi shield then you’ll have problems because to work with Blynk it needs the BlynkSimpleShieldEsp8266.h library.

This library is really just a very simple wrapper for the AT commands that the Cryron needs in AT modem mode. This wrapper library doesn’t support HTTP(s) client commands as far as I know, and even if it was hacked so that it did, the UNO is very low on processing power.

It may be possible to use the shield as a standalone MCU, but its really not worth the effort. You’d be far better spending $3 on a NodeMCU or $5 on an ESP32 and throw the UNO and the Cryron shield in the bin.

Pete.

1 Like

@PeteKnight @Blynk_Coeur ok , I will feedback this issue to cytron and see whether they can provide some help. For thingspeak api , the cytron designer able to make, so maybe i try to ask and see whether they could make it. So, any suggestion provide to me?

What exactly are you trying to achieve with this project?

Pete.

@PeteKnight Compare real time data with the dht11 sensor

Do you think that these 8 words enable us to understand how Blynk, Thingspeak, the weather API and your hardware will work together to provide a solution to whatever your overall project requirement is?

Also, if you’re using a DHT11 then you should toss that in the bin with your other hardware. It has ±2°C accuracy (in other words a 4°C window) and ± 5% RH (10% window).

Pete.

1 Like

Flood detection system. I used blynk to get the DHT11 data, at the same time i take the real time data compare with it. I no use thingspeak, what i mention just now is I saw the cytron examples there have thingspeak coding. I used supercharts (Blynk) to show DHT11 data. U mean DHT11 is not useful?

Pete said the accuracy is very bad,that’s true.
I use AHT20 who has ±0.3 °C accuracy .

I would have thought that if you wanted flood detection then measuring rainfall, ground moisture and sump water levels would have been a more sensible approach.
Using a temperature and humidity probe, especially one that’s not waterproof, will tell you very little.

I think it’s also a misconception to regard weather data from sources like weatherunderground and openweathermap as being “real time data”. The accuracy is dependent on how close (and accurate) the weather stations supplying the data are. In tropical locations its very easy to have a torrential downpour and local flooding in one location, and no rain at all a mile away.

Pete.

Ok, I understand. So, there is nothing that can solve this cytron esp8266 wifi shield issue?

Pete.

Ok , if i have another question but not related to this then where can i send it?

Open a New topic

1 Like