Thursday, January 4, 2018

My ESP8266 Notes

The ESP8266 module is one of my favorite IoT modules to play with, because of its low price and ease of use.  Right now you can get one for as low as $2/board with everything you need.  Ordering on Amazon will cost you around $8-$20, but I bought one to experiment with from Amazon before making a bulk order from China on ebay to get better pricing.

http://www.esp8266.com/

http://everythingesp.com/

My favorite board and instructions:
http://www.instructables.com/id/Programming-the-ESP8266-12E-using-Arduino-software/

Get the Serial Driver for Windows!!!


Firmware Flasher for bin files:

  • https://github.com/nodemcu/nodemcu-flasher
  • https://github.com/espressif/esptool
  • https://github.com/marcelstoer/nodemcu-pyflasher/releases (Nice!)
  • https://nodemcu.readthedocs.io/en/master/en/flash/
Where do I get the firmware?
  • Build your own:
    • https://nodemcu-build.com/faq.php
  • Find someone else's build and download it or use the default old image from devkit
    • https://github.com/nodemcu/nodemcu-devkit-v1.0

What do I flash?
  • bin/0x00000.bin to 0x00000
  • bin/0x10000.bin to 0x10000
  • Your custom firmware using the nodemcu-build.com and pyflasher

Setup Arduino Libraries for ESP8266 and IRController blueprint (source)

  1. Install Arduino IDE
  2. Install ESP8266 Arduino Core
  3. Install the following libraries from the Arduino IDE Library Manager: ESP8266WebServer ESP8266WiFi ArduinoJson WiFiManager NTPClient IRremoteESP8266 as well as Cryptosuite which is not on the IDE
  4. Load the IRController.ino blueprint from this repository
  5. Upload blueprint to your ESP8266 (the .ino file). Monitor via serial at 115200 baud rate
  6. Device will boot into WiFi access point mode initially with SSID IRBlaster Configuration, IP address 192.168.4.1. Connect to this and configure your access point settings using WiFi Manager. If your router supports mDNS/Bonjour you can now access your device on your local network via the hostname you specified (http://hostname.local:port/), otherwise via its local IP address (this IP address is displayed on the serial output)
  7. Forward whichever port your ESP8266 web server is running on so that it can be accessed from outside your local network, this is critical since Alexa commands come from Amazon's servers, not locally
  8. Download the IR Controller Alexa skill and start creating your devices. Each IR command will require a URL which can be saved. Choose whichever functionality you desire. Information on creating the URLs can be found below

No comments:

Post a Comment