{"id":4784,"date":"2016-06-18T08:22:46","date_gmt":"2016-06-18T13:22:46","guid":{"rendered":"http:\/\/www.plastibots.com\/?p=4784"},"modified":"2017-03-05T05:54:45","modified_gmt":"2017-03-05T10:54:45","slug":"wiot-weather-station-iot-notifier","status":"publish","type":"post","link":"https:\/\/www.plastibots.com\/index.php\/2016\/06\/18\/wiot-weather-station-iot-notifier\/","title":{"rendered":"WIoT:  Weather Station &#038; IoT Notifier"},"content":{"rendered":"<p><strong>Update: Check out my latest version of this project <a href=\"http:\/\/www.plastibots.com\/index.php\/2017\/01\/03\/wiot-2-weather-station-nextion-tft-with-esp8266\/\" target=\"_blank\">WIoT-2<\/a>.<\/strong><\/p>\n<p>This is a project that I have been wanting to do for some time. \u00a0Since the marrying\u00a0of IoT with microcontrollers, the world of cloud-connected devices <a href=\"http:\/\/www.plastibots.com\/wordpress\/wp-content\/uploads\/2016\/06\/IMG_1473.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignright wp-image-4861\" src=\"http:\/\/www.plastibots.com\/wordpress\/wp-content\/uploads\/2016\/06\/IMG_1473-150x150.jpg\" alt=\"IMG_1473\" width=\"200\" height=\"119\" srcset=\"https:\/\/www.plastibots.com\/wordpress\/wp-content\/uploads\/2016\/06\/IMG_1473-300x178.jpg 300w, https:\/\/www.plastibots.com\/wordpress\/wp-content\/uploads\/2016\/06\/IMG_1473-768x456.jpg 768w, https:\/\/www.plastibots.com\/wordpress\/wp-content\/uploads\/2016\/06\/IMG_1473.jpg 878w\" sizes=\"auto, (max-width: 200px) 100vw, 200px\" \/><\/a>has taken off. \u00a0I had a hard time naming this thing because its sort of a swiss army knife of IoT. \u00a0I keep coming up with new ideas as to what to connect to and control. \u00a0 \u00a0I&#8217;ve done other similar projects (like\u00a0my <a href=\"http:\/\/www.plastibots.com\/index.php\/2015\/06\/11\/iot-garage-monitor-with-finger-print-sensor\/\" target=\"_blank\">garage door monitor \/ opener<\/a> project), but this is the first complex project that I&#8217;ve embarked on. \u00a0(BTW &#8211; It also now integrates that garage controller I just mentioned!)<\/p>\n<p>All too often, we are in a rush to get out the door (kids school, soccer games, dance etc). \u00a0We often want to know what the weather is or I want\u00a0a status update on other things (i.e &#8211; hot tub temperature). \u00a0I\u00a0wanted something that was (BAM!) in our faces, at the door and had the info right there.\u00a0I also wanted to be able to expand on it. \u00a0 \u00a0A few wifi enabled controllers, some sensors, an LCD and other bits later, and WIoT was born. \u00a0Read on for details&#8230; \u00a0BTW, I am also interested in knowing if there is a market for such a thing. \u00a0Drop me a line if you have ideas or are interested&#8230;<\/p>\n<p>&nbsp;<\/p>\n<figure id=\"attachment_4791\" aria-describedby=\"caption-attachment-4791\" style=\"width: 150px\" class=\"wp-caption alignright\"><a href=\"http:\/\/www.plastibots.com\/wordpress\/wp-content\/uploads\/2016\/06\/WIOT_TXUnit.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-4791 size-thumbnail\" src=\"http:\/\/www.plastibots.com\/wordpress\/wp-content\/uploads\/2016\/06\/WIOT_TXUnit-150x150.jpg\" alt=\"WIOT_TXUnit\" width=\"150\" height=\"150\" \/><\/a><figcaption id=\"caption-attachment-4791\" class=\"wp-caption-text\">TX (Outside) Unit<\/figcaption><\/figure>\n<p>So, what does it do you ask? \u00a0Lots!<\/p>\n<ul>\n<li>Displays 7 day forecast weather from Environment Canada <a href=\"http:\/\/dd.weatheroffice.ec.gc.ca\/citypage_weather\/xml\/ON\/s0000367_e.xml\" target=\"_blank\">XML feed<\/a>.<\/li>\n<li>Displays Accuweather health indicators for Arthritis, Respiratory and Migrain predictors.<\/li>\n<li>Displays outside temp, humidity and battery level data from a solar powered external monitoring station outside our house. (the\u00a0accompanying Blynk app also displays this info as well as tracks history)<\/li>\n<li>Integrated my <a href=\"http:\/\/www.plastibots.com\/index.php\/2015\/06\/11\/iot-garage-monitor-with-finger-print-sensor\/\" target=\"_blank\">Garage Door Monitor<\/a> monitoring to show the state of both doors and allow them to be opened\/closed.<\/li>\n<li>Allows our kids to notify us when they get home or go out and play with friends using Blynk notifications. \u00a0They just touch their face icons and bam! \u00a0We get this info on our phones as well as my Pebble Time watch.<\/li>\n<li>A PIR sensor is mounted on the front of the main unit. \u00a0When a we are not in front of it the LED backlight is turned off. \u00a0When a person is detected, it turns on for a preset amount of time. \u00a0Good for saving power.<\/li>\n<li>The package consists of a TX unit (outside data) and RX unit (the TFT LCD). \u00a0The outside unit is not required. \u00a0They both use Adafruit Huzzah ESP8266 boards and are connected via Blynk. \u00a0They share data between themselves and my Blynk app.<\/li>\n<li>We just stumbled into a free hot tub. \u00a0 I cant have it go solo and not be connected to the cloud! \u00a0That would be so 2012! \ud83d\ude09 \u00a0In the coming weeks, I&#8217;ll be adding an ESP to it so we can monitor the temperature. I will also use it to send Blynk notifications if the hot tub temp gets too hot or too cold (in the winter).<\/li>\n<li>I&#8217;ve got a few other ideas up my sleeve including using it as a post-it like device for my wife and I to leave messages for the kids. \u00a0Using Blynk on our phones, we can type a note and assign it to one or more of the kids and it will show for them. \u00a0i.e. &#8220;get your homework done by&#8230;&#8221; \u00a0Or&#8230; &#8220;go easy on the cookies!&#8221;<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-4860\" src=\"http:\/\/www.plastibots.com\/wordpress\/wp-content\/uploads\/2016\/06\/WIOT_described2-2.jpg\" alt=\"WIOT_described2\" width=\"800\" height=\"800\" srcset=\"https:\/\/www.plastibots.com\/wordpress\/wp-content\/uploads\/2016\/06\/WIOT_described2-2.jpg 800w, https:\/\/www.plastibots.com\/wordpress\/wp-content\/uploads\/2016\/06\/WIOT_described2-2-150x150.jpg 150w, https:\/\/www.plastibots.com\/wordpress\/wp-content\/uploads\/2016\/06\/WIOT_described2-2-300x300.jpg 300w, https:\/\/www.plastibots.com\/wordpress\/wp-content\/uploads\/2016\/06\/WIOT_described2-2-768x768.jpg 768w\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" \/><\/p>\n<p style=\"text-align: center;\">Video Showing Base Features (does not include recent additions)<\/p>\n<p><iframe loading=\"lazy\" title=\"WIoT:  Weather \/ Forecast Station &amp; Blynk IoT Notifier\" width=\"500\" height=\"281\" src=\"https:\/\/www.youtube.com\/embed\/HFAWpWn-cVE?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe><\/p>\n<p>&nbsp;<\/p>\n<p><a href=\"http:\/\/www.plastibots.com\/wordpress\/wp-content\/uploads\/2016\/06\/WIOT_Mounted.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium wp-image-4789\" src=\"http:\/\/www.plastibots.com\/wordpress\/wp-content\/uploads\/2016\/06\/WIOT_Mounted-300x162.jpg\" alt=\"WIOT_Mounted\" width=\"300\" height=\"162\" srcset=\"https:\/\/www.plastibots.com\/wordpress\/wp-content\/uploads\/2016\/06\/WIOT_Mounted-300x162.jpg 300w, https:\/\/www.plastibots.com\/wordpress\/wp-content\/uploads\/2016\/06\/WIOT_Mounted.jpg 1024w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p><iframe loading=\"lazy\" title=\"WIoT:  Blynk Notification Demo\" width=\"500\" height=\"281\" src=\"https:\/\/www.youtube.com\/embed\/VflBCN47MLY?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"text-decoration: underline;\"><strong>There are 3 main parts to this project:<\/strong><\/span><\/p>\n<ul>\n<li>Transmitter (TX) &#8211; this is a solar powered unit that reads data every 15 minutes from a SHT-11 temp\/humidity sensor and relays the data via Blynk to the RX unit and my iPhone. \u00a0It uses the Huzzah ESP8266 with low power mode enabled. \u00a0It wakes up on a timer to send data, then goes back to sleep. \u00a0It&#8217;s been running for 3 months now and the solar panel keeps the battery topped up daily.<\/li>\n<li>Receiver (RX) &#8211; this unit pulls weather forecast info from Environment Canada as well as the temp \/ humidity \/ battery info from the TX unit. \u00a0Data is rendered to the display. \u00a0Refreshes every 15 minutes.<\/li>\n<li>Blynk App &#8211; displays the outdoor temp and battery info from the TX.<\/li>\n<\/ul>\n<table>\n<tbody>\n<tr>\n<td style=\"text-align: center;\"><strong>TX Unit<\/strong><\/td>\n<td style=\"text-align: center;\"><strong>RX Unit<\/strong><\/td>\n<td style=\"text-align: center;\"><strong>Blynk App<\/strong><\/td>\n<\/tr>\n<tr>\n<td><a href=\"http:\/\/www.plastibots.com\/wordpress\/wp-content\/uploads\/2016\/06\/WIOT_TXUnit.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-thumbnail wp-image-4791 aligncenter\" src=\"http:\/\/www.plastibots.com\/wordpress\/wp-content\/uploads\/2016\/06\/WIOT_TXUnit-150x150.jpg\" alt=\"WIOT_TXUnit\" width=\"150\" height=\"150\" \/><\/a><\/td>\n<td><a href=\"http:\/\/www.plastibots.com\/wordpress\/wp-content\/uploads\/2016\/06\/WTR_controllerUnit.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-thumbnail wp-image-4795\" src=\"http:\/\/www.plastibots.com\/wordpress\/wp-content\/uploads\/2016\/06\/WTR_controllerUnit-150x150.jpg\" alt=\"WTR_controllerUnit\" width=\"150\" height=\"150\" \/><\/a><a href=\"http:\/\/www.plastibots.com\/wordpress\/wp-content\/uploads\/2016\/06\/WIOT_Mounted.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-thumbnail wp-image-4789 aligncenter\" src=\"http:\/\/www.plastibots.com\/wordpress\/wp-content\/uploads\/2016\/06\/WIOT_Mounted-150x150.jpg\" alt=\"WIOT_Mounted\" width=\"150\" height=\"150\" \/><\/a><\/td>\n<td><a href=\"http:\/\/www.plastibots.com\/wordpress\/wp-content\/uploads\/2016\/06\/WTR_BlynkTXUnitData.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-thumbnail wp-image-4794 aligncenter\" src=\"http:\/\/www.plastibots.com\/wordpress\/wp-content\/uploads\/2016\/06\/WTR_BlynkTXUnitData-150x150.jpg\" alt=\"WTR_BlynkTXUnitData\" width=\"150\" height=\"150\" \/><\/a><a href=\"http:\/\/www.plastibots.com\/wordpress\/wp-content\/uploads\/2016\/06\/IMG_1983.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-thumbnail wp-image-4868\" src=\"http:\/\/www.plastibots.com\/wordpress\/wp-content\/uploads\/2016\/06\/IMG_1983-150x150.png\" alt=\"IMG_1983\" width=\"150\" height=\"150\" \/><\/a><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<\/p>\n<table>\n<tbody>\n<tr>\n<td style=\"text-align: center;\"><\/td>\n<td style=\"text-align: center;\"><span style=\"text-decoration: underline;\"><strong>3D Printed Parts<\/strong><\/span><\/td>\n<td style=\"text-align: center;\"><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;\"><strong>RX &#8211; Back Plate<\/strong><\/td>\n<td style=\"text-align: center;\"><strong>RX &#8211; Bezel<\/strong><\/td>\n<td style=\"text-align: center;\"><strong>RX &#8211; Controller Box<\/strong><\/td>\n<\/tr>\n<tr>\n<td><a href=\"http:\/\/www.thingiverse.com\/thing:1632708\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-4801 size-medium\" src=\"http:\/\/www.plastibots.com\/wordpress\/wp-content\/uploads\/2016\/06\/WIOT_backplate-300x185.jpg\" alt=\"WIOT_backplate\" width=\"300\" height=\"185\" srcset=\"https:\/\/www.plastibots.com\/wordpress\/wp-content\/uploads\/2016\/06\/WIOT_backplate-300x185.jpg 300w, https:\/\/www.plastibots.com\/wordpress\/wp-content\/uploads\/2016\/06\/WIOT_backplate.jpg 329w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/td>\n<td><a href=\"http:\/\/www.thingiverse.com\/thing:1632708\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-4802 size-medium\" src=\"http:\/\/www.plastibots.com\/wordpress\/wp-content\/uploads\/2016\/06\/WIOT_frontplate-300x169.jpg\" alt=\"WIOT_frontplate\" width=\"300\" height=\"169\" srcset=\"https:\/\/www.plastibots.com\/wordpress\/wp-content\/uploads\/2016\/06\/WIOT_frontplate-300x169.jpg 300w, https:\/\/www.plastibots.com\/wordpress\/wp-content\/uploads\/2016\/06\/WIOT_frontplate.jpg 367w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/td>\n<td><a href=\"http:\/\/www.thingiverse.com\/thing:1632708\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-4800 size-medium\" src=\"http:\/\/www.plastibots.com\/wordpress\/wp-content\/uploads\/2016\/06\/WIOT_controllercase-300x245.jpg\" alt=\"WIOT_controllercase\" width=\"300\" height=\"245\" srcset=\"https:\/\/www.plastibots.com\/wordpress\/wp-content\/uploads\/2016\/06\/WIOT_controllercase-300x245.jpg 300w, https:\/\/www.plastibots.com\/wordpress\/wp-content\/uploads\/2016\/06\/WIOT_controllercase.jpg 391w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><span style=\"text-decoration: underline;\"><strong>Features:<\/strong><\/span><\/p>\n<ul>\n<li>Displays real-time weather conditions and forecast information from <a href=\"http:\/\/weather.gc.ca\/city\/pages\/on-95_metric_e.html\" target=\"_blank\">Environment Canada<\/a>.<\/li>\n<li>Displays Accuweather predictive data for Migraine, Arthritis &amp; Asthma risk over the next 24 \/ 48 hrs.<\/li>\n<li>Data refreshed every 15 minutes. Manual refresh option on screen.<\/li>\n<li>Pulls temp, humidity, humidex and battery level information from outside the house (from TX unit).<\/li>\n<li>Displays TX unit temp, humidity, humidex and battery level on Blynk App.<\/li>\n<li>Uses Blynk notifications to allow my kids to notify us when they are home. (see video)<\/li>\n<li>Future features to add:\n<ul>\n<li>Allow for sending of messages \/ reminders to unit from Blynk<\/li>\n<li>Remote refresh weather data<\/li>\n<li>Got any ideas? \u00a0Send them via the comments pls!<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p><span style=\"text-decoration: underline;\"><strong>Components:<\/strong><\/span><\/p>\n<ul>\n<li>RX Unit:\n<ul>\n<li><a href=\"https:\/\/www.adafruit.com\/products\/2471\" target=\"_blank\">Adafruit Huzzah ESP8266<\/a><\/li>\n<li><a href=\"https:\/\/www.adafruit.com\/products\/1596\" target=\"_blank\">Adafruit 5&#8243; TFT LCD<\/a><\/li>\n<li><a href=\"https:\/\/www.adafruit.com\/products\/1590\" target=\"_blank\">Adafruit RA8875 TFT controller<\/a><\/li>\n<li><a href=\"https:\/\/www.adafruit.com\/products\/254\" target=\"_blank\">Adafruit Micro SD card reader<\/a><\/li>\n<li><a href=\"http:\/\/www.banggood.com\/3Pcs-Mini-IR-Infrared-Pyroelectric-PIR-Body-Motion-Human-Sensor-Detector-Module-p-1020422.html?p=R90804949020201412E4\" target=\"_blank\">PIR Proximity sensor<\/a><\/li>\n<li><a href=\"http:\/\/www.banggood.com\/5Pcs-Mini-DC-Adjustable-Power-Supply-Buck-Module-Step-Down-Module-p-952402.html\" target=\"_blank\">Switching power supply<\/a><\/li>\n<li>RX unit: \u00a0<a href=\"http:\/\/www.thingiverse.com\/thing:1632708\" target=\"_blank\">3D printed<\/a> controller box with flip-open cover, 3D printed backplate, 3D printed bezel.<\/li>\n<\/ul>\n<\/li>\n<li>TX unit\n<ul>\n<li><a href=\"https:\/\/www.adafruit.com\/products\/2471\" target=\"_blank\">Adafruit Huzzah ESP8266<\/a><\/li>\n<li>SHT-11 (or <a href=\"http:\/\/www.banggood.com\/search\/dht22-digital-temperature.html?p=R90804949020201412E4\" target=\"_blank\">equivalent<\/a>)<\/li>\n<li><a href=\"http:\/\/www.banggood.com\/5Pcs-Mini-DC-Adjustable-Power-Supply-Buck-Module-Step-Down-Module-p-952402.html?p=R90804949020201412E4\" target=\"_blank\">Switching power supply<\/a><\/li>\n<li>3.7V LiPo battery<\/li>\n<li><a href=\"https:\/\/www.adafruit.com\/products\/390\" target=\"_blank\">Adafruit Solar power charge controller<\/a><\/li>\n<li><a href=\"http:\/\/www.banggood.com\/3W-6V-Epoxy-Solar-Panel-Solar-Cell-Panel-DIY-Solar-Charger-Panel-p-944278.html?p=R90804949020201412E4\" target=\"_blank\">Solar panel<\/a><\/li>\n<li>Outdoor water resistant case<\/li>\n<li><a href=\"http:\/\/www.plastibots.com\/index.php\/2016\/01\/15\/diy-hobby-projects-parts-components-tools-must-haves\/\" target=\"_blank\">Other useful components<\/a><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p><span style=\"text-decoration: underline;\"><strong>Other:<\/strong><\/span><\/p>\n<ul>\n<li>Time to build &#8211; 4 months (incl waiting for parts)<\/li>\n<li>Hours of coding &#8211; too many<\/li>\n<li>Code Iterations &#8211; 26 (RX), 5 (TX)<\/li>\n<li>RX unit &#8211; <del>2200<\/del> 2600 lines of code<\/li>\n<li>TX unit &#8211; 337 lines of code<\/li>\n<li><a href=\"http:\/\/www.banggood.com\/search\/silicone-wire.html?p=R90804949020201412E4\" target=\"_blank\">Silcone wiring<\/a> (must have for projects like this &#8211; hint does not melt when soldering!)<\/li>\n<li>Libraries used:\n<ul>\n<li>Blynk &amp; ESP8266 \u00a0(Blynk widgets, RTC &amp; bridge)<\/li>\n<li>SHT1x<\/li>\n<li>TextFinder (for parsing XML web data)<\/li>\n<li>TimeLib<\/li>\n<li>Adafruit mfGFX (modified with custom fonts &#8211; Tahoma for this project)<\/li>\n<li>SPI<\/li>\n<li>Wire<\/li>\n<li>SD<\/li>\n<li>Adafruit RA8875<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p><span style=\"text-decoration: underline;\"><strong>Source Code and Libraries:<\/strong><\/span><\/p>\n<ul>\n<li><strong>This project has evolved into WIoT-2. Check it out <a href=\"http:\/\/www.plastibots.com\/index.php\/2017\/01\/03\/wiot-2-weather-station-nextion-tft-with-esp8266\/\" target=\"_blank\">here<\/a>.<\/strong><\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<table>\n<tbody>\n<tr>\n<td style=\"text-align: center;\"><strong>RX &#8211; Testing<\/strong><\/td>\n<td style=\"text-align: center;\"><strong>RX &#8211; Test 3D Parts<\/strong><\/td>\n<td style=\"text-align: center;\"><strong>RX &#8211; Controller<\/strong><\/td>\n<\/tr>\n<tr>\n<td><a href=\"http:\/\/www.plastibots.com\/wordpress\/wp-content\/uploads\/2016\/06\/IMG_1361.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-thumbnail wp-image-4814\" src=\"http:\/\/www.plastibots.com\/wordpress\/wp-content\/uploads\/2016\/06\/IMG_1361-150x150.jpg\" alt=\"IMG_1361\" width=\"150\" height=\"150\" \/><\/a><\/td>\n<td><a href=\"http:\/\/www.plastibots.com\/wordpress\/wp-content\/uploads\/2016\/06\/WTR_components.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-thumbnail wp-image-4815\" src=\"http:\/\/www.plastibots.com\/wordpress\/wp-content\/uploads\/2016\/06\/WTR_components-150x150.jpg\" alt=\"WTR_components\" width=\"150\" height=\"150\" \/><\/a><\/td>\n<td><a href=\"http:\/\/www.plastibots.com\/wordpress\/wp-content\/uploads\/2016\/06\/WTR_controllerMounted.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-thumbnail wp-image-4816\" src=\"http:\/\/www.plastibots.com\/wordpress\/wp-content\/uploads\/2016\/06\/WTR_controllerMounted-150x150.jpg\" alt=\"WTR_controllerMounted\" width=\"150\" height=\"150\" \/><\/a><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><span style=\"text-decoration: underline;\"><strong>Ramblings:<\/strong><\/span><\/p>\n<p><strong>SPI:<\/strong> \u00a0As I waited for the parts to arrive, I started researching all the bits and pieces I would need for this project. \u00a0One common theme I repeatedly stumbled upon was that there will be comms issues on the SPI bus when you connect the ESP and other devices. \u00a0In my case, the ESP (Huzzah) + 5&#8243; TFT + SD card would all be SPI. \u00a0What I was hearing was a need to run the CS lines through a 74HC125 CMOS buffer chip to allow these devices to play happy together. \u00a0 I was also looking into the <a href=\"https:\/\/github.com\/sumotoy\/RA8875\" target=\"_blank\">SumoToy RA8875<\/a> driver as he&#8217;s done some great things with this and it supports layering etc. \u00a0However, to date, he has had challenges with ES8266 not playing well with SPI. \u00a0 I decided to take a leap and ordered a 5&#8243; TFT + SD Card breakout and RA8875 driver board from Adafruit. \u00a0I already had a spare Adafruit\u00a0Huzzah ESP8266 laying around. \u00a0Not sure if they did some tricks with SPI, but I was able to put all these bits together on SPI without the CMOS buffer. \u00a0<span style=\"text-decoration: underline;\">The Huzzah ESP, SD card reader, RA8875 are all playing well in the sandbox<\/span>.<\/p>\n<p><strong>RA8875 Drivers:<\/strong> \u00a0One of the things I liked about the Sumotoy RA8875 driver was that it had layer support built it. \u00a0This would allow me to draw (for example) background graphics while allowing me to refresh data over top &#8211; without going through the slow process of reloading images. \u00a0Unfortunately, this feature is not available in the Adafruit RA8875 library, and I&#8217;m not skilled enough to write the bits needed for it (its all there waiting in the RA8875 datasheet if anyone wants to take this on). \u00a0Anyway, it&#8217;s a small sacrifice and I am happy with the result.<\/p>\n<p><strong>Parsing XML:<\/strong>\u00a0 One of the first things I looked into was a library to parse XML data. I suppose I may be old school here, but for the maturity of the Arduino world, I was surprised to see that there was next to nothing out there for parsing XML. \u00a0 After digging for a bit, I stumbled across the <a href=\"http:\/\/playground.arduino.cc\/Code\/TextFinder\" target=\"_blank\">TextFinder <\/a>library. \u00a0Although it had its limitations \u00a0it solved my problems and I give kudo&#8217;s to the developer. \u00a0 Some of the issues I faced was that my searches had to always be forward moving. \u00a0You could not find an element, then go back to get something. \u00a0As a result, the structure of my key searches varied depending on the type of key and the data within. \u00a0In addition to this, the Environment Canada XML element definitions were not as clean as they could have been. \u00a0Ideally, you want elements such as &lt;todayTemp&gt;25&lt;\/todayTemp&gt;, but that was often not the case.<\/p>\n<p><strong>Adafruit mfGFX Library:<\/strong>\u00a0As I was using a 5&#8243; TFT LCD, the last thing I wanted was to upscale system fonts and have them look all blocky and ugly. \u00a0After a lot of digging I came across the Adafruit mfGFX library that solved this problem. \u00a0It allowed me to create fonts as graphics and then define them in the library itself. \u00a0There&#8217;s lots of info out there, but in essence what I did was use TheDotFactory (tool) to generate font data, dump that data into the library, and then create the correct pointer. \u00a0Since I was using an ESP8266 as a core, I had about 1MB to play with &#8211; so I was good with space. If you go this route, dont expect much with an Atmel chip as you will eat up all the memory very quick.<\/p>\n<p><strong>Reducing Font Footprint:<\/strong> \u00a0Another trick I learned to reduce space was to generate the full font from TheDotFactory, and then with the resulting source data, and using the FontDescriptor (to help ID the character), removing the line that defines the character as well as the line in the FontDescriptor (this will all make sense when you look at the output). \u00a0This was useful when I generated a 72pt Tahoma character set for the temp values. I only needed numbers and the &#8220;.&#8221;. \u00a0TheDotFactory comes with a PDF that contains a lot of good info. It also saved over 400K of data being pushed to the ESP. \u00a0There are also other nuances that the code does not take care of. \u00a0For example, you need to add the start and end characters to the first line.<\/p>\n<p><strong>Blynk Bridge<\/strong>: \u00a0This useful <a href=\"http:\/\/docs.blynk.cc\/#widgets-other-bridge\" target=\"_blank\">feature <\/a>of Blynk allowed for the sending of data between the TX and RX units. \u00a0 \u00a0 The interesting part is that you don&#8217;t really need the app. \u00a0Well you do, to create the necessary auth tokens for both sketches, but then you simply establish the bridge between the 2 sketches and use it to send data back-and-forth. \u00a0What is not clearly defined is that you need 2 apps within the Blynk app to establish 2 different auth tokens so you can create the bridge. \u00a0However, you don&#8217;t necessarily need buttons and other widgets to handle the data. In this case, not only did I use Bridge, but I also created the app to display the data from the TX unit (shown above). \u00a0I do have an RX app, but right now there is just test stuff in there. \u00a0I am toying around with the Terminal widget as a means for me to send messages to the RX unit. \u00a0Have it working, but not implemented yet.<\/p>\n<p><strong>Challenges:<\/strong><\/p>\n<ul>\n<li>Blynk notifications are limited to 1 per minute. \u00a0The reasons for this are obvious (think anti-spam). \u00a0However, it would be nice to have some options. \u00a0In the case of this project, both my kids can&#8217;t check in at the same time. \u00a0They have to wait 1 minute between notifications. \u00a0As indicated by the Blynk team, this is easily solved by setting up your own Blynk server. \u00a0I&#8217;m willing for deal with the issue as I am not (currently) bothered setting up my own Blynk server.<\/li>\n<li>Memory. \u00a0GLCD fonts can eat up memory quickly. \u00a0I had to be careful selecting and using fonts. \u00a0Even though I had over 1MB of space (far more than an Arduino 328), I was touching 94% total memory space until I thinned out the Tahoma 48pt font I was using. \u00a0After removing characters I knew I would not use, it dropped to 36%. \u00a0 In the end I landed on Tahoma 16pt (full character set) and 48pt (numbers + &#8220;.&#8221; only). \u00a0I also created matching fonts with the &#8220;degree&#8221; symbol to display it as well.<\/li>\n<li>During the many iterations of coding the sketch against the ESP, I often ran into WDT reset issues on the ESP. \u00a0There is a known issue with the ESP core that it requires time to allow it to process the IP stack and deal with web connections etc. \u00a0I found that by scattering yield(); calls through areas of code that sometimes could take longer solved the issue. \u00a0This allows the ESP to break for a few MS to deal with it&#8217;s own housekeeping. \u00a0 \u00a0If you run into WDT errors, don&#8217;t give up. \u00a0It&#8217;s often just because it crashed.<\/li>\n<li>Mounting &#8211; I 3D printed all the baselplates and controller box for the RX unit. \u00a0It took a lot of time and multiple prints to get the dimensions correct. \u00a0 To mount, I had to come up with crafty ways to get mounting bolts in the walls. \u00a0On one side, I was able to simply screw into the 2&#215;4 behind the drywall. \u00a0For the other side, I printed nut holders and had the bolts coming out from the all with nuts mounting unit.<\/li>\n<\/ul>\n<p><b><u>Pin-outs<\/u><\/b><strong><span style=\"text-decoration: underline;\">\u00a0and Other Stuff:<\/span><\/strong><\/p>\n<p>I like to use my own blog as a personal reference. \u00a0Below is useful information as I&#8217;ll probably do something like this again:<\/p>\n<p><strong>Environment Canada feed<\/strong>: \u00a0Forecast iteration is 12 from 3PM to 4AM. \u00a0From 4AM till 2PM its 13. \u00a0This is the number of loops that need to be done to get the 7 day forecast data. \u00a0The additional iteration is for the &#8220;tonight&#8221; data that comes as the day progresses.<\/p>\n<p><strong>Pinouts:<\/strong><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-4831\" src=\"http:\/\/www.plastibots.com\/wordpress\/wp-content\/uploads\/2016\/06\/PinOuts1.jpg\" alt=\"PinOuts\" width=\"622\" height=\"342\" srcset=\"https:\/\/www.plastibots.com\/wordpress\/wp-content\/uploads\/2016\/06\/PinOuts1.jpg 622w, https:\/\/www.plastibots.com\/wordpress\/wp-content\/uploads\/2016\/06\/PinOuts1-300x165.jpg 300w\" sizes=\"auto, (max-width: 622px) 100vw, 622px\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Update: Check out my latest version of this project WIoT-2. This is a project that I have been wanting to do for some time. \u00a0Since the marrying\u00a0of IoT with microcontrollers, the world of cloud-connected devices has taken off. \u00a0I had a hard time naming this thing because its sort of a swiss army knife of IoT. \u00a0I keep coming up with new ideas as to what to connect to and control. \u00a0 \u00a0I&#8217;ve done other &hellip; <a href=\"https:\/\/www.plastibots.com\/index.php\/2016\/06\/18\/wiot-weather-station-iot-notifier\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":4,"featured_media":4861,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[65,6,57,119],"tags":[161,159,160,162],"class_list":["post-4784","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-arduino-electronics","category-dyihacks","category-electronics","category-iot","tag-adafruit","tag-iot","tag-ra8875","tag-weather","has_thumb"],"aioseo_notices":[],"jetpack_featured_media_url":"https:\/\/www.plastibots.com\/wordpress\/wp-content\/uploads\/2016\/06\/IMG_1473.jpg","jetpack_shortlink":"https:\/\/wp.me\/pK41j-1fa","jetpack_sharing_enabled":true,"post_mailing_queue_ids":[],"_links":{"self":[{"href":"https:\/\/www.plastibots.com\/index.php\/wp-json\/wp\/v2\/posts\/4784","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.plastibots.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.plastibots.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.plastibots.com\/index.php\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.plastibots.com\/index.php\/wp-json\/wp\/v2\/comments?post=4784"}],"version-history":[{"count":0,"href":"https:\/\/www.plastibots.com\/index.php\/wp-json\/wp\/v2\/posts\/4784\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.plastibots.com\/index.php\/wp-json\/wp\/v2\/media\/4861"}],"wp:attachment":[{"href":"https:\/\/www.plastibots.com\/index.php\/wp-json\/wp\/v2\/media?parent=4784"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.plastibots.com\/index.php\/wp-json\/wp\/v2\/categories?post=4784"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.plastibots.com\/index.php\/wp-json\/wp\/v2\/tags?post=4784"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}