Blynk + ifttt + google it's working but i need to work with a 3-way swtich

I have an apllet on ifttt that turns the relay on, that is, it changes the state to 0 or changes the state to 1, my question is,
there in the boddy field, I can do the following condition, if 0 change to 1, or if 1 change to 0, instead of having 2 applets, one to turn on the relay and one to turn off?

sorry for my english…

In the body field i set [‘1’] or 0, but i wanna put a condition, if 1 change to 0 and if 0 change to 1
it’s possible?

No, the Blynk API doesn’t have the functionality to do that using either the PUT or GET calls (I’d always recommend using GET for everything by the way).

You’d need to write a multi-stage applet that reads the value of the vPin using one API call, then write the opposite value back using a second API call - but I don’t know if that’s possible using IFTTT.

Maybe a simpler solution would be to do this in code. Use a virtual pin as the ‘toggle’ command. When a value is received (via IFTTT) then read the state of the pin you want to control is read, then the opposite is written back to the pin.


1 Like