{"id":262,"date":"2019-04-09T08:47:28","date_gmt":"2019-04-09T08:47:28","guid":{"rendered":"https:\/\/allabouttheproduct.com\/blog\/?p=262"},"modified":"2019-04-09T08:51:46","modified_gmt":"2019-04-09T08:51:46","slug":"smart-phone-applications-for-the-pollution-guardian-project","status":"publish","type":"post","link":"https:\/\/allabouttheproduct.com\/blog\/startup\/smart-phone-applications-for-the-pollution-guardian-project\/","title":{"rendered":"Smart Phone Applications for the Pollution Guardian Project"},"content":{"rendered":"<p>Most Internet of Things (IOT) products are associated with using very efficient protocols such as <a href=\"http:\/\/mqtt.org\/\">MQTT<\/a> over a special purpose radio link like <a href=\"https:\/\/lora-alliance.org\/\">LoRa<\/a>. However the IOT solution we are building in the Pollution Guardian project is quite different for the following reasons:<\/p>\n<ul>\n<li>As a consumer device we need interaction locally in real time.<\/li>\n<li>Our aim was to produce hardware which could be purchased for the minimum cost to the consumer and so offer benefits to as many people as possible. This meant a minimized UI on the device itself.<\/li>\n<\/ul>\n<p>These drivers brought us to the following decisions: we would build a device which reaches the internet via a smart phone bridge. We would therefore use Bluetooth Low Energy to communicate between the device and the phone.<\/p>\n<p>&nbsp;<\/p>\n<p><a href=\"https:\/\/allabouttheproduct.com\/blog\/wp-content\/uploads\/2019\/04\/system.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-263\" src=\"https:\/\/allabouttheproduct.com\/blog\/wp-content\/uploads\/2019\/04\/system.png\" alt=\"\" width=\"1229\" height=\"312\" srcset=\"https:\/\/allabouttheproduct.com\/blog\/wp-content\/uploads\/2019\/04\/system.png 1229w, https:\/\/allabouttheproduct.com\/blog\/wp-content\/uploads\/2019\/04\/system-300x76.png 300w, https:\/\/allabouttheproduct.com\/blog\/wp-content\/uploads\/2019\/04\/system-768x195.png 768w, https:\/\/allabouttheproduct.com\/blog\/wp-content\/uploads\/2019\/04\/system-1024x260.png 1024w, https:\/\/allabouttheproduct.com\/blog\/wp-content\/uploads\/2019\/04\/system-624x158.png 624w\" sizes=\"auto, (max-width: 1229px) 100vw, 1229px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>We have chosen to build our prototypes using Android as this offers a lower cost to start up than using IOS in terms of devices and computing facilities, we have been careful however throughout the project not to lock ourselves into Android-only infrastructure solutions.<\/p>\n<p>As a roadmap we realized that we needed two versions of the application: first an \u2018engineering\u2019 application optimized for our testing in laboratory and in technical field test and second a \u2018consumer\u2019 application which would deliver the experience design for a real customer.<\/p>\n<p>The engineering application was the first target since it was the means to learn about our sensor package and how it reacted to changes in pollution conditions. Even for this application we have stuck to the principle of cloud data storage as the most effective means to leverage the value of the data collected \u2013 so no memory cards or local only databases were to be implemented. Because our background was in device-side development rather than infrastructure, <a href=\"https:\/\/firebase.google.com\/\">Firebase<\/a> Real Time Database emerged immediately as a very good candidate for data storage.<\/p>\n<p>&nbsp;<\/p>\n<p><a href=\"https:\/\/allabouttheproduct.com\/blog\/wp-content\/uploads\/2019\/04\/logo-built_black.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-264\" src=\"https:\/\/allabouttheproduct.com\/blog\/wp-content\/uploads\/2019\/04\/logo-built_black.png\" alt=\"\" width=\"752\" height=\"336\" srcset=\"https:\/\/allabouttheproduct.com\/blog\/wp-content\/uploads\/2019\/04\/logo-built_black.png 752w, https:\/\/allabouttheproduct.com\/blog\/wp-content\/uploads\/2019\/04\/logo-built_black-300x134.png 300w, https:\/\/allabouttheproduct.com\/blog\/wp-content\/uploads\/2019\/04\/logo-built_black-624x279.png 624w\" sizes=\"auto, (max-width: 752px) 100vw, 752px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>Further benefits of using Firebase emerged for authentication with code snippets available for sign-on and sign-up. Firebase also handles \u2018beneath the hood\u2019 all the buffering, reconnecting and error handling needed for practical operation with a mobile device where connection to the internet may or may not be available at any moment in time.<\/p>\n<p>For the engineering phase, extraction of measurement results files for further offline analysis is essential and Firebase\u2019s admin API library enabled this in a python environment. The data could then be further analyzed with data science tools in <a href=\"https:\/\/jupyter.org\/\">Jupyter<\/a> notebooks.<\/p>\n<p>So far we have extracted data from hundreds of miles of road-test and hours of static testing \u2013 the tool set works well and extremely reliably for us. Future posts will share more about the Engineering App and how we further developed our application and cloud designs.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Most Internet of Things (IOT) products are associated with using very efficient protocols such as MQTT over a special purpose radio link like LoRa. However the IOT solution we are building in the Pollution Guardian project is quite different for the following reasons: As a consumer device we need interaction locally in real time. Our [&hellip;]<\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[40,32],"tags":[],"class_list":["post-262","post","type-post","status-publish","format-standard","hentry","category-iot","category-startup"],"_links":{"self":[{"href":"https:\/\/allabouttheproduct.com\/blog\/wp-json\/wp\/v2\/posts\/262","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/allabouttheproduct.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/allabouttheproduct.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/allabouttheproduct.com\/blog\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/allabouttheproduct.com\/blog\/wp-json\/wp\/v2\/comments?post=262"}],"version-history":[{"count":2,"href":"https:\/\/allabouttheproduct.com\/blog\/wp-json\/wp\/v2\/posts\/262\/revisions"}],"predecessor-version":[{"id":266,"href":"https:\/\/allabouttheproduct.com\/blog\/wp-json\/wp\/v2\/posts\/262\/revisions\/266"}],"wp:attachment":[{"href":"https:\/\/allabouttheproduct.com\/blog\/wp-json\/wp\/v2\/media?parent=262"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/allabouttheproduct.com\/blog\/wp-json\/wp\/v2\/categories?post=262"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/allabouttheproduct.com\/blog\/wp-json\/wp\/v2\/tags?post=262"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}