In this project, we demonstrate how to stream Bluetooth Low Energy (BLE) sensor data directly into Microsoft Power BI using the BleuIO USB dongle. By combining a HibouAir environmental sensor with BleuIO and a simple Python script, we can capture live readings of CO2, temperature, and humidity and display them in real time on a Power BI dashboard.
The goal of this project is to make BLE data visualization simple and accessible. Instead of dealing with complex server setups or containers, BleuIO provides an easy way to turn raw BLE advertising packets into meaningful insights that anyone can understand at a glance.
Why Power BI?Microsoft Power BIis a business analytics platform designed to turn raw data into interactive dashboards and reports. One of its most powerful features is the ability to handle real-time streaming datasets, allowing live updates from sensors or IoT devices.
For IoT developers and organizations, this is a game-changer. Imagine watching air quality readings from your office appear in real time, or combining BLE sensor data with other business metrics to get a fuller picture of your environment. By using BleuIO as a BLE-to-cloud bridge, developers can integrate IoT data into Power BI dashboards quickly, without heavy infrastructure.
RequirementsTo follow this tutorial, you will need:
- A BleuIO USB dongle.
- A HibouAir air quality monitor(for CO2, temperature, and humidity).
- A free or paid Microsoft Power BI account.
- The Python libraries
pyserial
andrequests
, which can be installed with:pip install pyserial requests
Before writing any code, we need to set up a streaming dataset in Power BI.
- Log in to Power BI Service and go to My workspace.
- Select New → Streaming dataset → API.
Define the fields you’ll collect from the sensor:
CO2
(Number)temperature
(Number)humidity
(Number)timestamp
(DateTime or Text)- Define the fields you’ll collect from the sensor:
CO2
(Number)temperature
(Number)humidity
(Number)timestamp
(DateTime or Text) - Toggle Historic data analysis ON if you want Power BI to store rows for reporting.
- Save the dataset and copy the Push URL that Power BI generates. This will look something like:
https://api.powerbi.com/beta/.../datasets/{id}/rows?key=...
This Push URL is what the Python script will use to send live sensor data to your dashboard.
The ScriptWe wrote a Python script that takes care of the entire process. Once it starts, the script connects to the BleuIO dongle through the serial port and switches it into central mode (this is done only the first time it runs). From then on, it performs a BLE scan every 10 seconds, specifically looking for HibouAir sensor advertising data. When the sensor is found, the script decodes the broadcast payload into CO2, temperature, and humidity values. These values are then packaged into the required JSON format and pushed directly to Power BI, where they appear instantly on your dashboard.
Before running the script, make sure to update two important details:
- Dongle port location: On macOS it will look like
/dev/cu.usbmodemXXXX
, while on Windows it will appear asCOMX
. - Power BI Push URL: Use the one you generated earlier during the dataset setup.
We’ve published the full script on GitHub here:GitHub Link for Script
To run it:
python script.py
Setup DashboardWith the script running and sending live data, the next step is to build your Power BI dashboard.
- Go to My workspace in Power BI and click New → Dashboard.
- Give the dashboard a descriptive name, for example HibouAir Live Data.
- Select + Add a tile → Custom streaming data, then choose the dataset you created earlier.
Pick a visualization type that suits your needs:
- A Card to display the current CO₂ value.
- A Gauge to track temperature within a target range.
- A Line chart to watch humidity changes over time.
- Pick a visualization type that suits your needs:A Card to display the current CO₂ value.A Gauge to track temperature within a target range.A Line chart to watch humidity changes over time.
- Map the fields (
CO2
,temperature
,humidity
,timestamp
) to each visual and pin them to your dashboard.
Within seconds of running the script, you’ll see live sensor readings begin to appear in your Power BI dashboard — updating automatically with every scan.
OutputHere’s what the final result looks like when the dashboard starts receiving data from the HibouAir sensor.
This project shows just one way to use BLE and Power BI together, but the possibilities are broad. For example, you could build air quality monitoring dashboards in offices, schools, or factories to help maintain healthier environments. In agriculture, farmers could create smart dashboards that combine soil and environmental sensors to optimize crop conditions. The same method can be applied to cold chain logistics, where monitoring temperature and humidity is essential for transporting food or medicine. Fitness and health enthusiasts could stream real-time data from BLE wearables into personal dashboards, making progress more visible and motivating. And for developers, Power BI is an excellent tool for rapid IoT prototyping, offering instant visualization of new sensor data without building a complex backend system.
With BleuIO and Microsoft Power BI, it’s easy to transform BLE sensor broadcasts into live dashboards. This integration makes it possible to visualize environmental data in real time, share insights instantly, and build prototypes faster than ever before. Whether you’re a developer, researcher, or business professional, combining BLE sensors with Power BI opens the door to smarter, data-driven decisions.
Comments