Hello Guest, Welcome to Apnea Board !
As a guest, you are limited to certain areas of the board and there are some features you can't use.
To post a message, you must create a free account using a valid email address.

or Create an Account


New Posts   Today's Posts

Added a new pulse oximeter importer...
RE: Added a new pulse oximeter importer...
OSCAR will import the oximetry data automatically, along with CPAP data, when you use the ResMed oximetry module which integrates with the CPAP machine. That data is integrated with the rest of the CPAP data produced by the machine. It is only data from stand-alone oximetry devices that need to be imported separately.

CN's suggestions about Preference settings and checking that the graphs are enabled in the lower right will probably be the solution.
Useful links
Download OSCAR (current version is 1.2.0)
Best way to organize charts
How to attach charts to your post

Membership in the Advisory Members group does not imply medical expertise or qualification for advising Sleep Apnea patients concerning their treatment.
Post Reply Post Reply






Donate to Apnea Board  
RE: Added a new pulse oximeter importer...
Well, I looked into switching to bleak a few months ago, but at that time it did not have a real "scan" function - both the "discover" and "scanner" required that you start it, wait some fixed arbitrary amount of time, and then get the list of discovered devices.  It looks like there were a bunch of updates last month and it might be usable now, I need to check.

I also reverse engineered the USB-serial protocol, but unfortunately the hardware (1a86:e010 WCH.CN 4 HID To Serial) has some nasty quirkyness and it cannot be done without low-level USB access and so it will require root on Linux and may not be possible at all on Mac.
Post Reply Post Reply
RE: Added a new pulse oximeter importer...
(sorry, forgot the quote)
Post Reply Post Reply
RE: Se ha añadido un nuevo importador de oxímetro de pulso...
(02-19-2020, 04:14 AM)astracan Wrote: Hello, thank you very much for your answer. In my android mobile there is a folder called Vihealth in which there are several files with the format you comment: YYYYMMDDHHMMSS. These files do NOT have an extension, for example .spo .spor, etc ...
There is also another file, pulsebitO2.db, which I suppose is the database.
I copy that ViHealth folder to the PC. I open OSCAR and in the oximetry section in "import from a data file saved by another program" I point to that folder ... OSCAR responds that it is empty, because the files that you can open are .spo .spor .spo2 .dat
None of my files have that extension.
Maybe there is something I do wrong and can you help me?

The pulsebitO2.db is not the database with measurements. Its a SQLite db, I opened it, it contains one record with value nl_NL (language, country). To be clear: the app I'm talking about is Vihealth v 3.0.4, the device I'm using is a Wellue Oxysmart fingertip Oximeter, PC-60FW. My sdcart doesn't have a folder  /sdcard/PlusebitO2CN on my andoid tablet. On both internal and external storage there are folders internal(or sdcart)/android/data/com.viatom.vihealth/files but all subfolders are empty, also the csvReport folder. The internal/Vihealth folder has the pulsebitO2.db file and some other small non data SQLite files (.db-shm and .db-journal) So I could not find the measurement data yet, it should be there somewhere, I made 2 recordings.
Post Reply Post Reply






Donate to Apnea Board  
RE: Added a new pulse oximeter importer...
Hi Phaul!  -  Welcome

Here is folder location where my SpO2 data files are stored on my Android: Computer\Samsung Galaxy S7\Phone\ViHealth

I hope this may help.
Crimson Nape
Apnea Board Moderator
www.ApneaBoard.com
___________________________________
Useful Links -or- When All Else Fails:
The Guide to Understanding OSCAR
OSCAR Chart Organization
Attaching Images and Files on Apnea Board
Apnea Helpful Tips

INFORMATION ON APNEA BOARD FORUMS OR ON APNEABOARD.COM SHOULD NOT BE CONSIDERED AS MEDICAL ADVICE. ALWAYS SEEK THE ADVICE OF A PHYSICIAN BEFORE SEEKING TREATMENT FOR MEDICAL CONDITIONS, INCLUDING SLEEP APNEA. INFORMATION POSTED ON THE APNEA BOARD WEB SITE AND FORUMS ARE PERSONAL OPINION ONLY AND NOT NECESSARILY A STATEMENT OF FACT.
Post Reply Post Reply
RE: Added a new pulse oximeter importer...
(08-18-2020, 02:43 AM)MyNameWasTaken Wrote: It's still pretty rough and needs a *lot* of cleanup, but github.com/MackeyStingray/o2r

If it helps anyone else, I forked MyNameWasTaken's awesome Wellvue O2Ring importer and updated it to use bleak, so it can run on Windows and maybe Mac. It's at github.com/shadowmoon-waltz/o2r (too new to post links).

(08-19-2020, 11:58 AM)MyNameWasTaken Wrote: About OSCAR...  I hate undescriptive file names, so I was saving the files as "O2Ring 45xx - YYYYMMDDHHMMSS.vld" (where 'O2Ring 45xx' is the Bluetooth device name).  I attempted to import a downloaded file into OSCAR only to realize it hardcodes the filename as YYYYMMDDHHMMSS and doesn't allow you to show all files.  It would be really nice if OSCAR would add "*.vld" (and *.*) as an option, but until then you can tell my program to download as that format with
Code:
python3 o2ring.py -e "" -p ""

For people who forgot about this (like me), you need to run it like this (or rename it manually) to load it into OSCAR by using the "Data > Import Viatom Data" option.

(01-09-2021, 06:12 PM)MyNameWasTaken Wrote: Well, I looked into switching to bleak a few months ago, but at that time it did not have a real "scan" function - both the "discover" and "scanner" required that you start it, wait some fixed arbitrary amount of time, and then get the list of discovered devices.  It looks like there were a bunch of updates last month and it might be usable now, I need to check.

I also reverse engineered the USB-serial protocol, but unfortunately the hardware (1a86:e010 WCH.CN 4 HID To Serial) has some nasty quirkyness and it cannot be done without low-level USB access and so it will require root on Linux and may not be possible at all on Mac.

Technical notes (feel free to ignore): Not sure if it was recent or not, but it does seem like bleak's discovery can run in another thread, or maybe it's just in a coroutine, but that's fine, since I yield while waiting on the queue (it's a asyncio queue instead of the regular python queue). Hopefully, it's the same thread, as asyncio's queue is not thread-safe at default, so if someone notices any race conditions, let me know. I had to add a bunch of async/await stuff.
Post Reply Post Reply
RE: Added a new pulse oximeter importer...
(08-19-2020, 11:58 AM)MyNameWasTaken Wrote: About OSCAR...  I hate undescriptive file names, so I was saving the files as "O2Ring 45xx - YYYYMMDDHHMMSS.vld"

Just popping in to say: my original Viatom wrist/thumb SpO2 sensor gave up the ghost, so I bought a new SleepU.  I used the extensionless filenames in the original Viatom importer because that's what the Viatom Android app calls the files in its data directory.  The new ViHealth app works similarly: different directory name, but same filename pattern ("YYMMDDHHMMSS", no extension).

If anybody is curious (and to save you a trip through the whole thread to find this info), I believe the Android app works by connecting to the device over Bluetooth and downloading any new sessions stored there.  These data are stored in the SQLite database in the app directory, but after you select a session to view, the app creates the YYMMDDHHSS data file in /sdcard/ViHealth (previously /sdcard/PlusebitO2CN [sic]).  That's the file that you can copy over and load into OSCAR.

My morning routine starts with enabling ADB access over the network on my Android device (once after every reboot of the Android), and then using the script below, which copies the last 3 files it finds in the Viatom directory:

Code:
#!/bin/sh

IP=10.1.0.176
N=3

PATH=$PATH:/usr/local/android/platform-tools

echo "Retrieve last $N data files from $IP..."
adb connect $IP
adb shell ls /sdcard/ViHealth | egrep '20[0-9]{12}' | sort | tail -$N | \
while read fn ; do
    adb pull /sdcard/ViHealth/${fn} ~/Downloads
done
adb disconnect
It occurs to me that OSCAR could do this programatically, although it's still an ugly kludgy hassle behind the scenes; it would be much preferable to download the data directly via Bluetooth the same way that the Viatom app does.
Post Reply Post Reply






Donate to Apnea Board  
RE: Added a new pulse oximeter importer...
(03-27-2021, 03:46 PM)shadowmoon.waltz Wrote: If it helps anyone else, I forked MyNameWasTaken's awesome Wellvue O2Ring importer and updated it to use bleak, so it can run on Windows and maybe Mac. It's at https://github.com/shadowmoon-waltz/o2r (too new to post links).

Thank you very much for this!  I've been meaning to do this myself but have been too busy with other projects.
Post Reply Post Reply
RE: Added a new pulse oximeter importer...
(04-15-2021, 07:27 PM)MyNameWasTaken Wrote:
(03-27-2021, 03:46 PM)shadowmoon.waltz Wrote: If it helps anyone else, I forked MyNameWasTaken's awesome Wellvue O2Ring importer and updated it to use bleak, so it can run on Windows and maybe Mac. It's at github.com/shadowmoon-waltz/o2r (too new to post links).

Thank you very much for this!  I've been meaning to do this myself but have been too busy with other projects.

It was a fun patch. I haven't done much with BLE, so it was interesting to learn how to interact with it programmatically. I definitely know that feeling Smile
Post Reply Post Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
  Contec CMS50D-BT Oximeter and OSCAR enautical 1 71 05-02-2021, 07:15 AM
Last Post: Crimson Nape
  OSCAR Oximeter Statistics? RadarRalfs 2 166 04-16-2021, 01:29 AM
Last Post: RadarRalfs
  Pulse Oximeter Contec CMS50F GerardH 31 3,152 04-08-2021, 08:54 AM
Last Post: rboettch
  OSCAR's Pulse Rate graph too small epc002 4 152 03-20-2021, 08:22 AM
Last Post: epc002
  Synchronize CPAP and Oximeter Data - FEATURE REQUEST SleepyTimeTime 14 754 03-16-2021, 08:31 AM
Last Post: Crimson Nape
  Oximeter With Oscar Question upsman 22 800 03-14-2021, 10:53 PM
Last Post: tomtom63
  Possible bug wrt Pulse Rate Reporting? hoselife 4 199 02-23-2021, 06:17 PM
Last Post: Crimson Nape


New Posts   Today's Posts






About Apnea Board

Apnea Board is an educational web site designed to empower Sleep Apnea patients.