John's Musings


Yeah, Me Neither

ESP8266 Weather Appliance

Found this cool project to create a weather appliance from an ESP8266 Weather Station. What's an ESP8266, you say? It's an Internet of Things (IoT) module that is wildly popular. You know the smart home outlets in Lowe's and Home Depot and Walmart that are internet controlled? They have ESP8266 modules (or similar) in them. Smart light sockets........Yep. Same. Those cool buttons at Amazon that order more Tide detergent when you press it...............You've got the idea.


This project can be found here but like most internet projects the instructions are frustrating as all get out. It's all there but not in a good, concise, intuitive method for dummies like me to follow.


This is based on an Adafruit Feather Huzzah which is probably the most expensive ESP8266 module but it it also probably the most mature and contains a battery port on board which is very cool.



You have got to solder two rows of male header pins on though so if you can't solder buy a beer for someone who can. That is probably the hardest part of the whole project.


You need a Feather Huzzah - $16 and a Featherwing TFT touch screen for about $25 to $30. Both items are frequently sold out due to popularity so if you find them in stock buy a couple of them. I had to get my Touch Screen off of eBay. The other items on the list such as the battery and switch are optional.


I'm going to try to not duplicate too much more of what is on the project page regarding hardware since they cover that pretty well. It's the software part that will drive you crazy. They make it sound more complicated than it is.


This is the part that drove me nuts because again the info was in the guide but buried in other links and links within links. I did this on a Mac so those are the instructions I'm providing here.


First and foremost to ever recognize the Feather Huzzah when you hook it to USB it needs a special driver, whether for Mac, Linux, or Windows. Download and then install the driver from here.


Now download Arduino IDE from here. The latest version as of this writing is 1.8.1.


Open Arduino IDE and then select Preferences. And add the following to the Additional Boards Manager Url's Line. Then click "Ok".


http://arduino.esp8266.com/stable/package_esp8266com_index.json





Now in the Arduino menu go to "Tools > Board > Board Manager (Sorry, my Huzzah board is already installed, yours won't be at this point yet).



Now in the search line type in "ESP8266" then click on the esp8266 by esp8266 community and an install button will appear. Install it.



Now quit and then restart Arduino and the Adafruit Huzzah Feather should be an option to select in the board dropdown as depicted above.


Set your frequency speed, Flash, and upload speed the same as in my pic above. Also plug in your Huzzah and select the port. On a mac it looks like this (/dev/cu.SLAB_USBtoUART).


Now go back to your toolbar in Arduino and click on "Sketch > Include Library > Manage Library"





Where it says "Filter Your Search" go through this list and install all your libraries as depicted. I'll only give the first example. All the others are the same.




- Adafruit GFX

- Adafruit ILI9341 Library

- Adafruit STMPE610

- WiFiManager for ESP8266

- ESP8266 Weather Station Library

- JSON Streaming Parser


Restart Arduino. I'm not sure it's necessary but it won't hurt. Make sure your board and port info are all correct.


Now from this page click on the green block that says "weather_station_color.zip". Also follow the directions beneath it for setting up a weather API key from WeatherUnderground.com


Open the file "weather_station_color.ino" from the zip file you just downloaded with Arduino. Maximize the window and go to the tab that says "settings.h" and add your weather underground API key and modify your location.



Once your key and location is in click the save button in Arduino




Now connect your Feather Huzzah via a micro USB cable to your Mac and then click on Upload



Now after successful upload of your sketch disconnect the Huzzah and follow the installation instruction on the Adafruit site, basically plug the Huzzah into the TFT touch screen. Soon as you boot it turns the Huzzah into a wifi access point to which you connect to and then input the SSID of your home wifi network and password and you should be displaying weather data.


Yer doing it!


I printed a 3D case from here. Turned out great.



48,605