Skip to content

A WoT- & SoLiD-based Mobile App for Wearable Data Collection and Visualization

License

Notifications You must be signed in to change notification settings

derwehr/WoT-Solid

Repository files navigation

Taking Care of Your Data: A WoT- & SoLiD-based Mobile App for Wearable Data Collection and Visualization

Showcase

Below are some screenshots and videos showcasing the app's features.

SoLiD Authentication

In order to use the app, the user needs to authenticate with a SoLiD Pod. The app uses the **SoLiD OIDC authentication** flow to authenticate the user.

The user is redirected to the SoLiD Pod's authentication page, where the user can log in and grant the app access to the Pod.

After the user has authenticated, the app receives an access token, which is used to access the user's data on the Pod.

see the files AuthenticationStore.ts and LoginScreen.tsx for implementation details.


Connecting Wearables

The Application connects to BLE wearable devices described with W3C WoT Thing Descriptions. See the td examples folder for examples of Thing Descriptions for different wearables. This was successfully tested with the following devices:



After connecting to a wearable, users can browse the Thing's available Interaction Affordaces, subscribe to Events Affordances and read Property Affordances.

The screencast on the right shows the Interaction Affordances of the Polar H9 described by its Thing Model

Live Data Visualization

Subscribed Events are visualized in real-time using the Victory Native library.

In the screencast on the right, after selecting the heart-rate event from the Polar H9 the app displays a line-plot of the measurements as the device sends it.


SoLiD Data Storage

The User may store the collected data in SoLiD PODs. The data is stored in Turtle, see Annotated Data for an example.

Stored data is also visualized to allow analyzing historical data comprehensively. Numerical data from the Knowledge Graph is displayed as line plots, and geographic locations are displayed on a map.


Annotated Data

Below is an example of a Turtle file with annotated data. The collected measurements are stored as SOSA/SSN observations, annotated with the measurement's unit and datatype parsed from the TD, time and the location of the measurement gathered by the Android device, plus the authenticated user as the SOSA featureOfInterest.

@prefix qudt: <http://qudt.org/2.1/schema/qudt#>.
@prefix unit: <http://qudt.org/2.1/vocab/unit#>.
@prefix geo: <http://www.w3.org/2003/01/geo/wgs84_pos#>.
@prefix sosa: <http://www.w3.org/ns/sosa/>.
@prefix xsd: <http://www.w3.org/2001/XMLSchema#>.
@prefix s4wear: <https://saref.etsi.org/saref4wear/> .

_:heartrateObservation1702382040625 a sosa:Observation;
    sosa:hasFeatureOfInterest <https://ex.solidpod/profile/card#me>;
    sosa:resultTime "2023-12-12T11:54:00.625Z"^^xsd:dateTime;
    sosa:observedProperty s4wear:HeartRate;
    geo:lat "49.594672"^^unit:DEG;
    geo:long "11.0033571"^^unit:DEG;
    sosa:hasResult _:heartrateResult1702382040625.

_:heartrateResult1702382040625 a sosa:Result;
    qudt:numericValue "72"^^xsd:decimal;
    qudt:unit unit:BEAT-PER-MIN;
    sosa:isResultOf _:heartrateObservation1702382040625.

Building

The app is built using React Native and Expo. To run the app, you need to have Node.js and npm installed.

  1. Clone the repository
  2. Install the dependencies
    yarn install
  3. Start the app
    yarn run start
    This will start the Expo development server and open the Expo DevTools in your browser. You can then run the app on an emulator or on your phone using the Expo Go app.

Installing

The app is not yet available on the App Store or Google Play Store. However, you can download the APK from the releases page and install it on your Android device.

About

A WoT- & SoLiD-based Mobile App for Wearable Data Collection and Visualization

Resources

License

Stars

Watchers

Forks

Packages

No packages published