Apnea Board Forum - CPAP | Sleep Apnea
How to quickly sync Wellue O2 Ring Readings from Android 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: How to quickly sync Wellue O2 Ring Readings from Android to OSCAR (/Thread-How-to-quickly-sync-Wellue-O2-Ring-Readings-from-Android-to-OSCAR)

Pages: 1 2 3 4 5 6 7


RE: How to quickly sync Wellue O2 Ring Readings from Android to OSCAR - famewolf - 01-15-2023

(01-14-2023, 05:40 PM)Crimson Nape Wrote: It's simple. Go to the Viatom_Loader.cpp - line 242.  Add an asterisk "*" to the end of each list in the QString.

Here is the copy of the snippet that I used:
Code:
   return QStringList({"*20[0-5][0-9][01][0-9][0-3][0-9][012][0-9][0-5][0-9][0-5][0-9]*",
                       "*20[0-5][0-9]-[01][0-9]-[0-3][0-9] [012][0-9]:[0-5][0-9]:[0-5][0-9]*"

- Red

Are you planning to submit this to OSCAR?  If not I can open an issue and at least pass on the code change for them to consider implementing.


RE: How to quickly sync Wellue O2 Ring Readings from Android to OSCAR - Crimson Nape - 01-15-2023

I think I submitted a merge request, but my track record is not good in this area.

- Red


RE: How to quickly sync Wellue O2 Ring Readings from Android to OSCAR - pholynyk - 01-15-2023

Your commit was merged this evening, Red.


RE: How to quickly sync Wellue O2 Ring Readings from Android to OSCAR - Crimson Nape - 01-16-2023

famewolf - or anyone else needs this script for Linux (or maybe Mac), here are the commands to create an executable file to strip off the ".dat" in the Viatom/Wellue filename. You need to run this while in your directory that has the files.

Code:
#!/bin/bash
rename 's/\.dat//' *
done

pholynyk - Thank you, Sir!!!  You are both a gentleman and a scholar.   Thanks


- Red


RE: How to quickly sync Wellue O2 Ring Readings from Android to OSCAR - Jeff8356 - 01-16-2023

(01-16-2023, 01:28 PM)Crimson Nape Wrote: ... this script for Linux (or maybe Mac), ...

Sorry Red, no command line utility "rename" native to Mac that I could find.  But I did find a couple of alternatives for Mac users.  Run from the command line in the folder the *.dat files are located (meaning you must "cd" into the correct folder first):

Code:
find . -name "*.dat" | while read f; do mv $f ${f%.dat}; done

or

for file in $(find . -name "*.dat"); do mv ${file} ${file%.dat}; done

Had to look those up on SO [HERE].  Both worked on some test files.


RE: How to quickly sync Wellue O2 Ring Readings from Android to OSCAR - famewolf - 01-19-2023

I opened an issue and attached a patch but specified I was not the author..just wanted to ensure the change got in front of somebody's eyes.  Apologies if I stepped on toes but I didn't see this reply till now. - Whoops....apparently it's in master now.   Will watch for the manjaro update.

@Jeff8356  That code looks like it ADDS a .dat extension to the end of the existing file.  Am I misreading it?


RE: How to quickly sync Wellue O2 Ring Readings from Android to OSCAR - Jeff8356 - 01-19-2023

famewolf,

Both strip of the .dat from the filename. I had to look at those a few times also.

Some examples:

Code:
jeff@Jeff-MBA test % ls -la
total 0
drwxr-xr-x   7 jeff  staff   224 Jan 17 12:05 .
drwxr-xr-x+ 89 jeff  staff  2848 Jan 19 21:35 ..
-rw-r--r--   1 jeff  staff     0 Jan 16 15:28 20230101.dat
-rw-r--r--   1 jeff  staff     0 Jan 16 15:28 20230102.dat
-rw-r--r--   1 jeff  staff     0 Jan 16 15:28 20230103.dat
-rw-r--r--   1 jeff  staff     0 Jan 16 15:28 20230104.dat
-rw-r--r--   1 jeff  staff     0 Jan 16 15:28 20230105.dat
jeff@Jeff-MBA test % find . -name "*.dat" | while read f; do mv $f ${f%.dat}; done
jeff@Jeff-MBA test % ls -la
total 0
drwxr-xr-x   7 jeff  staff   224 Jan 19 21:36 .
drwxr-xr-x+ 89 jeff  staff  2848 Jan 19 21:35 ..
-rw-r--r--   1 jeff  staff     0 Jan 16 15:28 20230101
-rw-r--r--   1 jeff  staff     0 Jan 16 15:28 20230102
-rw-r--r--   1 jeff  staff     0 Jan 16 15:28 20230103
-rw-r--r--   1 jeff  staff     0 Jan 16 15:28 20230104
-rw-r--r--   1 jeff  staff     0 Jan 16 15:28 20230105

##### And the second command ######

jeff@Jeff-MBA test % ls -la
total 0
drwxr-xr-x   7 jeff  staff   224 Jan 19 21:37 .
drwxr-xr-x+ 89 jeff  staff  2848 Jan 19 21:35 ..
-rw-r--r--   1 jeff  staff     0 Jan 16 15:28 20230101.dat
-rw-r--r--   1 jeff  staff     0 Jan 16 15:28 20230102.dat
-rw-r--r--   1 jeff  staff     0 Jan 16 15:28 20230103.dat
-rw-r--r--   1 jeff  staff     0 Jan 16 15:28 20230104.dat
-rw-r--r--   1 jeff  staff     0 Jan 16 15:28 20230105.dat
jeff@Jeff-MBA test % for file in $(find . -name "*.dat"); do mv ${file} ${file%.dat}; done
jeff@Jeff-MBA test % ls -la
total 0
drwxr-xr-x   7 jeff  staff   224 Jan 19 21:38 .
drwxr-xr-x+ 89 jeff  staff  2848 Jan 19 21:35 ..
-rw-r--r--   1 jeff  staff     0 Jan 16 15:28 20230101
-rw-r--r--   1 jeff  staff     0 Jan 16 15:28 20230102
-rw-r--r--   1 jeff  staff     0 Jan 16 15:28 20230103
-rw-r--r--   1 jeff  staff     0 Jan 16 15:28 20230104
-rw-r--r--   1 jeff  staff     0 Jan 16 15:28 20230105
jeff@Jeff-MBA test %



RE: How to quickly sync Wellue O2 Ring Readings from Android to OSCAR - chazmofo - 02-06-2023

Hi Folks
For what its worth, you can directly import data files from your ring via ViHealth to a Mac computer by selecting binary and then using the AirDrop means to transfer it to your desktop. It is then saved to your downloads folder where you can easily upload it to OSCAR...  Data-Import Viatom/Wellue Data.

(02-06-2023, 10:22 AM)chazmofo Wrote: Hi Folks
For what its worth, you can directly import data files from your ring via ViHealth to a Mac computer by selecting binary and then using the AirDrop means to transfer it to your desktop. It is then saved to your downloads folder where you can easily upload it to OSCAR...  Data-Import Viatom/Wellue Data.

I should clarify- You can upload data from your PHONE to your Apple computer, which has received the recent data from your O2 ring... sorry for the miscommunication.


RE: How to quickly sync Wellue O2 Ring Readings from Android to OSCAR - EddyDee - 03-20-2023

I'm trying to get things to work with ViHealth on Android. The latest version of the app
1. Creates .dat files named according to Unix time e.g. 1679...dat
2. Doesn't seem to have any of the header data that OSCAR expects

When I try to import into OSCAR there's an error message about the incorrect "signature" in the file, and then it crashes.

I tried v2.63 courtesy of Red, but it refuses to record any data on my phone. Can someone recommend another version of this app which works correctly with OSCAR?


RE: How to quickly sync Wellue O2 Ring Readings from Android to OSCAR - Crimson Nape - 03-20-2023

ViHealth v2.63 stores the data in a different directory than latter versions. It is usually off the root directory, "/phone". I believe it is, "/phone/ViHealth".

The newer versions of ViHealth add the ".dat" extension to the binary file. Just remove the extension from the filename and it will load in OSCAR. OSCAR's code has now been modified to accept the extension and will be included in future releases.

- Red