This is a v2 of my original ESP8266 IFTTT Easy Button project. Instead of modifying my original post. I will document the changes here.
The big changes are that the module is not enabled until the button is pushed. This brings the battery life to whole new level.
The push button "boots up" the module by sending a HIGH signal through a diode to CH_PD. The first thing I do in init.lua is to set GPIO02 to HIGH, which is connected through a 1K resistor back to CH_PD. When I'm done posting to IFTTT I just set GPIO02 to LOW and the module is disabled.
The second exciting part is that I can configure the WIFI options OTA without having to connect the button to UART.
If the button cannot get a valid IP after 10 tries. It will set itself as an Access Point called SmartButton.
After connecting to SSID "SmartButton", I can access http://192.168.1.1/ and enter the credentials of the AP of my choice.
To reset the Wifi configuration, all you need to do is hold down the button for about 5 seconds. This will force the module to reset and act as an AP.
Also if for some reason it can't reach IFTTT it will reset and give you a chance to connect to an AP that has internet.
Now I can just retrofit back to my Staples Easy Button.
Comments