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

Wellue O2Ring - import data to Oscar?
#31
RE: Wellue O2Ring - import data to Oscar?
(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!

Can someone translate for me?

I have a SnoreO2 and a CheckMe O2 Max both by Viatom. Neither will connect to the O2 Insight App and my version of ViHealth does not have any Binary Files.  Sad

I did find the PulseBitO2 db, but now what? Do I use Sqlite3.exe to run this? 

I also found this:


Quote:>sqlite3 c:/sqlite/chinook.db
sqlite> .headers on
sqlite> .mode csv
sqlite> .output data.csv
sqlite> SELECT customerid,
  ...>        firstname,
  ...>        lastname,
  ...>        company
  ...>   FROM customers;
sqlite> .quit

Are we speaking the same language?
Post Reply Post Reply
#32
RE: Wellue O2Ring - import data to Oscar?
Hi Sleepy Willy! - Welcome
You found the correct database. I would make a copy of it and move it to a directory where you can access it using SQLite.

To use SQLite, you would issue that command from a Command Prompt while in the directory containing the copied database.

Also, it appears that with each release of the ViHealth app, another coder changes the table names in the database for no good reason. Here is another code snippet on the database with different table names. It ultimately produces the same end result.

Code:
for filename in `sqlite3 ./db_o2.db 'select checktime from tb_check'`; do
echo $filename; (sqlite3 db_o2.db "select quote(checktime) from tb_check where checktime = '$filename'" | cut -d\' -f2 | xxd -r -p > $filename); done

If your original command snippet does produce any results, try the second one. I also noticed you listed "C:\". I'm assuming that you are on a Windows computer. Unlike a Mac or Linux system, Windows doesn't usually add "Sqllite3" to it path declaration. This means you may have to do this yourself or use the complete path to the slqlite3 directory in you command.

Good luck!
- Red
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
#33
RE: Wellue O2Ring - import data to Oscar?
OK, I had no luck running that script, I'm obviously missing something.

I did get a select statement to work, but all I got was this:

Quote:sqlite> select * from sleepData;
1|♥|0|25|15|94|0|15|20190609003028|3|1|0|200|84|9.3|0|32284|1901310070|40395|0|1560054628000|0||???|
2|♥|0|18|7|94|0|7|20190606234130|3|1|0|64|88|9.7|0|26192|1901310070|32780|0|1559878890000|0||???|
3|♥|0|5|3|93|0|5|20190607232119|3|1|0|116|79|9.6|0|36000|1901310070|45040|0|1559964079000|0||???|
4|♥|0|0|0|94|0|0|20190608143206|3|1|0|0|92|--|0|1996|1901310070|2535|0|1560018726000|0||???|
5|♥|0|1|1|93|0|1|20201028001447|3|1|0|8|88|--|2|364|1901310070|495|0|1603858487000|0||???|
6|♥|0|6|3|92|0|11|20201028002832|3|1|0|132|13|9.3|0|15956|1901310070|19985|0|1603859312000|0||???|
7|♥|0|1|0|92|0|4|20201028094512|3|1|0|64|88|9.9|0|7320|1901310070|9190|0|1603892712000|0||???|
8|♥|0|17|7|91|0|81|20201029001223|3|1|0|5888|84|9.7|19|30172|1901310070|37755|0|1603944743000|0||???|
9|♥|0|57|28|91|0|126|20201029232232|3|1|0|6464|79|7.9|17|36000|1901310070|45040|0|1604028152000|0||???|
10|♥|1|0|0|92|0|0|20201031010103|3|1|0|0|90|--|0|228|1901310070|325|0|1604120463000|0||???|
11|♥|0|7|2|92|0|36|20201031011152|3|1|0|496|86|9.9|1|29136|1901310070|36460|0|1604121112000|0||???|
12|♥|0|26|7|92|0|78|20201031220516|3|1|0|1680|84|9.6|4|35868|1901310070|44875|0|1604196316000|0||???|
13|♥|0|42|13|91|0|97|20201102014353|3|1|0|2300|83|8.8|10|21844|1901310070|27345|0|1604299433000|0||???|
14|♥|0|17|10|90|0|136|20201103000628|3|1|0|6648|81|9.3|22|29700|1901310070|37165|0|1604379988000|0||???|

What magic do I have to do to run Sergio's script from the SQLite command prompt?

Also, why is there so little data, I was expecting MORE Sir!  Huh

These are the only tables I see:

Quote:sqlite> .tables

android_metadata  o2device          sleepData
Post Reply Post Reply
#34
RE: Wellue O2Ring - import data to Oscar?
Not knowing the extent of your SQL abilities, download DB Browser for SQLite. Here is their website: https://sqlitebrowser.org/ This will allow you to look at the database more easily. You can then follow the name in the script to see where it does or doesn't lead.
- Red
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
#35
RE: Wellue O2Ring - import data to Oscar?
Thanks,

My SQL skills are actually decent, but I've never used SQLite. I'm happy to do it the easy way though.

It looks like the sleep data is only showing one row per night with no event details? I managed to dump the sleep data into Access, but they wanted real money to convert more than trial data. Although my sample data looks the same as what got dumped out to the command line.
Post Reply Post Reply
#36
RE: Wellue O2Ring - import data to Oscar?
OK, I have 14 files now, but they are all from 2020 and they are all blank. ? Obviously their is another version of the database. Should not be too hard to find, but the blank files? ? One of the Linux commands must be misbehaving, but I'm not getting any errors, unless the field name is incorrect.
Post Reply Post Reply
#37
RE: Wellue O2Ring - import data to Oscar?
(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

Something looks odd with that script.  Is PulsebitO2.db misspelled in the script (as PlusebitO2.dbin 2 places)? Or was it supposed to be that way?
Jeff8356

MacBook Air (2017, Intel) | macOS Monterey (12.7) | OSCAR v1.5.1 | VM = Win10/Win11 |
How to Links:
Installing OSCAR on a Mac
Organizing your OSCAR charts
Attaching screenshots and files for the forum
OSCAR Help
OSCAR - The Guide

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
#38
RE: Wellue O2Ring - import data to Oscar?
This is a copy of the script I run in a bash file. "PulsebitO2.db" is the name of my database.  

Here is the listing in DB Browser of PulsebitO2.db with the different fields highlighted and their contents:
[Image: attachment.php?aid=42140]

I hope this may help.
- Red


Attached Files Thumbnail(s)
   
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
#39
RE: Wellue O2Ring - import data to Oscar?
I found a second .db file with 6 files, but all the wrong dates again and all Nulls. 

So I unhid a bunch of directories in File Manager and found a third .db file that is larger and has the correct date. 

.db file listing attached.


Attached Files Thumbnail(s)
   
Post Reply Post Reply
#40
RE: Wellue O2Ring - import data to Oscar?
The last listing is it!   I didn't realize until I upgraded my phone yesterday that they had moved it.   Copy that database to your computer and turn the SQL script loose on it.

Lord only knows where it will be on an iPhone. . .
- Red
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


Possibly Related Threads...
Thread Author Replies Views Last Post
  OSCAR shows missing data for multi week interval Dawnstar 2 47 04-21-2024, 01:12 PM
Last Post: Dawnstar
  Fitbit import to OSCAR ExtremeDeepSleep 5 203 04-21-2024, 07:04 AM
Last Post: tossinandturnin
  OSCAR Vs device data Siva 1 100 04-17-2024, 12:44 PM
Last Post: G. Szabo
  Wellue data off since daylight savings change brainfoggysleeper 1 54 04-16-2024, 07:51 AM
Last Post: Crimson Nape
  OSCAR SpO2 CSV import ST Dog 22 3,167 04-14-2024, 01:49 PM
Last Post: ElectricalPaul
  Oscar "No Supported Data Found" Resmed Airsense 11 cpapmj 3 125 04-13-2024, 10:21 PM
Last Post: Crimson Nape
  OSCAR import of Viatom/Wellue data - DST time base SleeperAwake21 5 951 03-30-2024, 02:21 PM
Last Post: dfunk


New Posts   Today's Posts


About Apnea Board

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