Control Tasmota relay using HTTP Device

Tips, Tricks and Scripts to enhance your home automation and workaround known device bugs, limitations and incompatibilities
Post Reply
seattleneil
Posts: 7
Joined: 02 Mar 2020 22:41

Control Tasmota relay using HTTP Device

Post by seattleneil »

For a better-supported alternative to using the Sonoff module (https://github.com/dirkheitzmann/zwave-me-tasmota) to control an ESP8266 device with Tasmota firmware (https://tasmota.github.io/docs/), it's easy to use the HTTP Device module with the following configuration (substitute your ESP8266 device IP address where you see "192.168.1.141"):

Type = Switch Binary
URL for action On = http://192.168.1.141/cm?cmnd=Power%20On
URL for action Off = http://192.168.1.141/cm?cmnd=Power%20Off
URL to get value = http://192.168.1.141/cm?cmnd=Power
Inline Javascript to parse incoming data to 'on'/'off' strings = JSON.stringify($$).split('"')[3] === 'ON' ? 'on' : 'off'
Interval in seconds between polling requests = 3600
HTTP method = GET
HTTP method to get value = GET
Update value on action = [checked]
Post Reply