{"id":1105,"date":"2021-02-26T15:57:57","date_gmt":"2021-02-26T15:57:57","guid":{"rendered":"https:\/\/smartsensordevices.com\/?p=1105"},"modified":"2021-05-05T13:44:43","modified_gmt":"2021-05-05T13:44:43","slug":"send-ble-data-to-cloud","status":"publish","type":"post","link":"https:\/\/smartsensordevices.com\/blog\/send-ble-data-to-cloud\/","title":{"rendered":"Send BLE data to cloud"},"content":{"rendered":"\n<p>In this article, we will see how to send BLE data to the cloud. Together with the BleuIO javascript library and BleuIO USB dongle, we will get BLE data from HibouAir. After getting the advertised data, we will pass it to a simple function that will give us an object with meaningful air quality data numbers. Then we will send the data to the firebase cloud.&nbsp;<\/p>\n\n\n\n<p>For this project, we will need&nbsp;<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><a href=\"https:\/\/www.bleuio.com\/\">BleuIO USB dongle<\/a>.<\/li><li><a href=\"http:\/\/hibouair.com\">HibouAir &#8211; Air Quality Monitor<\/a><\/li><li>Firebase account.<\/li><\/ul>\n\n\n\n<p><strong>Step 1:<\/strong><\/p>\n\n\n\n<p>Clone the GitHub repository using&nbsp;<strong>git clone https:\/\/github.com\/smart-sensor-devices-ab\/hbiouAirToFirebase.git<\/strong><\/p>\n\n\n\n<p><strong>Step 2:<\/strong><\/p>\n\n\n\n<p>Create a firebase account from https:\/\/firebase.google.com\/. After creating a firebase account, create a project and an app under this project. Make sure its a web app. Once the app is ready, collect your app information API key, apiKey etc.<\/p>\n\n\n\n<p>Also, make sure your firebase database read-write rules are true.<\/p>\n\n\n\n<p>{ &#8220;rules&#8221;: { &#8220;.read&#8221;: true, &#8220;.write&#8221;: true } }<\/p>\n\n\n\n<p>Now open firebaseconfig.js file from the root folder and paste your information.<\/p>\n\n\n\n<p><strong>Step 3:<\/strong><\/p>\n\n\n\n<p>Let&#8217;s start the app. To run the app, we need to have a website bundler. We can use parceljs. Install parceljs from https:\/\/parceljs.org\/getting_started.html<\/p>\n\n\n\n<p>Once it&#8217;s installed, go to the app folder and type parcel index.html<\/p>\n\n\n\n<p>You will have your app running on the browser.<\/p>\n\n\n\n<p><strong>Step 4:<\/strong><\/p>\n\n\n\n<p>Connect your dongle to your pc.&nbsp;<\/p>\n\n\n\n<p>Open the app on your browser and click connect.&nbsp;<\/p>\n\n\n\n<p>Click on the device information. If you see the device is in peripheral mode than you have to make it central.&nbsp;<\/p>\n\n\n\n<p>Click on the central button. And recheck device information.&nbsp;<\/p>\n\n\n\n<p><strong>Step 4:<\/strong><\/p>\n\n\n\n<p>Lets scan for nearby devices.&nbsp;<\/p>\n\n\n\n<p>Click on the scan button and look at the list of the scanned device on your console log. Pick any HibouAir devices and copy the device information.&nbsp;<\/p>\n\n\n\n<p>Open the index.js file and go to line 95<\/p>\n\n\n\n<p>replace the scan target information with the one you copied.<\/p>\n\n\n\n<p>Now save the page and click on send data to the cloud. If your firebase configuration is correct, you should see data showing on your cloud database.&nbsp;<\/p>\n\n\n\n<p>Right now, its sending data every 5 seconds.&nbsp;<\/p>\n\n\n\n<p>You can stop the process by clicking stop sending data.<\/p>\n\n\n\n<p>Have a look at the following video for a better understanding.&nbsp;<\/p>\n\n\n\n<figure class=\"wp-block-embed-youtube wp-block-embed is-type-video is-provider-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<iframe title=\"Send BLE data to cloud using BleuIO\" width=\"500\" height=\"281\" src=\"https:\/\/www.youtube.com\/embed\/uiHfxM-_It8?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>\n<\/div><\/figure>\n\n\n\n<p>Enjoy.<\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this article, we will see how to send BLE data to the cloud. Together with the BleuIO javascript library and BleuIO USB dongle, we will get BLE data from HibouAir. After getting the advertised data, we will pass it to a simple function that will give us an object with meaningful air quality data [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":1107,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7,18,21],"tags":[],"class_list":["post-1105","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-air-quality","category-bleuio","category-bleuio-tutorial"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v23.0 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Send BLE data to cloud - SMART SENSOR DEVICES AB<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/smartsensordevices.com\/blog\/send-ble-data-to-cloud\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Send BLE data to cloud - SMART SENSOR DEVICES AB\" \/>\n<meta property=\"og:description\" content=\"In this article, we will see how to send BLE data to the cloud. Together with the BleuIO javascript library and BleuIO USB dongle, we will get BLE data from HibouAir. After getting the advertised data, we will pass it to a simple function that will give us an object with meaningful air quality data [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/smartsensordevices.com\/blog\/send-ble-data-to-cloud\/\" \/>\n<meta property=\"og:site_name\" content=\"SMART SENSOR DEVICES AB\" \/>\n<meta property=\"article:published_time\" content=\"2021-02-26T15:57:57+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-05-05T13:44:43+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/smartsensordevices.com\/blog\/wp-content\/uploads\/2021\/02\/bleuiocloud.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"620\" \/>\n\t<meta property=\"og:image:height\" content=\"350\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"siteManager\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@ssd_techs\" \/>\n<meta name=\"twitter:site\" content=\"@ssd_techs\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"siteManager\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/smartsensordevices.com\/blog\/send-ble-data-to-cloud\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/smartsensordevices.com\/blog\/send-ble-data-to-cloud\/\"},\"author\":{\"name\":\"siteManager\",\"@id\":\"https:\/\/smartsensordevices.com\/blog\/#\/schema\/person\/fb91963eccab9e33d2377d360b28d7a1\"},\"headline\":\"Send BLE data to cloud\",\"datePublished\":\"2021-02-26T15:57:57+00:00\",\"dateModified\":\"2021-05-05T13:44:43+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/smartsensordevices.com\/blog\/send-ble-data-to-cloud\/\"},\"wordCount\":396,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/smartsensordevices.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/smartsensordevices.com\/blog\/send-ble-data-to-cloud\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/smartsensordevices.com\/blog\/wp-content\/uploads\/2021\/02\/bleuiocloud.jpg\",\"articleSection\":[\"Air quality\",\"BleuIO\",\"BleuIO tutorial\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/smartsensordevices.com\/blog\/send-ble-data-to-cloud\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/smartsensordevices.com\/blog\/send-ble-data-to-cloud\/\",\"url\":\"https:\/\/smartsensordevices.com\/blog\/send-ble-data-to-cloud\/\",\"name\":\"Send BLE data to cloud - SMART SENSOR DEVICES AB\",\"isPartOf\":{\"@id\":\"https:\/\/smartsensordevices.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/smartsensordevices.com\/blog\/send-ble-data-to-cloud\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/smartsensordevices.com\/blog\/send-ble-data-to-cloud\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/smartsensordevices.com\/blog\/wp-content\/uploads\/2021\/02\/bleuiocloud.jpg\",\"datePublished\":\"2021-02-26T15:57:57+00:00\",\"dateModified\":\"2021-05-05T13:44:43+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/smartsensordevices.com\/blog\/send-ble-data-to-cloud\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/smartsensordevices.com\/blog\/send-ble-data-to-cloud\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/smartsensordevices.com\/blog\/send-ble-data-to-cloud\/#primaryimage\",\"url\":\"https:\/\/smartsensordevices.com\/blog\/wp-content\/uploads\/2021\/02\/bleuiocloud.jpg\",\"contentUrl\":\"https:\/\/smartsensordevices.com\/blog\/wp-content\/uploads\/2021\/02\/bleuiocloud.jpg\",\"width\":620,\"height\":350},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/smartsensordevices.com\/blog\/send-ble-data-to-cloud\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/smartsensordevices.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Send BLE data to cloud\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/smartsensordevices.com\/blog\/#website\",\"url\":\"https:\/\/smartsensordevices.com\/blog\/\",\"name\":\"SMART SENSOR DEVICES AB\",\"description\":\"IOT solutions for the future\",\"publisher\":{\"@id\":\"https:\/\/smartsensordevices.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/smartsensordevices.com\/blog\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/smartsensordevices.com\/blog\/#organization\",\"name\":\"SMART SENSOR DEVICES AB\",\"url\":\"https:\/\/smartsensordevices.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/smartsensordevices.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/smartsensordevices.com\/blog\/wp-content\/uploads\/2020\/03\/cropped-SSD-color.png\",\"contentUrl\":\"https:\/\/smartsensordevices.com\/blog\/wp-content\/uploads\/2020\/03\/cropped-SSD-color.png\",\"width\":756,\"height\":230,\"caption\":\"SMART SENSOR DEVICES AB\"},\"image\":{\"@id\":\"https:\/\/smartsensordevices.com\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/x.com\/ssd_techs\",\"https:\/\/www.linkedin.com\/company\/smart-sensor-devices-ab\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/smartsensordevices.com\/blog\/#\/schema\/person\/fb91963eccab9e33d2377d360b28d7a1\",\"name\":\"siteManager\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/smartsensordevices.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/cca20a2883c689ad2ed55eff75dd546d?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/cca20a2883c689ad2ed55eff75dd546d?s=96&d=mm&r=g\",\"caption\":\"siteManager\"},\"url\":\"https:\/\/smartsensordevices.com\/blog\/author\/ssdadmin\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Send BLE data to cloud - SMART SENSOR DEVICES AB","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/smartsensordevices.com\/blog\/send-ble-data-to-cloud\/","og_locale":"en_US","og_type":"article","og_title":"Send BLE data to cloud - SMART SENSOR DEVICES AB","og_description":"In this article, we will see how to send BLE data to the cloud. Together with the BleuIO javascript library and BleuIO USB dongle, we will get BLE data from HibouAir. After getting the advertised data, we will pass it to a simple function that will give us an object with meaningful air quality data [&hellip;]","og_url":"https:\/\/smartsensordevices.com\/blog\/send-ble-data-to-cloud\/","og_site_name":"SMART SENSOR DEVICES AB","article_published_time":"2021-02-26T15:57:57+00:00","article_modified_time":"2021-05-05T13:44:43+00:00","og_image":[{"width":620,"height":350,"url":"https:\/\/smartsensordevices.com\/blog\/wp-content\/uploads\/2021\/02\/bleuiocloud.jpg","type":"image\/jpeg"}],"author":"siteManager","twitter_card":"summary_large_image","twitter_creator":"@ssd_techs","twitter_site":"@ssd_techs","twitter_misc":{"Written by":"siteManager","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/smartsensordevices.com\/blog\/send-ble-data-to-cloud\/#article","isPartOf":{"@id":"https:\/\/smartsensordevices.com\/blog\/send-ble-data-to-cloud\/"},"author":{"name":"siteManager","@id":"https:\/\/smartsensordevices.com\/blog\/#\/schema\/person\/fb91963eccab9e33d2377d360b28d7a1"},"headline":"Send BLE data to cloud","datePublished":"2021-02-26T15:57:57+00:00","dateModified":"2021-05-05T13:44:43+00:00","mainEntityOfPage":{"@id":"https:\/\/smartsensordevices.com\/blog\/send-ble-data-to-cloud\/"},"wordCount":396,"commentCount":0,"publisher":{"@id":"https:\/\/smartsensordevices.com\/blog\/#organization"},"image":{"@id":"https:\/\/smartsensordevices.com\/blog\/send-ble-data-to-cloud\/#primaryimage"},"thumbnailUrl":"https:\/\/smartsensordevices.com\/blog\/wp-content\/uploads\/2021\/02\/bleuiocloud.jpg","articleSection":["Air quality","BleuIO","BleuIO tutorial"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/smartsensordevices.com\/blog\/send-ble-data-to-cloud\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/smartsensordevices.com\/blog\/send-ble-data-to-cloud\/","url":"https:\/\/smartsensordevices.com\/blog\/send-ble-data-to-cloud\/","name":"Send BLE data to cloud - SMART SENSOR DEVICES AB","isPartOf":{"@id":"https:\/\/smartsensordevices.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/smartsensordevices.com\/blog\/send-ble-data-to-cloud\/#primaryimage"},"image":{"@id":"https:\/\/smartsensordevices.com\/blog\/send-ble-data-to-cloud\/#primaryimage"},"thumbnailUrl":"https:\/\/smartsensordevices.com\/blog\/wp-content\/uploads\/2021\/02\/bleuiocloud.jpg","datePublished":"2021-02-26T15:57:57+00:00","dateModified":"2021-05-05T13:44:43+00:00","breadcrumb":{"@id":"https:\/\/smartsensordevices.com\/blog\/send-ble-data-to-cloud\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/smartsensordevices.com\/blog\/send-ble-data-to-cloud\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/smartsensordevices.com\/blog\/send-ble-data-to-cloud\/#primaryimage","url":"https:\/\/smartsensordevices.com\/blog\/wp-content\/uploads\/2021\/02\/bleuiocloud.jpg","contentUrl":"https:\/\/smartsensordevices.com\/blog\/wp-content\/uploads\/2021\/02\/bleuiocloud.jpg","width":620,"height":350},{"@type":"BreadcrumbList","@id":"https:\/\/smartsensordevices.com\/blog\/send-ble-data-to-cloud\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/smartsensordevices.com\/"},{"@type":"ListItem","position":2,"name":"Send BLE data to cloud"}]},{"@type":"WebSite","@id":"https:\/\/smartsensordevices.com\/blog\/#website","url":"https:\/\/smartsensordevices.com\/blog\/","name":"SMART SENSOR DEVICES AB","description":"IOT solutions for the future","publisher":{"@id":"https:\/\/smartsensordevices.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/smartsensordevices.com\/blog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/smartsensordevices.com\/blog\/#organization","name":"SMART SENSOR DEVICES AB","url":"https:\/\/smartsensordevices.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/smartsensordevices.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/smartsensordevices.com\/blog\/wp-content\/uploads\/2020\/03\/cropped-SSD-color.png","contentUrl":"https:\/\/smartsensordevices.com\/blog\/wp-content\/uploads\/2020\/03\/cropped-SSD-color.png","width":756,"height":230,"caption":"SMART SENSOR DEVICES AB"},"image":{"@id":"https:\/\/smartsensordevices.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/x.com\/ssd_techs","https:\/\/www.linkedin.com\/company\/smart-sensor-devices-ab\/"]},{"@type":"Person","@id":"https:\/\/smartsensordevices.com\/blog\/#\/schema\/person\/fb91963eccab9e33d2377d360b28d7a1","name":"siteManager","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/smartsensordevices.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/cca20a2883c689ad2ed55eff75dd546d?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/cca20a2883c689ad2ed55eff75dd546d?s=96&d=mm&r=g","caption":"siteManager"},"url":"https:\/\/smartsensordevices.com\/blog\/author\/ssdadmin\/"}]}},"_links":{"self":[{"href":"https:\/\/smartsensordevices.com\/blog\/wp-json\/wp\/v2\/posts\/1105"}],"collection":[{"href":"https:\/\/smartsensordevices.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/smartsensordevices.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/smartsensordevices.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/smartsensordevices.com\/blog\/wp-json\/wp\/v2\/comments?post=1105"}],"version-history":[{"count":1,"href":"https:\/\/smartsensordevices.com\/blog\/wp-json\/wp\/v2\/posts\/1105\/revisions"}],"predecessor-version":[{"id":1108,"href":"https:\/\/smartsensordevices.com\/blog\/wp-json\/wp\/v2\/posts\/1105\/revisions\/1108"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/smartsensordevices.com\/blog\/wp-json\/wp\/v2\/media\/1107"}],"wp:attachment":[{"href":"https:\/\/smartsensordevices.com\/blog\/wp-json\/wp\/v2\/media?parent=1105"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/smartsensordevices.com\/blog\/wp-json\/wp\/v2\/categories?post=1105"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/smartsensordevices.com\/blog\/wp-json\/wp\/v2\/tags?post=1105"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}