Hi - I want to use the Sonoff wifi switch in connection with my Control4 Home Automation system. Ideally I would be able to do this via hitting a URL like "
http://192.168.1.155/turnon" assuming that 192.168.1.155 is the sonoff IP address. I have CGI enabled web servers on my LAN so I could do more complex commands if required by executing python code via CGI on a Raspberry Pi or a PC running Apache under Ubuntu - or even Let's encrypt-nginx. Is that possible without hacking the sonoff and changing the firmware? Can you intercept the calls to the cloud via router routing commands? Is there an API for these devices (not as far as I can tell) that would allow simple control, as there is for devices like a Philips Hue hub?
If not what is the easiest way to do this? Using Sonoff-Tasmota or are there other ways to accomplish what I am trying to do?
As an aside - why doesn't someone sell Sonoff units that have been prehacked? Why doesn't iTead studio do this themselves or even sell units with headers pre-soldered? Or even just provide an API? It isn't as if they are like Apple and selling a system meant for a walled-off environment.