# Working example of How to use Homey Logic Make a web request POST to switch Sonoff Tasmota

**URL:** https://community.homey.app/t/working-example-of-how-to-use-homey-logic-make-a-web-request-post-to-switch-sonoff-tasmota/13192
**Category:** Ideas & Suggestions
**Created:** [May 15, 2019, 10:15pm UTC](https://community.homey.app/t/working-example-of-how-to-use-homey-logic-make-a-web-request-post-to-switch-sonoff-tasmota/13192 "2019-05-15T22:15:39Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Pino](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/pino/32/22822_2.png) [@Pino](https://community.homey.app/u/Pino)
#### Post date: [May 15, 2019, 10:15pm UTC](https://community.homey.app/t/working-example-of-how-to-use-homey-logic-make-a-web-request-post-to-switch-sonoff-tasmota/13192/1 "2019-05-15T22:15:39Z")

</div>

Hi,

For all of you struggling after flashing a Sonoff Basic with Tasmota firmware and then wanting to toggle the relay like I did:

In the WHEN column: add a virtual button or other activity that can occur to trigger the flow. Leave the AND column empty for now. In the THEN column add the Homey logic card ‘Make a web request’.

On that card change the Method from GET to POST, in the next field (URL) type [HTTP://SonoffIPaddress/cm](HTTP://SonoffIPaddress/cm)?

Fill the field HEADER with the text: “Content-Type:application/HTTP” without the ".

In the BODY field type the text: “cmnd=Power%20Toggle” without the ".

Please like this post if you too were helped by this.
