{"id":252,"date":"2023-04-21T11:53:52","date_gmt":"2023-04-21T11:53:52","guid":{"rendered":"https:\/\/www.hibouair.com\/blog\/?p=252"},"modified":"2023-04-27T07:16:53","modified_gmt":"2023-04-27T07:16:53","slug":"create-your-own-real-time-desktop-co2-widget-using-hibouair","status":"publish","type":"post","link":"https:\/\/www.hibouair.com\/blog\/create-your-own-real-time-desktop-co2-widget-using-hibouair\/","title":{"rendered":"Create your own real-time desktop CO2 widget using HibouAir"},"content":{"rendered":"\n<p>Creating a small real-time desktop CO2 widget using JavaScript and Bluetooth is a fun and engaging project that can help you understand how to work with Bluetooth communication and sensor data processing.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>In this project we will use <a href=\"https:\/\/bleuio.com\/\" target=\"_blank\" rel=\"noreferrer noopener\"><strong>BleuIO<\/strong><\/a> to communicate with air quality monitoring sensor to read CO2 data. BleuIO is a bluetooth low energy usb dongle that helps to create BLE application easily. The AT command available on this device makes the development faster and easier. <\/p>\n\n\n\n<p>There are many <a href=\"https:\/\/www.hibouair.com\/\">air quality sensor<\/a> available but one popular choice is the <strong>HibouAir<\/strong>. <\/p>\n\n\n\n<p>We will use <a href=\"https:\/\/www.electronjs.org\/\" target=\"_blank\" rel=\"noreferrer noopener\">electron<\/a> js and <a href=\"https:\/\/serialport.io\/docs\/\" target=\"_blank\" rel=\"noreferrer noopener\">node serial<\/a> to connect with BleuIO. After that we will use <a href=\"https:\/\/www.bleuio.com\/getting_started\/docs\/commands\/\" target=\"_blank\" rel=\"noreferrer noopener\">AT commands<\/a> to scan for nearby Bluetooth device that is advertising with a given board ID which is the air quality monitoring sensor. <\/p>\n\n\n\n<p>Requirments : <\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><a href=\"https:\/\/bleuio.com\/\" target=\"_blank\" rel=\"noreferrer noopener\">BleuIO<\/a> <\/li>\n\n\n\n<li><a href=\"https:\/\/www.hibouair.com\/\" target=\"_blank\" rel=\"noreferrer noopener\">HibouAir &#8211; air quality monitoring sensor<\/a><\/li>\n<\/ol>\n\n\n\n<p>Note: both <a href=\"https:\/\/www.digikey.com\/en\/products\/filter\/rf-receiver-transmitter-and-transceiver-finished-units\/873?s=N4IgTCBcDaIM5wCYAZkFYQF0C%2BQ\" target=\"_blank\" rel=\"noreferrer noopener\"><strong>BleuIO<\/strong><\/a> and <strong><a href=\"https:\/\/www.digikey.com\/en\/products\/filter\/gas-sensors\/530?s=N4IgjCBcoLQBxVAYygMwIYBsDOBTANCAPZQDaIATAJwAMCAugL7NA\" target=\"_blank\" rel=\"noreferrer noopener\">HibouAir<\/a><\/strong> are available at digikey. <\/p>\n\n\n\n<p>Here are the steps you can follow to create your own widget:<\/p>\n\n\n\n<p><strong>Hardware setup : <\/strong><\/p>\n\n\n\n<p>Connect BleuIO to the computer and wait for the device to recognize it. This usually takes 10 seconds. Connect the air quality monitoring sensor HibouAir to a power cable. Make sure the device is within 50 meters. <\/p>\n\n\n\n<p><strong>Write the code :<\/strong><\/p>\n\n\n\n<p>Clone this repository from Github using <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>git clone https:\/\/github.com\/smart-sensor-devices-ab\/bluetooth-co2-desktop-widget.git<\/code><\/pre>\n\n\n\n<p>After that go inside the directory and write <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>npm install <\/code><\/pre>\n\n\n\n<p>on terminal. This will install necessary libraries. <\/p>\n\n\n\n<p>Inside this folder we will find three .js files and one html file. The index.html file is the frontend where we will see the real-time CO2 values. <\/p>\n\n\n\n<p>The main.js file initialize the application and creates an window of 200px X 200px<\/p>\n\n\n\n<p>render.js is the file which has all the logic go connect to BleuIO via serial port , gets real-time air quality data, decode it and finally print it on the screen. <\/p>\n\n\n\n<p><strong>Code explanation :<\/strong><\/p>\n\n\n\n<p>On render.js file, at first we make a list of devices connected to serial port.  Then we filter out only the BleuIO devices by filtering with vendorID which is <strong>2dcf<\/strong>. After that we pick the first item of the list. <\/p>\n\n\n\n<p>Once we know the path of the BleuIO device , we connect to it. <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ports = ports.filter((x) =&gt; x.vendorId == \"2dcf\");\n      if (ports &amp;&amp; ports.length &gt; 0) {\n        port = new SerialPort({\n          path: ports&#91;0].path,\n          baudRate: 57600,\n        });\n}<\/code><\/pre>\n\n\n\n<p>Now that we are connected to the BleuIO dongle, we can write AT commands to it and get the response. <\/p>\n\n\n\n<p>At first we write <strong>AT+DUAL<\/strong> to the dongle to put the dongle in dual role. So that we can scan for nearby devices and advertised data. <\/p>\n\n\n\n<p>to put the dongle in dual role we write <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>port.write(Buffer.from(\"AT+DUAL\\r\"), function (err) {\n          if (err) {\n            document.getElementById(\"error\").textContent =\n              \"Error writing at dual\";\n          } else {\n            console.log('dongle in dual role')\n}<\/code><\/pre>\n\n\n\n<p>In this project I am trying to get air quality data from a HibouAir device which has a board ID of 45840D. Therefore I look for advertised data that has this specific boardID. If i write <strong>AT+FINDSCANDATA=4584OD<\/strong>, BleuIO will filter out only advertise data from this board ID. <\/p>\n\n\n\n<p>After writing this , we get a response from the dongle. To read the response from serial port we use <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code> port.on(\"readable\", () =&gt; {\n          let data = port.read();\nconsole.log(data)\n})<\/code><\/pre>\n\n\n\n<p>We can push the response in an array and later decide what to do with it. <\/p>\n\n\n\n<p>When we do a AT+FINDSCANDATA=45840D<\/p>\n\n\n\n<p>the response from the dongle looks something like this <\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/www.bleuio.com\/blog\/wp-content\/uploads\/2023\/04\/image-1024x223.png\" alt=\"\" class=\"wp-image-480\"\/><\/figure>\n\n\n\n<p>Then we take the last response by using <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>resp = readDataArray&#91;readDataArray.length - 2];<\/code><\/pre>\n\n\n\n<p>After that , get the advertised data from the string by <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>resp.split(\" \").pop();<\/code><\/pre>\n\n\n\n<p>Now we have the advertised data in a variable. We can easily get the CO2 value from this string by selecting the position. The documentation from HibouAirs says , the CO2 value is right at the end of the string. In that case the value is 023A which is 570 is decimal. <\/p>\n\n\n\n<p>We can print this value in our screen. <\/p>\n\n\n\n<p>We can create a function that do the scanning every 20 seconds to get latest values. <\/p>\n\n\n\n<p>Here is the complete code to render.js file<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/\/ This file is required by the index.html file and will\n\/\/ be executed in the renderer process for that window.\n\/\/ All of the Node.js APIs are available in this process.\nconst { SerialPort } = require(\"serialport\");\nvar port;\nvar readDataArray = &#91;];\nasync function listSerialPorts() {\n  await SerialPort.list().then((ports, err) =&gt; {\n    if (err) {\n      document.getElementById(\"error\").textContent = err.message;\n      return;\n    } else {\n      document.getElementById(\"error\").textContent = \"\";\n    }\n    console.log(\"ports\", ports);\n\n    if (ports.length === 0) {\n      document.getElementById(\"error\").textContent = \"No ports discovered\";\n    } else {\n      ports = ports.filter((x) =&gt; x.vendorId == \"2dcf\");\n      if (ports &amp;&amp; ports.length &gt; 0) {\n        port = new SerialPort({\n          path: ports&#91;0].path,\n          baudRate: 57600,\n        });\n        port.write(Buffer.from(\"AT+DUAL\\r\"), function (err) {\n          if (err) {\n            document.getElementById(\"error\").textContent =\n              \"Error writing at dual\";\n          } else {\n            const myWriteFunc = () =&gt; {\n              port.write(Buffer.from(\"AT+FINDSCANDATA=5B0705=3\\r\")),\n                function (err) {\n                  if (err) {\n                    document.getElementById(\"error\").textContent =\n                      \"Error writing findscandata\";\n                  } else {\n                    console.log(\"here\");\n                  }\n                };\n            };\n            myWriteFunc();\n            setInterval(() =&gt; {\n              myWriteFunc();\n            }, 20000);\n          }\n        });\n        \/\/ Read serial port data\n        port.on(\"readable\", () =&gt; {\n          let data = port.read();\n          let enc = new TextDecoder();\n          let arr = new Uint8Array(data);\n          let removeRn = enc.decode(arr).replace(\/\\r?\\n|\\r\/gm, \"\");\n          if (removeRn != null) readDataArray.push(removeRn);\n          if (removeRn == \"SCAN COMPLETE\") {\n            console.log(readDataArray);\n            let resp = readDataArray&#91;readDataArray.length - 2];\n\n            let advData = resp.split(\" \").pop();\n            let pos = advData.indexOf(\"5B0705\");\n            console.log(\"advData\", advData);\n            console.log(\"c\", advData.substr(pos + 46, 4));\n            let co2 = parseInt(\"0x\" + advData.substr(pos + 46, 4));\n            console.log(co2);\n            document.getElementById(\"co2Val\").innerHTML = co2;\n          }\n        });\n      } else {\n        document.getElementById(\"error\").innerHTML =\n          \"No device found. Please connect a BleuIO ongle to your computer and try again.\";\n      }\n    }\n  });\n}\n\nfunction listPorts() {\n  listSerialPorts();\n  setTimeout(listPorts, 20000);\n}\n\n\/\/ Set a timeout that will check for new serialPorts every 2 seconds.\n\/\/ This timeout reschedules itself.\n\/\/setTimeout(listPorts, 2000);\n\nlistSerialPorts();<\/code><\/pre>\n\n\n\n<p>To build this app we need a library called electron-builder. To install this library we write on terminal <br>npm i&nbsp;electron-builder<\/p>\n\n\n\n<p>Once the library is build , we need to update our package json file and add build option or mac.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\"build\": {\n    \"appId\": \"com.co2.widget\",\n    \"productName\": \"co2-widget\",\n    \"mac\": {\n      \"category\": \"airquality.app.widget\"\n    }\n  }<\/code><\/pre>\n\n\n\n<p>We can update our script on package json like this<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\"scripts\": {\n    \"start\": \"electron .\",\n    \"pack\": \"electron-builder --dir\",\n    \"dist\": \"electron-builder\"\n  },<\/code><\/pre>\n\n\n\n<p>Once we are done, build the app with <\/p>\n\n\n\n<p>npm run build<\/p>\n\n\n\n<p>We will see a dmg file in our dist folder. Once we run the app, the widget will look like this.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/www.bleuio.com\/blog\/wp-content\/uploads\/2023\/04\/Screenshot-2023-04-21-at-16.59.12-1024x576.png\" alt=\"\" class=\"wp-image-481\"\/><\/figure>\n\n\n\n<p>The value will update every 20 seconds.<\/p>\n\n\n\n<p>In conclusion, monitoring indoor CO2 levels is essential for maintaining a healthy indoor environment, particularly in light of the ongoing COVID-19 pandemic. HibouAir is an air quality monitoring device that can help you monitor indoor CO2 levels in real-time. By installing and setting up the HibouAir widget on your desktop, you can easily monitor indoor CO2 levels and take steps to improve indoor air quality. With its easy-to-use bluetooth interface, HibouAir is a valuable tool for anyone looking to maintain a healthy indoor environment.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Creating a small real-time desktop CO2 widget using JavaScript and Bluetooth is a fun and engaging project that can help you understand how to work [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":255,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-252","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blog"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Create your own real-time desktop CO2 widget using HibouAir - HibouAir<\/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.hibouair.com\/blog\/create-your-own-real-time-desktop-co2-widget-using-hibouair\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Create your own real-time desktop CO2 widget using HibouAir - HibouAir\" \/>\n<meta property=\"og:description\" content=\"Creating a small real-time desktop CO2 widget using JavaScript and Bluetooth is a fun and engaging project that can help you understand how to work [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.hibouair.com\/blog\/create-your-own-real-time-desktop-co2-widget-using-hibouair\/\" \/>\n<meta property=\"og:site_name\" content=\"HibouAir\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/HibouAir\/\" \/>\n<meta property=\"article:published_time\" content=\"2023-04-21T11:53:52+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-04-27T07:16:53+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.hibouair.com\/blog\/wp-content\/uploads\/2023\/04\/realtime-co2-desktop-widget-with-hibouair.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"800\" \/>\n\t<meta property=\"og:image:height\" content=\"450\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"haAdmin\" \/>\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.hibouair.com\\\/blog\\\/create-your-own-real-time-desktop-co2-widget-using-hibouair\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.hibouair.com\\\/blog\\\/create-your-own-real-time-desktop-co2-widget-using-hibouair\\\/\"},\"author\":{\"name\":\"haAdmin\",\"@id\":\"https:\\\/\\\/www.hibouair.com\\\/blog\\\/#\\\/schema\\\/person\\\/6c1c64d2ee7253fdd65a1dce29592dc3\"},\"headline\":\"Create your own real-time desktop CO2 widget using HibouAir\",\"datePublished\":\"2023-04-21T11:53:52+00:00\",\"dateModified\":\"2023-04-27T07:16:53+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.hibouair.com\\\/blog\\\/create-your-own-real-time-desktop-co2-widget-using-hibouair\\\/\"},\"wordCount\":791,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.hibouair.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.hibouair.com\\\/blog\\\/create-your-own-real-time-desktop-co2-widget-using-hibouair\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.hibouair.com\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/04\\\/realtime-co2-desktop-widget-with-hibouair.jpg\",\"articleSection\":[\"Blog\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.hibouair.com\\\/blog\\\/create-your-own-real-time-desktop-co2-widget-using-hibouair\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.hibouair.com\\\/blog\\\/create-your-own-real-time-desktop-co2-widget-using-hibouair\\\/\",\"url\":\"https:\\\/\\\/www.hibouair.com\\\/blog\\\/create-your-own-real-time-desktop-co2-widget-using-hibouair\\\/\",\"name\":\"Create your own real-time desktop CO2 widget using HibouAir - HibouAir\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.hibouair.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.hibouair.com\\\/blog\\\/create-your-own-real-time-desktop-co2-widget-using-hibouair\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.hibouair.com\\\/blog\\\/create-your-own-real-time-desktop-co2-widget-using-hibouair\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.hibouair.com\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/04\\\/realtime-co2-desktop-widget-with-hibouair.jpg\",\"datePublished\":\"2023-04-21T11:53:52+00:00\",\"dateModified\":\"2023-04-27T07:16:53+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.hibouair.com\\\/blog\\\/create-your-own-real-time-desktop-co2-widget-using-hibouair\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.hibouair.com\\\/blog\\\/create-your-own-real-time-desktop-co2-widget-using-hibouair\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.hibouair.com\\\/blog\\\/create-your-own-real-time-desktop-co2-widget-using-hibouair\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.hibouair.com\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/04\\\/realtime-co2-desktop-widget-with-hibouair.jpg\",\"contentUrl\":\"https:\\\/\\\/www.hibouair.com\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/04\\\/realtime-co2-desktop-widget-with-hibouair.jpg\",\"width\":800,\"height\":450},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.hibouair.com\\\/blog\\\/create-your-own-real-time-desktop-co2-widget-using-hibouair\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.hibouair.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Create your own real-time desktop CO2 widget using HibouAir\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.hibouair.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.hibouair.com\\\/blog\\\/\",\"name\":\"HibouAir\",\"description\":\"Air Quality Monitor\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.hibouair.com\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.hibouair.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.hibouair.com\\\/blog\\\/#organization\",\"name\":\"HibouAir\",\"url\":\"https:\\\/\\\/www.hibouair.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.hibouair.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.hibouair.com\\\/blog\\\/wp-content\\\/uploads\\\/2025\\\/02\\\/logo.png\",\"contentUrl\":\"https:\\\/\\\/www.hibouair.com\\\/blog\\\/wp-content\\\/uploads\\\/2025\\\/02\\\/logo.png\",\"width\":430,\"height\":100,\"caption\":\"HibouAir\"},\"image\":{\"@id\":\"https:\\\/\\\/www.hibouair.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/HibouAir\\\/\",\"https:\\\/\\\/www.linkedin.com\\\/showcase\\\/hibouair\\\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.hibouair.com\\\/blog\\\/#\\\/schema\\\/person\\\/6c1c64d2ee7253fdd65a1dce29592dc3\",\"name\":\"haAdmin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/13bfd0bbf3e4d9b166e8724f7d264069e26f1ef32c3868ecbe6d44d8e46e6bba?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/13bfd0bbf3e4d9b166e8724f7d264069e26f1ef32c3868ecbe6d44d8e46e6bba?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/13bfd0bbf3e4d9b166e8724f7d264069e26f1ef32c3868ecbe6d44d8e46e6bba?s=96&d=mm&r=g\",\"caption\":\"haAdmin\"},\"sameAs\":[\"https:\\\/\\\/www.hibouair.com\\\/blog\"],\"url\":\"https:\\\/\\\/www.hibouair.com\\\/blog\\\/author\\\/haadmin\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Create your own real-time desktop CO2 widget using HibouAir - HibouAir","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.hibouair.com\/blog\/create-your-own-real-time-desktop-co2-widget-using-hibouair\/","og_locale":"en_US","og_type":"article","og_title":"Create your own real-time desktop CO2 widget using HibouAir - HibouAir","og_description":"Creating a small real-time desktop CO2 widget using JavaScript and Bluetooth is a fun and engaging project that can help you understand how to work [&hellip;]","og_url":"https:\/\/www.hibouair.com\/blog\/create-your-own-real-time-desktop-co2-widget-using-hibouair\/","og_site_name":"HibouAir","article_publisher":"https:\/\/www.facebook.com\/HibouAir\/","article_published_time":"2023-04-21T11:53:52+00:00","article_modified_time":"2023-04-27T07:16:53+00:00","og_image":[{"width":800,"height":450,"url":"https:\/\/www.hibouair.com\/blog\/wp-content\/uploads\/2023\/04\/realtime-co2-desktop-widget-with-hibouair.jpg","type":"image\/jpeg"}],"author":"haAdmin","twitter_card":"summary_large_image","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.hibouair.com\/blog\/create-your-own-real-time-desktop-co2-widget-using-hibouair\/#article","isPartOf":{"@id":"https:\/\/www.hibouair.com\/blog\/create-your-own-real-time-desktop-co2-widget-using-hibouair\/"},"author":{"name":"haAdmin","@id":"https:\/\/www.hibouair.com\/blog\/#\/schema\/person\/6c1c64d2ee7253fdd65a1dce29592dc3"},"headline":"Create your own real-time desktop CO2 widget using HibouAir","datePublished":"2023-04-21T11:53:52+00:00","dateModified":"2023-04-27T07:16:53+00:00","mainEntityOfPage":{"@id":"https:\/\/www.hibouair.com\/blog\/create-your-own-real-time-desktop-co2-widget-using-hibouair\/"},"wordCount":791,"commentCount":0,"publisher":{"@id":"https:\/\/www.hibouair.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.hibouair.com\/blog\/create-your-own-real-time-desktop-co2-widget-using-hibouair\/#primaryimage"},"thumbnailUrl":"https:\/\/www.hibouair.com\/blog\/wp-content\/uploads\/2023\/04\/realtime-co2-desktop-widget-with-hibouair.jpg","articleSection":["Blog"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.hibouair.com\/blog\/create-your-own-real-time-desktop-co2-widget-using-hibouair\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.hibouair.com\/blog\/create-your-own-real-time-desktop-co2-widget-using-hibouair\/","url":"https:\/\/www.hibouair.com\/blog\/create-your-own-real-time-desktop-co2-widget-using-hibouair\/","name":"Create your own real-time desktop CO2 widget using HibouAir - HibouAir","isPartOf":{"@id":"https:\/\/www.hibouair.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.hibouair.com\/blog\/create-your-own-real-time-desktop-co2-widget-using-hibouair\/#primaryimage"},"image":{"@id":"https:\/\/www.hibouair.com\/blog\/create-your-own-real-time-desktop-co2-widget-using-hibouair\/#primaryimage"},"thumbnailUrl":"https:\/\/www.hibouair.com\/blog\/wp-content\/uploads\/2023\/04\/realtime-co2-desktop-widget-with-hibouair.jpg","datePublished":"2023-04-21T11:53:52+00:00","dateModified":"2023-04-27T07:16:53+00:00","breadcrumb":{"@id":"https:\/\/www.hibouair.com\/blog\/create-your-own-real-time-desktop-co2-widget-using-hibouair\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.hibouair.com\/blog\/create-your-own-real-time-desktop-co2-widget-using-hibouair\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.hibouair.com\/blog\/create-your-own-real-time-desktop-co2-widget-using-hibouair\/#primaryimage","url":"https:\/\/www.hibouair.com\/blog\/wp-content\/uploads\/2023\/04\/realtime-co2-desktop-widget-with-hibouair.jpg","contentUrl":"https:\/\/www.hibouair.com\/blog\/wp-content\/uploads\/2023\/04\/realtime-co2-desktop-widget-with-hibouair.jpg","width":800,"height":450},{"@type":"BreadcrumbList","@id":"https:\/\/www.hibouair.com\/blog\/create-your-own-real-time-desktop-co2-widget-using-hibouair\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.hibouair.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Create your own real-time desktop CO2 widget using HibouAir"}]},{"@type":"WebSite","@id":"https:\/\/www.hibouair.com\/blog\/#website","url":"https:\/\/www.hibouair.com\/blog\/","name":"HibouAir","description":"Air Quality Monitor","publisher":{"@id":"https:\/\/www.hibouair.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.hibouair.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.hibouair.com\/blog\/#organization","name":"HibouAir","url":"https:\/\/www.hibouair.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.hibouair.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.hibouair.com\/blog\/wp-content\/uploads\/2025\/02\/logo.png","contentUrl":"https:\/\/www.hibouair.com\/blog\/wp-content\/uploads\/2025\/02\/logo.png","width":430,"height":100,"caption":"HibouAir"},"image":{"@id":"https:\/\/www.hibouair.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/HibouAir\/","https:\/\/www.linkedin.com\/showcase\/hibouair\/"]},{"@type":"Person","@id":"https:\/\/www.hibouair.com\/blog\/#\/schema\/person\/6c1c64d2ee7253fdd65a1dce29592dc3","name":"haAdmin","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/13bfd0bbf3e4d9b166e8724f7d264069e26f1ef32c3868ecbe6d44d8e46e6bba?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/13bfd0bbf3e4d9b166e8724f7d264069e26f1ef32c3868ecbe6d44d8e46e6bba?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/13bfd0bbf3e4d9b166e8724f7d264069e26f1ef32c3868ecbe6d44d8e46e6bba?s=96&d=mm&r=g","caption":"haAdmin"},"sameAs":["https:\/\/www.hibouair.com\/blog"],"url":"https:\/\/www.hibouair.com\/blog\/author\/haadmin\/"}]}},"_links":{"self":[{"href":"https:\/\/www.hibouair.com\/blog\/wp-json\/wp\/v2\/posts\/252","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hibouair.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hibouair.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hibouair.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hibouair.com\/blog\/wp-json\/wp\/v2\/comments?post=252"}],"version-history":[{"count":2,"href":"https:\/\/www.hibouair.com\/blog\/wp-json\/wp\/v2\/posts\/252\/revisions"}],"predecessor-version":[{"id":257,"href":"https:\/\/www.hibouair.com\/blog\/wp-json\/wp\/v2\/posts\/252\/revisions\/257"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.hibouair.com\/blog\/wp-json\/wp\/v2\/media\/255"}],"wp:attachment":[{"href":"https:\/\/www.hibouair.com\/blog\/wp-json\/wp\/v2\/media?parent=252"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hibouair.com\/blog\/wp-json\/wp\/v2\/categories?post=252"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hibouair.com\/blog\/wp-json\/wp\/v2\/tags?post=252"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}