@kreggly is right, I have a project posted here that explains it all. Lucky for you, I even used an ESP8266!