![]() ![]() Bringing Smart Home / IoT Projects to my Classroom
In the fall of 2016 I was awarded a grant by the Mat-Su Schools Foundation to buy materials for my students to build and program a demo smart home and undertake other IoT projects (see attachments below). Bringing this experience to my students proved far more difficult than I had anticipated though, as we had a tremendous amount of difficulty just connecting to the school's guest network. I tried several different devices (Raspberry Pis, Ethernet shields, and various microcontrollers) but was unable to figure out a way to easily connect to our school district's guest network. Either I had trouble connecting microcomputers because ntp servers were blocked, or I had trouble connecting microcontrollers because I couldn't get past the splash page (it's hard to click "I Agree" when the device you're using has no screen to render the web page). I even tried rooting my phone and installing software so that I could make it a hotspot that only microcontrollers could connect to. Even after corresponding with multiple app developers, I was unable to work out a viable solution (I had no way to limit the hotspot to the specific devices we were using in class). To make matters worse, the free and super easy to use service I had been using (Ubidots) changed their terms of service (no longer free). So, I decided to break down and figure out how to read information from and log sensor values to a Google spreadsheet. I figured this would be a great sustainable solution as it would be free and you can do all sorts of things using Google Apps Script like send an email based on high or low sensor reading. That said, communicating with a Google spreadsheet using a microcontroller is a lot easier said than done since Google redirects users to another web page when using such services. Initially, I figured out a way to tweak Sujay Phadke's HTTPSRedirect library to obtain the bidirectional communication I sought. Finally, in March of 2017, our IT department got rid of the splash page and Sujay Phadke released a much-improved version of his library. Even so, it took another couple weeks for me to figure out how to get an esp8266 to consistently connect to the guest network. Eventually, I figured out that it was having trouble connecting in an environment where multiple routers were broadcasting the same SSID. The final piece of the puzzle was figuring out how to specify the BSSID and channel of the router in my classroom. |