Normally, our home will have light switch for light bulb as following.
In my thinking, the light is not only controlled by phone, but also by switch at wall.
Basically, there is not difference about appearance of wall socket after installing IoT circuit for switch.
How it be done? See following sketch:
Let's see from the light. An triac circuit will control the light. And, logic 0/1 will control triac. Logic 0/1 is from Arduino. Arduino will receive signal from Switch or from RF board. Whenever one of those 2 signals is changed, light status will changed
Phone communicates to Arduino through Raspberry, which equipped wifi network. Between phone and Raspberry, it will need local web for communicating.
"IoT" means Internet of Thing (or Thing (controlled) over Internet). How can we know light status if using above circuit? Of course can not. In order to know status of light (it's in ON or OFF condition), it will need a sensor to detect current through light. However, (as my thinking) controlling the light doesn't need through Internet! Just in local is enough. Local user will control light. Remote user (for example, when you're in cafe restaurant, in company...) don't have desire to control light at home, where those light can't spread to cafe restaurant or to company