How to use Airthings Wave Radon with your Raspberry Pi

Jon-Arne Pedersen

February 2, 2018

UPDATE: Check out our Github account for the most recent scripts.


Read sensor data from Airthings Wave Radon using Raspberry Pi

The Raspberry Pi is a tiny and affordable computer that you can use for fun practical projects. This guide will show how to read sensor data from the Airthings Wave Radon using a Raspberry Pi 3 Model B over Bluetooth Low Energy (BLE). The available sensor data are temperature, humidity, running average 24-hour radon concentration and running long-term average radon concentration.

Airthings Wave Radon is a smart radon detector with quick and accurate results on your smartphone. Additionally, you can simply wave in front of the detector to get a visual indication of your radon levels.

Setup Raspberry Pi

The first step is to setup the Raspberry Pi with Raspbian. An installation guide for Raspbian can be found on the Raspberry Pi website. In short: download the Raspbian image and write it to a micro SD card.

To continue, you need access to the Raspberry Pi using either a monitor and keyboard, or by connecting through WiFi or ethernet from another computer. The latter option does not require an external screen or keyboard and is called “headless” setup. To access a headless setup, you must first activate SSH on the Pi. This can be done by creating a file named ssh in the boot partition of the SD card. Connect to the Pi using SSH from a command line interface (terminal):

$ ssh pi@raspberrypi.local

The default password for the “pi” user is “raspberry”.

Install the BLE Python wrapper

The next step is to install the bluepy Python library for talking to the BLE stack. For the current released version for Python 2.7:

pi@raspberrypi:~$ sudo apt-get install python-pip libglib2.0-dev
pi@raspberrypi:~$ sudo pip install bluepy

Further installation documentation can found at https://github.com/IanHarvey/bluepy

Read sensor data from the Airthings Wave Radon

To read the sensor data from the Airthings Wave Radon, you need the BLE address of the device. If your device is paired and connected to a phone, you may need to turn off bluetooth on your phone while using these scripts.

Next, make sure the BLE interface is turned on:

pi@raspberrypi:~$ bluetoothctl
[bluetooth]# power on

To verify this, look for “Powered: yes” after issuing the following command:

[bluetooth]# show

Exit the bluetoothctl with

[bluetooth]# quit

Download the two Python scripts by doing the following:

wget www.airthings.com/tech/find_wave.py
wget www.airthings.com/tech/read_wave.py

Run the Python script “find_wave.py” to find the BLE address of your device:

pi@raspberrypi:~ $ sudo python find_wave.py

The output will display all Airthings devices within range. The BLE address is on the form “xx:xx:xx:xx:xx:xx” and the serial number (SN) should match the SN number on the backside of your Wave. Exit the script using “Ctrl + c”. If you have many devices, you may run the command with a filter to find your BLE address:

pi@raspberrypi:~ $ sudo python find_wave.py | grep [SN]

where you replace [SN] with the serial number on the backside of your Wave Radon.

Now you are ready to read the sensor data from the Wave Radon. Run the attached script:

pi@raspberrypi:~ $ python read_wave.py xx:xx:xx:xx:xx:xx

where xx:xx:xx:xx:xx:xx is the BLE address you found using “find_wave.py”. The sensor data should now be printed. Exit the script using “Ctrl + c”.

Final notes

The “find_wave.py” is using advertising data from the Wave to find its BLE address. Only one unit can be connected to the Wave at a time. This means that these scripts only can read the Wave data while your phone is not connected to the Wave, and vice versa.

The radon measurements are given in Bq/m3 and the maximum value that can be read by the script is 16383 Bq/m3. Note that the first radon measurements are only available one hour after the batteries have been inserted. The radon long term measurements are averaged from the batteries are inserted up to one year.

This guide has been tested with Raspberry Pi 3 Model B, Raspbian Stretch (November 2017), bluepy 1.1.4 and Python 2.7.13.

Let us know how it went on our facebook page! And what you want to see next.

Our most popular products

View Plus

The most advanced smart air quality tech on the market measuring radon, particulate matter (PM), CO2, and more, plus a customizable display.
View Plus
View Plus $299

Wave Plus

The first battery-operated smart indoor air quality monitor with Radon detection, including sensors for temperature, air pressure, humidity, VOCs, and CO2.
Wave Plus
Wave Plus $229.99

Wave Radon

A smart radon detector with quick and accurate results on your smartphone.
Wave Radon
Wave Radon $199.99

Wave Mini

Now with mold risk indication! Wave Mini helps with asthma, allergies, sleep and overall health. The perfect first step to understanding health and comfort levels in any room.
Wave Mini
Wave Mini $79.99

Home

Meet Corentium Home by Airthings, a simple to use, battery-operated radon gas detector with display.
Home
Home $149.99

Hub

Complete the system. The Airthings Hub brings one or more devices online providing on-demand access to your indoor air quality (IAQ) data at anytime, from anywhere!

Radon map

Thousands of Radon sensors across the world, broken down by location. See your region's approximate risk level.

Explore

Thousands of Radon sensors across the world, broken down by location. See your region's approximate risk level.

Explore