Starting out with first project wifi connected switch

So I am just starting out so please bear with me.

I want to start looking into smart connected devices and such want to make my own wi-fi connected device for simple things like a switch. The ultimate goal would be to have it connected to google home and echo etc but one step at a time.

I want to create a simple switch that toggles on off based on certain conditions. The parameters can be adjusted via a mobile app.

If this were a sell-able product it would require it would need to connect to your existing wifi and some means to tell it how to connect to said wifi.

The easiest way to accomplish this (I think) would be to have it act as a hotspot/AP first, give it the parameters, then the board connects to the new SSID.

I want to use a board that is by far the cheapest board that can accomplish this. Through my research i saw that the ESP8266 should be able to do this (open to suggestions). My thinking is that if I wanted to market such a device for mass production want to replicate cheap as possible with just enough components deemed necessary.

I want to also have some sort of "reset" switch which reverts back to a state where i can start this whole process again without have to do any coding; where I can connect to AP. (I want to make this grandparent friendly).

For all this I want to use maybe the weather API for example to check for light levels and turn a light on the porch on or check outside temperature and turn on my heater on my porch.

So in summary, have i got the right device to accomplish this, if not, what would you recommend? What other bits would I need/should be mindful of.

Thanks

ESP2866 is very capable of this.
There is even an Ecuador sketvh in the esp2866 library to setup a server.

I used a simple app build by myself with app inventor to switch my aquarium lights on and off.

Opening the app turns on wifi on your mobile or tablet if its not turned on yet. It connects to the accespoint (i did not want it on the internet so i have a ap set up with the esp) turn lights on or of, close the app and it disconnevts from the ap and turns off wifi again.

Hi,

Thanks for your response. When you say app inventor, do you mean this one:

http://appinventor.mit.edu/explore/

I will start investigating, do you think that the esp is "too" capable, is there something cheaper that does the same job?

Mfizz that is indeed what i used. I had no experience at all using it, and within a hour or so i build the app.

I can share the project file if you want but it's far from "perfect". Just plainly does what i want it to do

The esp8266-01 is about the cheapest you can go i guess. But you will still need mains power to3.3v conversion and a relay. If you are thinking about production, think again there are verry cheap options out there anyway.

This does what you want including some extra nice features already programmed.... for less than a beer at the bar

wifi switches

I will start investigating, do you think that the esp is "too" capable, is there something cheaper that does the same job?