All Projects → garthvh → Esp8266button

garthvh / Esp8266button

Licence: mit
An IoT Button using an Adafruit Huzzah or SparkFun Thing, push button and IFTTT

Labels

Projects that are alternatives of or similar to Esp8266button

Arduinomidifader
Turning an old analog mixer into a MIDI controller
Stars: ✭ 84 (-11.58%)
Mutual labels:  arduino
Adalight ws2812
This is a fork of Adalight working with WS2811/WS2812 LED using the last version of FastLED. 💡
Stars: ✭ 88 (-7.37%)
Mutual labels:  arduino
Lwmem
Lightweight dynamic memory manager library for embedded systems with memory constraints. It implements malloc, calloc, realloc and free functions
Stars: ✭ 92 (-3.16%)
Mutual labels:  arduino
Arduino Music Player
MOD/S3M/XM/IT Music Player for Arduino
Stars: ✭ 85 (-10.53%)
Mutual labels:  arduino
Openhab Rfm69
Gateway and examples of wireless Arduino sensor nodes w/ RFM69HW
Stars: ✭ 86 (-9.47%)
Mutual labels:  arduino
Ol3d
A tiny portable 3D graphics lib for micro controllers
Stars: ✭ 90 (-5.26%)
Mutual labels:  arduino
Esp8266wificontrol
ESP8266 WiFi Web Server control 4 Digital Outputs with OLED Display.
Stars: ✭ 84 (-11.58%)
Mutual labels:  arduino
Knx
knx stack (TP, IP and RF) for arduino and linux, Can be configured with ETS
Stars: ✭ 94 (-1.05%)
Mutual labels:  arduino
Arduino core stm8
STM8 core support for Arduino
Stars: ✭ 87 (-8.42%)
Mutual labels:  arduino
Nrf24 Esk8 Remote
A remote used to control an electric skateboard
Stars: ✭ 91 (-4.21%)
Mutual labels:  arduino
Beelan Lorawan
A LoRaWAN library for compatible arduino board
Stars: ✭ 87 (-8.42%)
Mutual labels:  arduino
Esp8266
Stars: ✭ 86 (-9.47%)
Mutual labels:  arduino
Timeframe
Get your own time portal on your desk!
Stars: ✭ 90 (-5.26%)
Mutual labels:  arduino
Arduinoslovakia
Arduino sketches.
Stars: ✭ 85 (-10.53%)
Mutual labels:  arduino
Arduino Amiibo Tools
Arduino sketches to play with amiibo
Stars: ✭ 93 (-2.11%)
Mutual labels:  arduino
Sustainable Green Plants
DIY high pressure aeroponics for the home
Stars: ✭ 84 (-11.58%)
Mutual labels:  arduino
Pixelbot
Stars: ✭ 90 (-5.26%)
Mutual labels:  arduino
Hellodrum Arduino Library
This is a library for making E-Drum with arduino.
Stars: ✭ 95 (+0%)
Mutual labels:  arduino
Arduinogameboy
Arduino based Game Boy cartridge reader and writer. It can dump ROM and RAM to SD card.
Stars: ✭ 93 (-2.11%)
Mutual labels:  arduino
Sketchbook starter kit v2.0
Stars: ✭ 90 (-5.26%)
Mutual labels:  arduino

esp8266 Dash Like IoT Button using IFTTT with Captive Portal WiFi Setup

first-timers-only

Enclosure Assembly Customized Project Enclosure - Thingiverse

An IoT Button using an Adafruit Huzzah or Sparkfun Thing, a push button and the IFTTT Maker Channel (or any other http endpoint). Posts JSON data to an IFTTT Maker Channel event when the button is pressed.

I soldered male pins on my Huzzah, and added female headers to my Sparkfun Thing. The thing did not come with any headers and male headers were included with the Huzzah.

I was able to program both with my FTDI Friend, you will need to cut the default RTS jumper on the back of the FTDI Friend (used by the Huzzah) and connect the DTR jumper to program the thing. Once cut it has been pretty easy to switch back and forth by soldering the jumpers as needed.

I still need to write some sleep code to be more efficient on battery use.

Enclosure Assembly

The built in battery and charging circuit on the ESP8266 Thing really makes it easy to work with. By cutting the DTR trace on the bottom of the board and installing pins for a jumper I am able to program the thing with the jumper installed, and debug over serial with it removed.

Enclosure Assembly

Since flashing the device each time to configure WiFi was a pain I added some code that creates an Access Point and allows the user to configure the wireless network via their mobile device. I created a slimmed down version of base css to style the pages served by the ESP8266.

I used an interesting hack I ran across, it serves the WiFi configuration page for any requests that result in a 404(Not Found) HTTP code creating a captive portal (like you seen in hotels or guest networks). By returning the configuration page for 404 requests it allows easy configuration no matter what page your mobile device OS requires. Once the device is connected a status page is available to check on your button and reset WiFi settings if necessary. This works perfectly on iOS devices and has been hit or miss on Android. On Android if the captive portal does not work automatically you can always hit the root IP of the access point to view the configuration page.

WiFi Setup

Setup

Requires an arduino ide version > 1.6.4

Set up your Arduino IDE board manager to support the Huzzah breakout board.

BOM

Adafruit Huzzah

Sparkfun Thing

Device Configuration

At the top of the esp8266_iot_button.ino file are the configuration options for the device. You will need to replace the placeholder values with your KEY and EVENT for IFTTT. You can create your own SSID name for configuration mode and you can optionally turn on a RGB LCD.

const char* AP_SSID = "ESP8266_IOT_BUTTON_SETUP";
////////////////////////
// Device Definitions //
////////////////////////
String DEVICE_TITLE = "IFTTT ESP8266 Dash Like Button";
const char* AP_SSID = "ESP8266_IOT_BUTTON_SETUP";
boolean POWER_SAVE = false;

///////////////////////
// IFTTT Definitions //
///////////////////////
const char* IFTTT_URL= "maker.ifttt.com";
const char* IFTTT_KEY= "YOUR IFTTT_KEY";
const char* IFTTT_EVENT = "YOUR_IFTTT_EVENT";
const char* IFTTT_NOTIFICATION_EVENT = "YOUR_IFTTT_NOTIFICATION_EVENT";

IFTTT Events

You will need to setup the IFTTT Maker Channel and two IFTTT recipes, one for the button event, and one for the notification that the webserver is up with WiFi SSID and IP address.

IFTTT Recipes

Enclosure

Using this awesome Parametric and Customizable Project Enclosure I made customized enclosures that fit the parts I was using for my buttons.

Customized  Project Enclosure

Customized Project Enclosure - Thingiverse

Requirements

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].