Apnea Board Forum - CPAP | Sleep Apnea
Automate upload from local directory - 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: Automate upload from local directory (/Thread-Automate-upload-from-local-directory)



Automate upload from local directory - LikeaGlove90 - 06-05-2024

I love OSCAR and am so fortunate to have found such an amazing program.

I'm hoping you might be able to help with some small pieces of guidance.

I'll say upfront - im very green with coding and the like, and am doing this as a learning project for myself!

I'm trying to automate my experience a little bit, given how useless I am at remembering to plug back in my SD card.

I've been lucky enough to find a GitHub so I can use a wifi SD card and rPI to automate pulling my data from the machine daily, into to a folder on my home PC.

The next phase is I want to automate OSCAR at certain intervals to automatically run the script to import this data, but I'm struggling. I've found the GitHub for OSCAR and struggling to find what points to where the data is pulled from when imported..

 I feel like it'd be as simple as copying the script that runs when you pretty the button to import sessions.. and changing that path to the folder my data is being imported from (ie change SD card to the filepath my data is stored on my PC) , and then automate this to run every few hours to pull if the data has been updated.. rather than press the button manually!

Can you assist with some guidance sleep Jedi's?


RE: Automate upload from local directory - Crimson Nape - 06-05-2024

First, each OS will have slight variations as to how you automate this. You do not want to import to OSCAR more than once a day. You only want to import the data when you're not going to use the CPAP for the remainder of that day. Otherwise, you will need to purge that day's data and then reimport it to acquire any newer data. That is an option that can not be automated. Automating the SD download can be on a timed schedule if you are syncing the card to a dedicated directory on your computer. You would then point OSCAR to read this directory for its data import. Also, in the Preferences menu, you can select the option to auto launch the CPAP Importer after opening your profile.

OK, now it's time to impress me! Big Grin
- Red