Apnea Board Forum - CPAP | Sleep Apnea
Import CSV oxymeter data because of time difference - 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: Import CSV oxymeter data because of time difference (/Thread-Import-CSV-oxymeter-data-because-of-time-difference)



Import CSV oxymeter data because of time difference - Sisyphos - 10-26-2021

Hi all,

After buying a Viatom O2 Pro Oximeter, I found that my Resmed Air Sense 10 is an hour ahead. That is why the data does not fit.

Why do I want to do that?
  • Reason short: Due to bureaucratic problems, I prefer to adjust the Oximeter data to the Air Sense.
  • Reason long: My Air Sense is paid by the health insurance in Germany, which has a contract with a company for maintenance. That's why I don't want to change anything in the settings. I'll might get into trouble later. Unfortunately, nothing is done to the device without a doctor's prescription. So, that means a lot of running around. I would like to save that time.
I can export my data with O2 Insight pro as a CSV file. The conversion of the time data I get without problems. Unfortunately, Oscar does not want to import the CSV from O2 Insight. In the wiki I can't find an example for the structure of the CSV.

Can someone give me an example for the CSV data structure?

Thanks!


p.s. Another way might be, to Export Oscars data as CSV, manipulate the time, and re-import that. I guess that's maybe more difficult, than an CSV import of the oximeter data. Maybe I'm wrong?


RE: Import CSV oxymeter data because of time difference - Neelix - 10-26-2021

The main problem I can see with your idea is that Oscar can not directly import the Viatom generated CSVs.  

That being said, the tool I use to download my O2Ring data also has a converter that converts in both directions between a custom CSV format  and the Viatom binary format.  It was written by forum user MyNameWasTaken (see the last few pages of this thread) and can be downloaded here: https://github.com/MackeyStingray/o2r

This should allow you to convert the data to CSV,  modify the timestamps somehow and convert the adjusted file back to a binary that Oscar can read.

-Neelix


RE: Import CSV oxymeter data because of time difference - Crimson Nape - 10-26-2021

Sisyphos - you are in luck!   OSCAR version .3.0 allows you to change the Viatom/Wellue's 14 digit file name to allow a date/time change.  The newer models prefix the file with the model name, but still use the 14 digit date and time for the remaining part of the name.  The trick is to import the CPAP data and look at the reported starting time.   Now, go to the Wellue SpO2 file and rename it to match it to the CPAP starting time, then import its data.

Example:
CPAP Start Time: 23:10:45

Wellue File Name:
211026231616
or
SleepU_211026231616

change the filename to be:
211026231045
or
SleepU_211026231045
Note: You can remove the model prefix without any problems too.


RE: Import CSV oxymeter data because of time difference - Sisyphos - 10-27-2021

(10-26-2021, 07:31 AM)Crimson Nape Wrote: Sisyphos - you are in luck!   OSCAR version .3.0 allows you to change the Viatom/Wellue's 14 digit file name to allow a date/time change.  The newer models prefix the file with the model name, but still use the 14 digit date and time for the remaining part of the name.  The trick is to import the CPAP data and look at the reported starting time.   Now, go to the Wellue SpO2 file and rename it to match it to the CPAP starting time, then import its data.

Example:
CPAP Start Time: 23:10:45

Wellue File Name:
211026231616
or
SleepU_211026231616

change the filename to be:
211026231045
or
SleepU_211026231045
Note: You can remove the model prefix without any problems too.

That's really luck Big Grin ! It's very easy!

The only thing is, that it looks like the data from the oximeter and the Air sense have an offset of some minutes Oh-jeez . I see the oximeter recognizes o2 drops and pulse changes some minutes before the Air sense is recording apneas. I'd expect the drops not before, but after apneas occur.

Does anyone know if the Resmeds Air Sense devices can be configured to adjust the time settings automatically? Like every modern computer or smartphone does? I'll not change that by myself (reasons  described above). But if there is a way the Resmed Air Sense 10 could get the correct date and time from time servers in the internet, I'd ask a technician to configure that.

Any ideas?


RE: Import CSV oxymeter data because of time difference - Neelix - 10-27-2021

You'd think they would, that seems like a no-brainer considering that the built in modem is effectively a cell phone. However, short of rewriting the firmware I don't believe this is possible.

-Neelix


RE: Import CSV oxymeter data because of time difference - Sisyphos - 10-27-2021

(10-27-2021, 06:31 AM)Neelix Wrote: You'd think they would, that seems like a no-brainer considering that the built in modem is effectively a cell phone.  However, short of rewriting the firmware I don't believe this is possible.

I somehow was afraid of that. So it is only possible to adjust the time in the Air Sense manually?

Is there maybe a wholly different way how I could determine the offset and trim the data (at least it is straightforward to adjust the oximeter data)?


RE: Import CSV oxymeter data because of time difference - Neelix - 10-27-2021

You could use a shared event between the two input streams I guess. I once caused a massive leak by pulling my mask from my face with one hand while waving the other around to trigger a spike in the motion sensor on the O2 ring to check the sync. (there was a 3 second difference but since the O2ring only records a reading every 4 seconds that seemed about right) The trouble is you would need to do this practically every night if that's how you were syncing it because the clock in the AS10 doesn't keep time very well, so it's going to drift. (I believe the hire unit I was using for my trial lost about 7 seconds per day, Haven't checked the drift on my new machine though. )

Incidentally, are you can aware you can set a time offset for your CPAP machine in the Oscar Preferences?

-Neelix


RE: Import CSV oxymeter data because of time difference - Sisyphos - 10-27-2021

Thank you Neelix, creating an event like that, is at least something! I try that tonight. I'll also check OSCAR for the adjustment.

Regards Sisyphos