Sonoff + Pi = Homebrew Happiness
Unlike the poster above (below?), I have a number of the Sonoff devices running at home (on a dedicated IoT subnet) and am very happy with them.
The difference is that I've flashed Micropython to all the ESP8266 units and have written the code for each one to do what I want (subscribe to or publish MQTT messages) with a Raspberry Pi acting as MQTT broker. Took a lot longer than buying off the shelf, but I know the code it runs, and it does not need to have an Internet connection to work.
Most units control lights, but I have one higher current device with an integrated temperature sensor controlling the electric heater in my garden office, so I can switch the heating and lights on in my office before getting in the shower in the morning and come into a warm office to start work. The temperature sensor also allows me to use it as a frost stat so that if the temperature drops too low, the heating comes on to keep it at a level base.
All with cheap devices, and a little (lot) of time. No Cloud service in sight.