Hi Blynkers!
I’m playing a little bit with “Webhook widget” in order to send data from 2 Esp’s to update a Vpin from Esp “A” to Esp “B”. The problem I’m facing is that I have no idea about the way to activate the widget…
The configuration “inside” the Widget is working fine because when I press “Run Test” the Vpin at devide “B” is updated (even using my local server). If I put the URL at the browser it works also.
I tried to add a Button (in device “A”) at the same pin as the Widget in Switch mode but nothing happens.
¿How should I activate the Webhook widget properly?
Hi @Toro_Blanco,
Thanks for your help. The use of webhook widget would allow me sending data directly to other device without the need to add extra code to that device (activating or deactivating virtual pins for instance) even through different networks and possibly to other users using their own local server.
Does it have sense for you?
put that url in the webhook. then just add a button to the project (set to push) and assign it to the same pin as the webhook. When you press the button it should send the value
hmm. I just tried it and was able to send a number to a display on a different project. As I don’t think the device is really involved it seems more like server to server communication.
button on project 1 (set as push), set to the same pin as webhook widget. Webhook widget has auth_token of project 2 that I want to send data to and the pin of the display in project 2 in its url.
Display on receiving project set to pin used in webhook url.
when button is pressed the value in webhook url is sent.
for example: http://blynk-cloud.com/auth_token/update/v2?value=167 sends the value of 167 to the display on project 2 with that is set to virtual pin 2. when i press the button on project 1 set to the webhook pin
Wow, so strange… when I press the “Run test” button it works fine, but nothing happens with Button at the dashboard…I’ll test it again in push mode instead…
Thanks @Toro_Blanco!
These two projects are running on devices in two different locations. Both on my account. Although it probably doesn’t make a difference. I am using the blynk server.
Thanks @Toro_Blanco, much appreciated, my configuration is exactly as yours and in my case it’s not working properly, again, the “Run test” works but it does nothing when the button is pressed…
The only difference is that I’m using the local server… I’m going to flash 2 different projects using Cloud server and test it again…
Umm, I will try. I have never really (successfully) worked with the webhook, so I will have to look this over and try and figure out what you are doing before I can test it
OK it took me a bit of fiddling to figure it out… but in my case I had missed entering the port (probably unnecessary with Cloud?) but once I added that, it worked as apparently expected I didn’t even need to modify either of the projects scripts… nice trick.
Webhook URL on one project sending “test” (quite literally, including the quotes, guess they are not required for strings) to V0 on another project, all over Local Server
BTW, if I have an already existing display widget that gets updated on the source project, then simply using that Display Widget’s vPin (in my case V3) in the Webhook Widget will send that data (using /pin/) to my other project’s V5 pin, each time the source Display Widget is updated.
Many thanks @Gunner, it should be something related my server, I will check log file just in case.
Nice you like this trick, I think it could be really useful. @Dmitriy, I’m not able to understand the reason why it works fine at could server but not using my Local Server (keep in mind the run test works properly)
Is there anything I should check/review/modify at my local server to do it work?
Thanks!