Skip to content

Python script to read sensor values over BLE from Viatom ring oxygen monitors

License

Notifications You must be signed in to change notification settings

klei22/viatom-ble

 
 

Repository files navigation

viatom-ble

Python script to read sensor values over BLE from Viatom wearable ring oxygen (SpO2) monitors.

Reads values once every 2 second and logs to console or log file. Also publishes values to an MQTT broker if so configured.

Compatability

This branch works with the Wellue Wrist Wearable Sleep Monitor, but should theoretically maintain compatibility with the Viatom ring oxygen monitors:

  • PO1
  • PO2 (Wellue O2Ring)
  • PO3
  • PO4
  • PO1B.

Setup

Install BluePy for BLE and InfluxDB

BLE setup

sudo pip install blueply

Scan while wearing the device to determine it's BLE address.

Note: Ensure the device is not connected to any other monitor (ie the mobile app) before scanning.

sudo python3 viatom-ble.py -s

Look for a device with Complete Local Name that is associated with the ring monitor device and note its Device address (six colon-delimited octets, eg aa:bb:cc:11:22:33)

Edit the python script viatom-ble.py and enter the BLE address where the ble_address variable is initialized.

InfluxDB Setup

Change the InfluxDB settings in py3_health_to_influxdb.py to match.

Optionally could setup visualizer like Grafana for seeing these in real time.

Test Setup

Test BLE connectivity while wearing the device.

python3 viatom-ble.py -v -c

Start connection with Grafana/InfluxDB with the following:

python3 py3_health_to_influxdb.py -v -c

Todos

Look to organize code, and test/validate the systemctl methods with the new influxdb integration.

Add influxdb and other parameters as opts to be optionally set with flags.

About

Python script to read sensor values over BLE from Viatom ring oxygen monitors

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 92.7%
  • Shell 7.3%