PEHMO

Research Goal

We are collaborating with the Center for Environmental Respiratory Health Research (CERH) at the University of Oulu to better understand the impact that climate change is having on respiratory health by means of mobile and sensor instrumentation.

PEHMO: the sensing platform in a nutshell

To accomplish our goal, CIA has built four components of the sensing platform in use for this project:

  1. Mobile application for Android (PEHMO): Our app is used to collect additional contextual factors that may affect the respiratory symptoms on a daily basis. Every day, a survey regarding the impact and current asthma symptoms is collected at 21h00 (9 PM), to reflect on individuals' unique symptoms. The application also monitors users' current location every 15 minutes (both with GPS and network triangulation) to detected when the user is outdoors vs indoors, by leveraging the accuracy of the location and the number of visible satellites at the moment of the location fix. Lastly, the application scans for surrounding Bluetooth devices for RuuviTags to measure the signal strength between the smartphone and the RuuviTag.
  2. Raspberry Pi - RuuviTag gateway (PiRuuvi): RuuviTags are unable to connect directly to the internet. We utilise Raspberry Pi 3s to connect to paired RuuviTags to collect indoor climate conditions. We deploy one Raspberry Pi 3 and one RuuviTag per participant. We place the RuuviTag at the center of the house to monitor indoors' climate conditions (humidity, temperature, atmospheric air pressure) every 15 minutes. In addition, the mobile application monitors surrounding Bluetooth devices (the RuuviTag is a BLE beacon), thus we can monitor the proximity of the user to the RuuviTag and when away from the RuuviTag, i.e., when they are not at home.
  3. Ktor-powered Sync Gateway (hosted at Amazon AWS, encrypted and credential protected): We use the highly performant and scalable Ktor engine to create a sync gateway online, used to receive all the data collected by the PEHMO mobile clients and PiRuuvis. When installing the app on the smartphone, the app communicates with this gateway every 30 minutes (if internet is available) to sync the data to a MySQL database hosted locally.
  4. R-Shiny Dashboard (hosted at Amazon AWS, encrypted and credential protected): R and Shiny is used to monitor the participants' compliance and data quality of our platform. It can also be used to check whether the platform is fully operational. R is a powerful language and toolkit for statistical analysis, and Shiny powers our dashboard functionality online.

PEHMO: mobile application

The PEHMO application was built with simplicity and efficiency in mind. PEHMO app only needs three device access permissions: location, storage and bluetooth. Furthermore, the PEHMO application gives participants control on when to sync their data to the server. All the data is stored locally to the smartphone first, thus internet access all the time is not mandatory. The app also supports multiple languages (English, Finnish, Greek for now).

Participant onboarding

Allow the user to identify itself, assign a participant ID and a means of contact with the researchers. The app also scans for nearby RuuviTags and automatically pairs the closest one with the participant.

Daily Symptoms

Everyday at 21h00 (9 PM) a notification is fired to remind the user to provide his daily symptoms overview. The survey is purposefully designed to be short, completed in less than 1-2 minutes.

Extendable

The application is integrated with our Continuous Integration system, allowing effortless updates for new features (or bug fixes) remotely.

Finnish


Greek


Want your language supported?

Help us translate the app to your language. Download this file, translate it and send it to us at ubicomp-cia@lists.oulu.fi

Want to join our study?

Simply tap the button here on your Android device to join. In the near future, you will be able to see your own data over time, so that you can better understand the impact that climate change is having on your health!

Replicating PEHMO infrastructure?

Setting up PiRuuvis for indoor climate tracking

RuuviTag

With a 2-year+ battery life, these little sensors can be placed anywhere. You can buy a pack of 3 for 69€! They collect ambient temperature, humidity and atmospheric pressure and broadcast the data as a BLE beacon (*). We leverage both the data and the Bluetooth signal strength (RSSI) to assess whether the participant is at home or not.

(*) The phone needs to support BLE scanning to support this feature. Otherwise, location is used to distinguish between home vs not at home.

You will need to own a RuuviTag and a Raspberry Pi (we tested with a Pi 3, but should work with 3 or newer). In your Pi, you can clone our GitHub project:

$ git clone https://github.com/denzilferreira/pehmo-piruuvi.git

Install the PiRuuvi software in the Raspberry Pi:

$ cd pehmo-piruuvi$ sudo bash ./extrema-piruuvi.sh

Use Ruuvi Station mobile app (from the official Ruuvi developer) to obtain your RuuviTag Mac Address (the unique identifier to pair your Pi to your RuuviTag). Insert your RuuviTag Mac Address in the piruuvi.py script so that it knows what to look for to retrieve the RuuviTag data:

$ nano piruuvi.py

You will want to change the Mac variable here to match your RuuviTag Mac Adress:

macs = [ 'E5:FC:01:6E:36:3F' #replace this ID with your RuuviTag Mac Address]

Set the schedule to retrieve the RuuviTag data and send to our server every 15 minutes:

$ crontab -l > piruuvi$ echo "15 * * * * python3 /home/pi/pehmo-piruuvi/piruuvi.py" >> piruuvi$ crontab piruuvi