{"id":50,"date":"2021-02-26T14:00:37","date_gmt":"2021-02-26T14:00:37","guid":{"rendered":"https:\/\/www.bleuio.com\/blog\/?p=50"},"modified":"2024-04-26T10:32:48","modified_gmt":"2024-04-26T10:32:48","slug":"store-air-quality-sensor-data-from-bluetooth-device-to-google-firebase-cloud","status":"publish","type":"post","link":"https:\/\/www.bleuio.com\/blog\/store-air-quality-sensor-data-from-bluetooth-device-to-google-firebase-cloud\/","title":{"rendered":"Store air quality sensor data from Bluetooth device to google firebase 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\">\n<li><a href=\"https:\/\/www.bleuio.com\/\" target=\"_blank\" rel=\"noreferrer noopener\">BleuIO USB dongle<\/a>.<\/li>\n\n\n\n<li><a href=\"http:\/\/hibouair.com\/\" target=\"_blank\" rel=\"noreferrer noopener\">HibouAir \u2013 Air Quality Monitor<\/a><\/li>\n\n\n\n<li>Firebase account.<\/li>\n<\/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<ul class=\"wp-block-list\">\n<li>Create a firebase account from <a href=\"https:\/\/firebase.google.com\/\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/firebase.google.com\/<\/a>. <\/li>\n\n\n\n<li>After creating a firebase account, create a project and an app under this project. Make sure its a web app. <\/li>\n\n\n\n<li>Once the app is ready, collect your app information API key, apiKey etc.<\/li>\n\n\n\n<li>Add a real time database<\/li>\n<\/ul>\n\n\n\n<p>Also, make sure your firebase realtime database read-write rules are true.<\/p>\n\n\n\n<p>{ \u201crules\u201d: { \u201c.read\u201d: true, \u201c.write\u201d: true } }<\/p>\n\n\n\n<p>Now open <strong>firebaseconfig.js<\/strong> file from the root folder and paste your information collected. <\/p>\n\n\n\n<p>Note : if the database information is not on the list, please update it manually by getting the realtime database url <\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"984\" height=\"960\" src=\"https:\/\/www.bleuio.com\/blog\/wp-content\/uploads\/2024\/04\/image-13.png\" alt=\"\" class=\"wp-image-667\" srcset=\"https:\/\/www.bleuio.com\/blog\/wp-content\/uploads\/2024\/04\/image-13.png 984w, https:\/\/www.bleuio.com\/blog\/wp-content\/uploads\/2024\/04\/image-13-300x293.png 300w, https:\/\/www.bleuio.com\/blog\/wp-content\/uploads\/2024\/04\/image-13-768x749.png 768w\" sizes=\"auto, (max-width: 984px) 100vw, 984px\" \/><\/figure>\n\n\n\n<p>Follow the detailed guideline to setup firebase for this script. <\/p>\n\n\n\n<p><a href=\"https:\/\/hibouair.com\/cloud-storage\/firebase-api-instructions.pdf\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/hibouair.com\/cloud-storage\/firebase-api-instructions.pdf<\/a><\/p>\n\n\n\n<p><strong>Step 3:<\/strong><\/p>\n\n\n\n<p>Let\u2019s start the app. To run the app, we need to have a website bundler. We can use parceljs. Install parceljs from <a href=\"https:\/\/parceljs.org\/getting-started\/webapp\/\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/parceljs.org\/getting-started\/webapp\/<\/a><\/p>\n\n\n\n<p>Once it\u2019s 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<ul class=\"wp-block-list\">\n<li>Connect your dongle to your pc.\u00a0<\/li>\n<\/ul>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Open the app on your browser and click connect.\u00a0<\/li>\n<\/ul>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Click on the device information. If you see the device is in peripheral mode than you have to make it central.\u00a0<\/li>\n<\/ul>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Click on the central button. And recheck device information.\u00a0<\/li>\n<\/ul>\n\n\n\n<p><strong>Step 4:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Lets scan for nearby devices.\u00a0<\/li>\n<\/ul>\n\n\n\n<ul class=\"wp-block-list\">\n<li>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.\u00a0<\/li>\n<\/ul>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Open the index.js file and go to line 95<\/li>\n<\/ul>\n\n\n\n<ul class=\"wp-block-list\">\n<li>replace the scan target information with the one you copied.<\/li>\n\n\n\n<li>Update firebaseconfig.js with <\/li>\n<\/ul>\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>Here is the code for index.html file <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;!DOCTYPE html&gt;\n&lt;html lang=\"en\"&gt;\n  &lt;head&gt;\n    &lt;meta charset=\"UTF-8\" \/&gt;\n    &lt;meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\" \/&gt;\n    &lt;link\n      href=\"https:\/\/cdn.jsdelivr.net\/npm\/bootstrap@5.0.0-beta2\/dist\/css\/bootstrap.min.css\"\n      rel=\"stylesheet\"\n      integrity=\"sha384-BmbxuPwQa2lc\/FVzBcNJ7UAyJxM6wuqIj61tLrc4wSX0szH\/Ev+nYRRuWlolflfl\"\n      crossorigin=\"anonymous\"\n    \/&gt;\n\n    &lt;meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" \/&gt;\n    &lt;script src=\"https:\/\/www.gstatic.com\/firebasejs\/8.2.9\/firebase-app.js\"&gt;&lt;\/script&gt;\n    &lt;script src=\"https:\/\/www.gstatic.com\/firebasejs\/8.2.9\/firebase-database.js\"&gt;&lt;\/script&gt;\n    &lt;title&gt;BLE data to google firebase&lt;\/title&gt;\n  &lt;\/head&gt;\n  &lt;body&gt;\n    &lt;div class=\"container\"&gt;\n      &lt;h2&gt;Send BLE data to cloud&lt;\/h2&gt;\n      &lt;p&gt;\n        This script helps you to connect to BleuIO and sends data to Firebase\n        cloud.\n      &lt;\/p&gt;\n      &lt;p&gt;\n        Learn more about BleuIO.\n        &lt;a href=\"https:\/\/www.bleuio.com\/\"&gt;https:\/\/www.bleuio.com\/&lt;\/a&gt;\n      &lt;\/p&gt;\n      &lt;br \/&gt;\n      &lt;button class=\"btn btn-success\" id=\"connect\"&gt;Connect&lt;\/button&gt;\n      &lt;button class=\"btn btn-success\" id=\"deviceinfo\"&gt;Device Info&lt;\/button&gt;\n      &lt;!-- To get Ble data from HibouAir (Peripheral device), BleuIO has to be on central mode --&gt;\n      &lt;button class=\"btn btn-success\" id=\"central\"&gt;Central Mode&lt;\/button&gt;\n\n      &lt;button class=\"btn btn-success\" id=\"scan\"&gt;Scan for devices&lt;\/button&gt;\n\n      &lt;button class=\"btn btn-success\" id=\"sendDataTCloudBtn\"&gt;\n        Send data to cloud Data\n      &lt;\/button&gt;\n\n      &lt;button class=\"btn btn-success\" id=\"stopSendingData\"&gt;\n        Stop Sending Data\n      &lt;\/button&gt;\n      &lt;br \/&gt;&lt;br \/&gt;\n      &lt;h5&gt;&lt;div id=\"log\"&gt;&lt;\/div&gt;&lt;\/h5&gt;\n    &lt;\/div&gt;\n\n    &lt;script src=\".\/firebaseconfig.js\"&gt;&lt;\/script&gt;\n    &lt;script src=\".\/index.js\"&gt;&lt;\/script&gt;\n  &lt;\/body&gt;\n&lt;\/html&gt;<\/code><\/pre>\n\n\n\n<p>Here is the code for index.js file<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>import * as my_dongle from 'bleuio'\ndocument.getElementById('connect').addEventListener('click', function(){\n  my_dongle.at_connect()\n})\ndocument.getElementById('deviceinfo').addEventListener('click', function(){\n  my_dongle.ati().then((data)=&gt;console.log(data))\n})\ndocument.getElementById('central').addEventListener('click', function(){\n    my_dongle.at_central().then((data)=&gt;console.log(data))\n})\ndocument.getElementById('scan').addEventListener('click', function(){\nmy_dongle.at_gapscan(2).then((data)=&gt;console.log(data))\n})\nconst parseSensorData = ((input) =&gt;{\n    let counter = 13;\n    if (input.includes(\"5B070503\")) {\n      counter = 17;\n    }\n    let sensorData = {\n      sensorid:\n        input&#91;counter + 1] +\n        input&#91;counter + 2] +\n        input&#91;counter + 3] +\n        input&#91;counter + 4] +\n        input&#91;counter + 5] +\n        input&#91;counter + 6],\n      pressure:\n        parseInt(\n          input&#91;counter + 13] +\n            input&#91;counter + 14] +\n            input&#91;counter + 11] +\n            input&#91;counter + 12],\n          16\n        ) \/ 10,\n      temperature:\n        parseInt(\n          input&#91;counter + 17] +\n            input&#91;counter + 18] +\n            input&#91;counter + 15] +\n            input&#91;counter + 16],\n          16\n        ) \/ 10,\n      humidity:\n        parseInt(\n          input&#91;counter + 21] +\n            input&#91;counter + 22] +\n            input&#91;counter + 19] +\n            input&#91;counter + 20],\n          16\n        ) \/ 10,\n        voc:\n        parseInt(\n          input&#91;counter + 25] +\n            input&#91;counter + 26] +\n            input&#91;counter + 23] +\n            input&#91;counter + 24],\n          16\n        ) \/ 10,\n      als: parseInt(\n        input&#91;counter + 9] +\n          input&#91;counter + 10] +\n          input&#91;counter + 7] +\n          input&#91;counter + 8],\n        16\n      ),\n      pm1:\n        parseInt(\n          input&#91;counter + 29] +\n            input&#91;counter + 30] +\n            input&#91;counter + 27] +\n            input&#91;counter + 28],\n          16\n        ) \/ 10,\n      pm25:\n        parseInt(\n          input&#91;counter + 33] +\n            input&#91;counter + 34] +\n            input&#91;counter + 31] +\n            input&#91;counter + 32],\n          16\n        ) \/ 10,\n      pm10:\n        parseInt(\n          input&#91;counter + 37] +\n            input&#91;counter + 38] +\n            input&#91;counter + 35] +\n            input&#91;counter + 36],\n          16\n        ) \/ 10}\n    return sensorData\n  })\n\nconst sendDataToCloud = (()=&gt;{\n    \/\/get the scan target device id by scanning for device.\n    my_dongle.at_scantarget('&#91;1]F9:0D:35:E7:72:65',2).then((data)=&gt;{\n        let theAdvData = data.filter(element =&gt; element.includes(\"ADV\"));\n        if(theAdvData &amp;&amp; theAdvData.length&gt;0){\n            console.log(theAdvData)\n            let advData = theAdvData&#91;0].split(\"&#91;ADV]: \")\n            \/\/ converting advertising string to meaningfull numbers \n            \/\/and pass it to an array of objects\n            let airQualityData = parseSensorData(advData&#91;1])\n            console.log(airQualityData)\n            \/\/ save the data to database \n            let database = firebase.database(); \/\/ which gets the database \n            let ref = database.ref(\"records\");\n            \/\/pushing the object to the reference\n            ref.push(airQualityData)\n        }\n    })\n})\nvar intervalId\ndocument.getElementById('sendDataTCloudBtn').addEventListener('click', function(){\n    sendDataToCloud()\n    if (intervalId) {\n        clearInterval(intervalId);\n    }\n    intervalId = setInterval(sendDataToCloud ,5000);\n    document.getElementById(\"log\").innerHTML=\"Sending data to cloud. Click stop sending data to stop the process.\";\n\n})\ndocument.getElementById('stopSendingData').addEventListener('click', function(){\n    clearInterval(intervalId)\n    document.getElementById(\"log\").innerHTML=\"Sending data stopped.\";\n })\ndocument.getElementById('stopProcess').addEventListener('click', function(){\n   console.log(my_dongle.stop()) \n})\n<\/code><\/pre>\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<p><\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<iframe loading=\"lazy\" title=\"Send BLE data to cloud using BleuIO\" width=\"640\" height=\"360\" 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","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":51,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1,2],"tags":[],"class_list":["post-50","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-bleuio","category-bleuio-tutorial"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Store air quality sensor data from Bluetooth device to google firebase cloud - BleuIO - Create Bluetooth Low Energy application<\/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:\/\/www.bleuio.com\/blog\/store-air-quality-sensor-data-from-bluetooth-device-to-google-firebase-cloud\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Store air quality sensor data from Bluetooth device to google firebase cloud - BleuIO - Create Bluetooth Low Energy application\" \/>\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:\/\/www.bleuio.com\/blog\/store-air-quality-sensor-data-from-bluetooth-device-to-google-firebase-cloud\/\" \/>\n<meta property=\"og:site_name\" content=\"BleuIO - Create Bluetooth Low Energy application\" \/>\n<meta property=\"article:published_time\" content=\"2021-02-26T14:00:37+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-04-26T10:32:48+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.bleuio.com\/blog\/wp-content\/uploads\/2022\/01\/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=\"BleuIO\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.bleuio.com\\\/blog\\\/store-air-quality-sensor-data-from-bluetooth-device-to-google-firebase-cloud\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.bleuio.com\\\/blog\\\/store-air-quality-sensor-data-from-bluetooth-device-to-google-firebase-cloud\\\/\"},\"author\":{\"name\":\"BleuIO\",\"@id\":\"https:\\\/\\\/www.bleuio.com\\\/blog\\\/#\\\/schema\\\/person\\\/89bc581382d5964043f96efc54b75b80\"},\"headline\":\"Store air quality sensor data from Bluetooth device to google firebase cloud\",\"datePublished\":\"2021-02-26T14:00:37+00:00\",\"dateModified\":\"2024-04-26T10:32:48+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.bleuio.com\\\/blog\\\/store-air-quality-sensor-data-from-bluetooth-device-to-google-firebase-cloud\\\/\"},\"wordCount\":460,\"image\":{\"@id\":\"https:\\\/\\\/www.bleuio.com\\\/blog\\\/store-air-quality-sensor-data-from-bluetooth-device-to-google-firebase-cloud\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.bleuio.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/01\\\/bleuiocloud.jpg\",\"articleSection\":[\"BleuIO\",\"BleuIO tutorial\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.bleuio.com\\\/blog\\\/store-air-quality-sensor-data-from-bluetooth-device-to-google-firebase-cloud\\\/\",\"url\":\"https:\\\/\\\/www.bleuio.com\\\/blog\\\/store-air-quality-sensor-data-from-bluetooth-device-to-google-firebase-cloud\\\/\",\"name\":\"Store air quality sensor data from Bluetooth device to google firebase cloud - BleuIO - Create Bluetooth Low Energy application\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.bleuio.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.bleuio.com\\\/blog\\\/store-air-quality-sensor-data-from-bluetooth-device-to-google-firebase-cloud\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.bleuio.com\\\/blog\\\/store-air-quality-sensor-data-from-bluetooth-device-to-google-firebase-cloud\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.bleuio.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/01\\\/bleuiocloud.jpg\",\"datePublished\":\"2021-02-26T14:00:37+00:00\",\"dateModified\":\"2024-04-26T10:32:48+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/www.bleuio.com\\\/blog\\\/#\\\/schema\\\/person\\\/89bc581382d5964043f96efc54b75b80\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.bleuio.com\\\/blog\\\/store-air-quality-sensor-data-from-bluetooth-device-to-google-firebase-cloud\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.bleuio.com\\\/blog\\\/store-air-quality-sensor-data-from-bluetooth-device-to-google-firebase-cloud\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.bleuio.com\\\/blog\\\/store-air-quality-sensor-data-from-bluetooth-device-to-google-firebase-cloud\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.bleuio.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/01\\\/bleuiocloud.jpg\",\"contentUrl\":\"https:\\\/\\\/www.bleuio.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/01\\\/bleuiocloud.jpg\",\"width\":620,\"height\":350,\"caption\":\"Send BLE data to cloud\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.bleuio.com\\\/blog\\\/store-air-quality-sensor-data-from-bluetooth-device-to-google-firebase-cloud\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.bleuio.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Store air quality sensor data from Bluetooth device to google firebase cloud\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.bleuio.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.bleuio.com\\\/blog\\\/\",\"name\":\"BleuIO - Create Bluetooth Low Energy application\",\"description\":\"Learn Bluetooth Low Energy programming and build Bluetooth Low Energy Application\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.bleuio.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.bleuio.com\\\/blog\\\/#\\\/schema\\\/person\\\/89bc581382d5964043f96efc54b75b80\",\"name\":\"BleuIO\",\"sameAs\":[\"https:\\\/\\\/www.bleuio.com\\\/blog\"],\"url\":\"https:\\\/\\\/www.bleuio.com\\\/blog\\\/author\\\/biadmin\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Store air quality sensor data from Bluetooth device to google firebase cloud - BleuIO - Create Bluetooth Low Energy application","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:\/\/www.bleuio.com\/blog\/store-air-quality-sensor-data-from-bluetooth-device-to-google-firebase-cloud\/","og_locale":"en_US","og_type":"article","og_title":"Store air quality sensor data from Bluetooth device to google firebase cloud - BleuIO - Create Bluetooth Low Energy application","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:\/\/www.bleuio.com\/blog\/store-air-quality-sensor-data-from-bluetooth-device-to-google-firebase-cloud\/","og_site_name":"BleuIO - Create Bluetooth Low Energy application","article_published_time":"2021-02-26T14:00:37+00:00","article_modified_time":"2024-04-26T10:32:48+00:00","og_image":[{"width":620,"height":350,"url":"https:\/\/www.bleuio.com\/blog\/wp-content\/uploads\/2022\/01\/bleuiocloud.jpg","type":"image\/jpeg"}],"author":"BleuIO","twitter_card":"summary_large_image","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.bleuio.com\/blog\/store-air-quality-sensor-data-from-bluetooth-device-to-google-firebase-cloud\/#article","isPartOf":{"@id":"https:\/\/www.bleuio.com\/blog\/store-air-quality-sensor-data-from-bluetooth-device-to-google-firebase-cloud\/"},"author":{"name":"BleuIO","@id":"https:\/\/www.bleuio.com\/blog\/#\/schema\/person\/89bc581382d5964043f96efc54b75b80"},"headline":"Store air quality sensor data from Bluetooth device to google firebase cloud","datePublished":"2021-02-26T14:00:37+00:00","dateModified":"2024-04-26T10:32:48+00:00","mainEntityOfPage":{"@id":"https:\/\/www.bleuio.com\/blog\/store-air-quality-sensor-data-from-bluetooth-device-to-google-firebase-cloud\/"},"wordCount":460,"image":{"@id":"https:\/\/www.bleuio.com\/blog\/store-air-quality-sensor-data-from-bluetooth-device-to-google-firebase-cloud\/#primaryimage"},"thumbnailUrl":"https:\/\/www.bleuio.com\/blog\/wp-content\/uploads\/2022\/01\/bleuiocloud.jpg","articleSection":["BleuIO","BleuIO tutorial"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.bleuio.com\/blog\/store-air-quality-sensor-data-from-bluetooth-device-to-google-firebase-cloud\/","url":"https:\/\/www.bleuio.com\/blog\/store-air-quality-sensor-data-from-bluetooth-device-to-google-firebase-cloud\/","name":"Store air quality sensor data from Bluetooth device to google firebase cloud - BleuIO - Create Bluetooth Low Energy application","isPartOf":{"@id":"https:\/\/www.bleuio.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.bleuio.com\/blog\/store-air-quality-sensor-data-from-bluetooth-device-to-google-firebase-cloud\/#primaryimage"},"image":{"@id":"https:\/\/www.bleuio.com\/blog\/store-air-quality-sensor-data-from-bluetooth-device-to-google-firebase-cloud\/#primaryimage"},"thumbnailUrl":"https:\/\/www.bleuio.com\/blog\/wp-content\/uploads\/2022\/01\/bleuiocloud.jpg","datePublished":"2021-02-26T14:00:37+00:00","dateModified":"2024-04-26T10:32:48+00:00","author":{"@id":"https:\/\/www.bleuio.com\/blog\/#\/schema\/person\/89bc581382d5964043f96efc54b75b80"},"breadcrumb":{"@id":"https:\/\/www.bleuio.com\/blog\/store-air-quality-sensor-data-from-bluetooth-device-to-google-firebase-cloud\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.bleuio.com\/blog\/store-air-quality-sensor-data-from-bluetooth-device-to-google-firebase-cloud\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.bleuio.com\/blog\/store-air-quality-sensor-data-from-bluetooth-device-to-google-firebase-cloud\/#primaryimage","url":"https:\/\/www.bleuio.com\/blog\/wp-content\/uploads\/2022\/01\/bleuiocloud.jpg","contentUrl":"https:\/\/www.bleuio.com\/blog\/wp-content\/uploads\/2022\/01\/bleuiocloud.jpg","width":620,"height":350,"caption":"Send BLE data to cloud"},{"@type":"BreadcrumbList","@id":"https:\/\/www.bleuio.com\/blog\/store-air-quality-sensor-data-from-bluetooth-device-to-google-firebase-cloud\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.bleuio.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Store air quality sensor data from Bluetooth device to google firebase cloud"}]},{"@type":"WebSite","@id":"https:\/\/www.bleuio.com\/blog\/#website","url":"https:\/\/www.bleuio.com\/blog\/","name":"BleuIO - Create Bluetooth Low Energy application","description":"Learn Bluetooth Low Energy programming and build Bluetooth Low Energy Application","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.bleuio.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.bleuio.com\/blog\/#\/schema\/person\/89bc581382d5964043f96efc54b75b80","name":"BleuIO","sameAs":["https:\/\/www.bleuio.com\/blog"],"url":"https:\/\/www.bleuio.com\/blog\/author\/biadmin\/"}]}},"_links":{"self":[{"href":"https:\/\/www.bleuio.com\/blog\/wp-json\/wp\/v2\/posts\/50","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.bleuio.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.bleuio.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.bleuio.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.bleuio.com\/blog\/wp-json\/wp\/v2\/comments?post=50"}],"version-history":[{"count":7,"href":"https:\/\/www.bleuio.com\/blog\/wp-json\/wp\/v2\/posts\/50\/revisions"}],"predecessor-version":[{"id":669,"href":"https:\/\/www.bleuio.com\/blog\/wp-json\/wp\/v2\/posts\/50\/revisions\/669"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.bleuio.com\/blog\/wp-json\/wp\/v2\/media\/51"}],"wp:attachment":[{"href":"https:\/\/www.bleuio.com\/blog\/wp-json\/wp\/v2\/media?parent=50"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.bleuio.com\/blog\/wp-json\/wp\/v2\/categories?post=50"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.bleuio.com\/blog\/wp-json\/wp\/v2\/tags?post=50"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}