Remote control http

Hello. what code to the remote control button. I would like to remotely control another board from the phone. For example, if I press the button, the relay switches on another wemos. I need a code.

I found such a thing but I do not know how to apply it in the code.

http://blynk-cloud.com/auth_token/get/pin

The syntax you have just reads the value of a pin as per https://blynkapi.docs.apiary.io/#reference/0/get-pin-value/get-pin-value

If you want to change the value use https://blynkapi.docs.apiary.io/#reference/0/write-pin-value-via-get/write-pin-value-via-get

how to use it in the code?

With the super powerful Webhook widget.

1 Like

Can you send me a code? Thanks in advance

Keep studying this until you can make it work in a web browser, then repeat for Webhook widget,

How to control the relay via http (push button)?
I used it but it does not work.
https://blynkapi.docs.apiary.io/#

Paste the dozens of url’s you tried in a browser and the actual GPIO numbers you want to control.

Presumably you are using Blynk’s cloud server.

http://blynk-cloud.com/xxxx/update/D5?value=1

Which GPIO pin is the relay connected to and do you know the difference between a GPIO number and the labels printed on the ESP development boards?

What message do you see in the browser with the url you are using?

Most relays are active LOW, should you be sending a 0 to switch the relay ON?

@tomixps please stop demanding others to write code for you. It is against forum rules (and you may get banned soon).

1 Like

blynk-cloud.com works for me only I would like it to be a push and not a switch

http://blynk-cloud.com/XXXXXXXXXXXX/get/D14

Ok I did not know

You clearly haven’t been following my reign of terror :stuck_out_tongue_winking_eye: