Details
• Hardware model + communication type. ESP8266 + BME280 sensor
• Android 7
• Blynk server
• Blynk Library version - latest
Hi everyone,
I am hoping someone can help me. I have been using Blynk successfully for a few months now and have a great app on my phone for my prototype weather station. All data sends receives perfectly fine etc.
Now I want to move to phase 2 which is sending weather data to various weather APIs. I mainly use Windy. com and they have an easy to use API (access their API info here) that supports GET and JSON uploads.
I have setup a webhook widget on V20 and have a blynk write call that sends this data to the app. I can see this data by assigning a value widget to V20.
The problem I am facing is that I just can’t get the webhook widget to pass the test when use the pin array. If I just reference /pin/ I pass the test and I would really like to use JSON instead of the GET URL method.
If I use:
https://stations.windy.com/pws/update/WINDYAPI-KEY?temp=/pin[0]/&pressure=/pin[1]/&rh=/pin[2]/&dewpoint=/pin[3]/ I get error code 400.
If I manually enter into the web browser URL ( ):
https://stations.windy.com/pws/update/WINDYAPI-KEY?temp=20.13&pressure=1011.84&rh=52.84&dewpoint=10.57
I can see the data update on Windy.com
I have also tried a JSON POST on the webhook widget with:
{
{
"station":0, "temp":["/pin[0]/"], "pressure":["/pin[1]/"], "rh":["/pin[2]/"], "dewpoint":["/pin[3]/"]
}
}
But this returns Error 500 every time.
Code where I write data to the Blynk V pins and then also the V20 array for the webhook widget
Blynk.virtualWrite(V1, T2);
Blynk.virtualWrite(V2, P);
Blynk.virtualWrite(V5, h);
Blynk.virtualWrite(V7, realFeal);
Blynk.virtualWrite(V8, dewPoint);
Blynk.virtualWrite(V9, rssi);
Blynk.virtualWrite(V11, tempMin);
Blynk.virtualWrite(V12, tempMax);
Blynk.virtualWrite(V13, volt);
Blynk.virtualWrite(V14, sensor);
Blynk.virtualWrite(V20, T2, P, h, dewPoint); //webhook write
Screenshots of the webhook widget and my blynk app: