Skip to content

Latest commit

 

History

History
45 lines (34 loc) · 1.4 KB

File metadata and controls

45 lines (34 loc) · 1.4 KB

Streamlit Dashboard

The Owlet app does not allow for data exporting and has useful, but limited statistical data summaries. The two scripts described below together create a service that stores owlet data locally in csv and displays the data and enhanced statistical summaries in a constantly refreshing dashboard.

timeseries stats_plots_1 stats_plots_2

Owlet Data Streaming

owlet_api/owlet_stream.py can be used to constantly query Owlet's database and store the data in a csv.

To start streaming, run:

python3 owlet_api/owletstream.py 
    --email <USER_EMAIL> 
    --password <USER-PASSWORD>

The csv is named using the convention pulseox_{DATE}.csv. The csv generated will take the form:

pulseox_2026118.csv

timestamp_ox_obs,ox_lvl,heart_rate
2026-01-18 03:46:20+00:00,99,147
2026-01-18 03:46:23+00:00,99,146
2026-01-18 03:46:28+00:00,98,149
2026-01-18 03:46:33+00:00,98,152
2026-01-18 03:46:38+00:00,99,146

Steamlit Dashboard

owlet/app.py can be used to create a Streamlit dashboard that visualizes the time series data.

To start the app, run:

streamlit run owlet/app.py 
    -- 
    --data_file pulseox_2026118.csv 
    --oxygen_threshold 90 
    --refresh_sec 10

The oxygen_threshold is used to detect desaturation events in the data, and refresh_sec sets how often the app refreshes.