Using an ESP8266 running arduino as a tasmotta / SONOFF remote control

Hi Everyone.

One question… I have a sonoff device flashed with the tasmotta firmware and I can control the output relay using the commands below:

http://<ip>/cm?cmnd=Power%20On   // Power On
http://<ip>/cm?cmnd=Power%20off  // Power Off

I was intending to send these from an ESP8266 to make a WiFi remote control for some outside lights.
This way I could command various devices from a single ESP8266 by sending individual commands to their respective IP addresses within the network.

I just have no idea how to accomplish this. Its not as easy as typing it in a browser. Any references, I could use to learn how to?

Thanks

I've never controlled my Sonoff devices this way. It sounds like the hard way. I do everything using MQTT over WiFi. If I want to turn a light on or off, I use the PubSub library to publish an MQTT message addressing the light or switch.

SteveMann:
I've never controlled my Sonoff devices this way. It sounds like the hard way. I do everything using MQTT over WiFi. If I want to turn a light on or off, I use the PubSub library to publish an MQTT message addressing the light or switch.

Thanks, that works a treat. I get back the status (or failure) which I can publish on the master web page too!

Turn on
{"POWER":"ON"}
Turn on
[HTTP] GET... failed, error: connection failed