I bought a sonoff light switch on aliexpress and hooked it up and am controlling it from the Smart Life iOS app just fine.
I want to be able to send http requests to the switch thru a web browser or curl via terminal or something similar. Does anyone know if this is possible? I know this is not Arduino per se, but its IoT and I guess someone might have interfaced an arduino with a sonoff light switch.
As far as I know the heart of a SONOS switch is an ESP8266, so you could program it using the Arduino IDE, given you installed the corresponding core.
Keep in mind that if you install your own sketch on the SONOS it won't react to your iOS app anymore.
are you talking about a sonoff touch or a sonoff S20? There are some minor differences, but basically you can programm the Sonoff devices if you have some experience how to handle ESP's (attention, the Sonoff Touch is a ESP8285)
if you google for "flash sonoff" you will find lot of information. If you don't want to write your own software you can search for "tasmota" ... large community cares about an alternative software.
If you have any specific question - feel free to ask. Regarding your question in #1:
Great, I found a YouTube Dr Z video on flashing tasmota onto a sonoff light switch.
He recommends a ftdi cable. I have these 2 options: a pl2303 converter and a RPi usb-ttl. From what I understand both of these convert a usb signal to a ttl signal, correct?