Dear All,
I am trying to migrate my codes and I am nearly done, but I need help for webhook settings reconfigure for Blynk 2.0 requirements.
My Alarmsystem project used webhook without any problem with legacy Blynk to send status reports every day. Migrated project is working well with Blynk 2.0 except webhook.
My settings in legacy Blynk:
This row writes values of three variables to V0
Blynk.virtualWrite(V0, displaycurrenttime, alarmValueWh, batterrorState);
(e.g. V0=12-21,20:58:54350, where displaycurrenttime=12-21,20:58:54, alarmValueWh=35, batterrorState=0)
Webhook widget settings in mobile app
The full URL: https://hooks.zapier.com/hooks/catch/xxxxx/yyyyyy/?logdate=/pin[0]/&alarmvalue=/pin[1]/&batterrstate=/pin[2]/
logdate, alarmvalue, batterrstate fields were configured in Zapier.
Message status displaying after sending with this code:
BLYNK_WRITE(V0) //Webhook
{
Serial.println("WebHook...");
Serial.println(param.asStr()); //in case of success: 200 OK
}
Trying to migrate these to Blynk 2.0:
Webhook name, Device, Datastream are clear, but I don’t know the URL.
I am tried with full ( https://hooks.zapier.com/hooks/catch/xxxxx/yyyyyy/?logdate=/pin[0]/&alarmvalue=/pin[1]/&batterrstate=/pin[2]/) and shorter (show on picture), but not clear for me how to configure rest settings (e.g. content type).
In case of full URL using without any other settings, only request type set to POST, webhook sending success (result is 200 OK), but the sent values are not comes from V0 stream.
Blynk 2.0 webhook sent /pin[0]/ /pin[1]/ /pin[2]/ as values and not real values from V0.
(e.g. displayed result was logdate:/pin[0]/ instead of logdate:12-21, 10:56)
I have read many topics and tutorials, but I need more help to understanding how Webhook working on Blynk.Console in case of POST using.
How works on new platform multiple variables sending?
Thanks for all help.
aquarius