Apnea Board Forum - CPAP | Sleep Apnea
Wellue O2Ring - import data to Oscar? - Printable Version

+- Apnea Board Forum - CPAP | Sleep Apnea (https://www.apneaboard.com/forums)
+-- Forum: Public Area (https://www.apneaboard.com/forums/Forum-Public-Area)
+--- Forum: Software Support Forum (https://www.apneaboard.com/forums/Forum-Software-Support-Forum)
+--- Thread: Wellue O2Ring - import data to Oscar? (/Thread-Wellue-O2Ring-import-data-to-Oscar)

Pages: 1 2 3 4 5


RE: Wellue O2Ring - import data to Oscar? - Sleepy Willy - 05-09-2022

I get 92 files from that db, but I know I have a few small recordings. The files all have an asterisk at the end and they are all zero bytes. I renamed a few and tried to import them into Oscar. They seemed to crash Oscar and did not give me any data. ?

Any bright ideas?


RE: Wellue O2Ring - import data to Oscar? - Crimson Nape - 05-09-2022

They should be look like the mFileName column in the screenshot I posted.  Depending on your model and the ViHealth version, the date/time filename may be preceded by "SleepU_" "or O2Ring_".
- Red

EDIT:
I see they separate out the database in a directory named "ViHealth " and is separate from where they generate the binary session files.


RE: Wellue O2Ring - import data to Oscar? - Crimson Nape - 05-09-2022

I just got a USB/USB-C cable for the phone.  It was my son's hand me down.  I just looked at the Android's file locations using my PC.

The binary files path:
\Phone\Android\data\com.viatom.vihealth\files

Path to the database file:
\Phone\Android\data\com.viatom.vihealth\files\ViHealth

The database stores the mFileName like the screenshot. It seems the oximeter type prefix is added when it generates the binary file.
- Red


RE: Wellue O2Ring - import data to Oscar? - Sleepy Willy - 05-09-2022

Yeah, I found a bunch of files in the parent directory, fewer than 92 though.


RE: Wellue O2Ring - import data to Oscar? - Sleepy Willy - 05-10-2022

(09-19-2021, 03:29 PM)Crimson Nape Wrote: Here is sergio's file extraction script:
Code:
for filename in `sqlite3 ./PlusebitO2.db 'select mFileName from sleepData'`; do echo $filename; (sqlite3 PlusebitO2.db "select quote(dataBuf) from sleepData where mFileName = '$filename'" | cut -d\' -f2 | xxd -r -p > $filename); done

If you have a version that will create the file, then transfer them as described above.   Remember, in order for the app to generate the file, you must view the session while in the ViHealth app.

Good luck!

I couldn't get the above script to run on my PC after installing SQLite3 and Linux. It would echo the file names and produce 0 byte files, so I tried using the new writefile function in SQLite 3, but it did not produce any files or output the byte count from the writefile function.  If I hardcoded a single select statement in bash I got a byte count and a file.

Idea This means the original code is not actually processing the filenames (for me anyway). I found that removing the quotes from the filename variable solved my problem, as the variable is already a string.

This code works for me, YMMV as I'm running this in Windows.


Quote:for filename in `SQLite3.exe ./PlusebitO2.db 'select mFileName from sleepData'`; do echo $filename; (SQLite3.exe PlusebitO2.db "select writefile($filename,dataBuf) from sleepData where mFileName = $filename") ; done