Apnea Board Forum - CPAP | Sleep Apnea
Automatic SleepHead Data Import - 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: Automatic SleepHead Data Import (/Thread-Automatic-SleepHead-Data-Import)



Automatic SleepHead Data Import - DrNefario - 02-12-2017

Hello Everyone - New user here, two months on Resmed A10

I have a question on importing SleepyHead data.
I really like the program and have installed a FlashAir SD card to make things easier.
The card is mapped as network drive "S:" on my Win10 PC.  I sync the files most every day to a partition I created as drive "F:" on the PC, then I run sleepyhead and import from "F".  This works great.

To make it easier, I have a batch file as follows:

-----------------------------------------------------
cd C:\Program Files\FastCopy
fastcopy.exe /auto_close /cmd=diff S:\ /to=F:\
"C:\Program Files (x86)\SleepyHead\SleepyHead.exe"
-----------------------------------------------------

 This FastCopy utility syncs drive "S to F" and this speeds up the process.  (If I try to import directly into SH from the network drive "S" it takes 60 - 90 seconds.  The fast copy routine does it in about 10 seconds.  When SH starts, I click the "CPAP Importer" and load the data.  Here is the tricky part:
 
 The dialog box that pops up says that there is a filestructure for an Autoset at bla-bla located at F:\  Would you like to import from this location?
 
 If I click the "Yes" box, it still takes about 60 - 90 seconds.  I suspected something was wrong and did a Wireshark capture and found it was still going to the networked "S" drive in my APAP.  Go figure.
 
 So instead, I select "Specify" and get the Find Directory window.  This is prepopulated with:  "Look in" field: "F" with the files showing in that drive. The prompt is labeled "Directory" in the "Choose" line.  I either have to go up a level to the Drives and select "F" or type in "F:" to get it to import and it only takes a few seconds.
 
 Whew! My question is:  Is there any way to fix the CPAP Importer so that the default is "F:" instead of already being in that drive ?
 
 I could be satisfied the way it is, but thought somebody might have already seen this and have a fix.  Smile


RE: Automatic SleepHead Data Import - BadBernie - 02-13-2017

Dr. Nefario, I am a newbie also (only 2 posts so far), but maybe I can offer an idea you can pursue for a solution to your problem.Forget trying to change how import works, just take away the s: drive before you tell it to import. Then map it back after the import finishes. From the command prompt issue the NET USE command to remove the mapped drive. I think the command is something like NET USE /DEL S:
once you confirm the right syntax you can add it on right after your fastcopy, and then another NET USE to map the s: drive back into business after import is done.
I hope the idea helps you, even if you may have to research  the NET USE command to use it. Post back and I (or someone) will help you get things working if you end up liking this approach.
Good luck.


RE: Automatic SleepHead Data Import - Crimson Nape - 02-13-2017

Hi DrNefario - Welcome
I basically do what you're doing, without the drive mapping, with success.  You might try pointing SleepyHead directly at the directory on your computer and forgo the drive mapping.


RE: Automatic SleepHead Data Import - DrNefario - 02-13-2017

Thanks for the replies.

Qualtech - The net use procedure works!
The new batch file is:


C:\WINDOWS\system32\net use s: \\192.168.1.88
"C:\Program Files\FastCopy327_x64\fastcopy.exe /auto_close /cmd=diff S:\ /to=F:\"
C:\WINDOWS\system32\net use /delete s:
"C:\Program Files (x86)\SleepyHead\SleepyHead.exe"


When SH opens, I click "CPAP import", I simply click on the default offered ("F:") and it works!  It just takes a couple seconds and it's up and running.  

Crimson - I need the drive mapping to sync the CPAP FlashAir to my local drive with FastCopy.  FastCopy doesn't seem to work by just pointing it at the UNC address for the FlashAir. 
I think the key is deleting the mapped drive with the Net Use /Del command.  This forces SH to really use the local drive "F".  This could be a quirk in SH - Win10 interaction in that it insists on using the networked drive "S" even though I select "F" as evidenced by the Wireshark trace.  

Thanks


RE: Automatic SleepHead Data Import - TBMx - 02-13-2017

(02-12-2017, 05:20 PM)DrNefario Wrote:  So instead, I select "Specify" and get the Find Directory window.  This is prepopulated with:  "Look in" field: "F" with the files showing in that drive. The prompt is labeled "Directory" in the "Choose" line. 

simply hit Enter or press the "choose" Button - no need to actually select the "Folder"

SH scans all available Drives (except c) for a file-structure it knows ... (this means it is scanned for every possible structure it may read - not just simply your machine)

What helps "a bit" is: in the preferences check "skip user selection screen" and "import without asking for confirmation" (you still have to press the import button)

another thing that might help you a lot is: map the natwork"drive" not to a complete drive but to a folder on an already existing drive (quick googling revealed this - http://superuser.com/questions/244562/how-do-i-mount-a-network-drive-to-a-folder )

EDIT: I dunno fastcopy ... but windows (since 7 or XP) comes with "robocopy" ... for a normal-day-use this has enough options and can copy directly from the network-share!


RE: Automatic SleepHead Data Import - DrNefario - 02-13-2017

TBMx -

Another valuable reply!  

I had "skip user selection screen" but not "import without asking for confirmation" checked.  This is another improvement.
The Symbolic Link looks interesting, I'll have to experiment with that.  I have heard about them, but never tried it as they always came with a warning not to use them if you don't know what you're doing Unsure 

It is interesting to know that SH scans all available Drives (except c) for a file-structure it knows.  Makes me wonder what it does if it finds two Drives with the appropriate structure.  In my old case it would have found two just after the sync operation.  Maybe a future option would be to skip the scan (which is the best default) and specify a known drive.  The scan may take a while if one has a lot of network drives mapped (?).

Cheers!


RE: Automatic SleepHead Data Import - TBMx - 02-13-2017

I'm not 100% sure but SH should promt (or import) the first drive, that contains a readable structure. (and for that matter skip further scanning)

don't bother with the symbolic links if you just use SH (and not ResScan or other SW as well) - take a look at robocopy (it's a shell-comand so open an admin-command-prompt and type "robocopy /?" ... if it is mapped you have to deal with antivirus software as well - which you absolutely want to keep away from your machine!)

EDIT: nope ... scans through all! (until a valid structure is found)

As the default behavior this feels right - new to SH? just put in your card and hit "import" ... done! ... although after that it could really start with the last importfolder and ask from that point on for a rescan or "specify".

EDIT2: thinking more of it ... SH is doing it the right way! - in german we would call it "DAU-Protection" (dau = the most stupid user you have to assume)


RE: Automatic SleepHead Data Import - Johnboy - 02-14-2017

This sounds like it is a good idea but is any one else wondering what are these teccies talking about - i can just about understand taking the SD Card out of the CPAP and putting into the computer lol. Maybe an idiots guide could be developed in the future (and i really mean idiots)

Johnboy


RE: Automatic SleepHead Data Import - TBMx - 02-14-2017

Well .... searching for "flashair" on this board would reveal enough good topics.

I really don't know if more tech is helping with the "I really mean idiots"-approach. (WiFi-Tech is prone to errors ... )

besides that:
- these cards do develop heat - everyone has to decide for him- oder herself if the additional heat is better than the mechanical stress from changing the card. (and for that matter they do consume more energy than what can be expected from a normal SD-Card)
- they do use and emit radiofrequency electromagnetic fields ... in the manual of each device is a part where they (try to) tell you how far the nearest em-source should be away in order for the machine to function properly (on the other hand: resmed has a cellphone plugged in^^) wether or not EM-Fields have an effect on humans is still open to debate and the discussion ist mostly driven by fear and profit. (so far - the big cancer study from the US which should be made public at the end of this year hopefully changes that)
- ... and than there is the question wether or not it is really wise to put a medical-device (which you rely on) on the WiFi (in general), your local network ... and by that in the end on the internet^^ (security is an illusion!)

(effort + possible danger / harm) < benefit?


RE: Automatic SleepHead Data Import - Newbee2016 - 02-21-2017

(02-14-2017, 10:22 AM)TBMx Wrote: Well .... searching for "flashair" on this board would reveal enough good topics.

I really don't know if more tech is helping with the "I really mean idiots"-approach. (WiFi-Tech is prone to errors ... )

besides that:
- these cards do develop heat - everyone has to decide for him- oder herself if the additional heat is better than the mechanical stress from changing the card. (and for that matter they do consume more energy than what can be expected from a normal SD-Card)
- they do use and emit radiofrequency electromagnetic fields ... in the manual of each device is a part where they (try to) tell you how far the nearest em-source should be away in order for the machine to function properly (on the other hand: resmed has a cellphone plugged in^^) wether or not EM-Fields have an effect on humans is still open to debate and the discussion ist mostly driven by fear and profit. (so far - the big cancer study from the US which should be made public at the end of this year hopefully changes that)
- ... and than there is the question wether or not it is really wise to put a medical-device (which you rely on) on the WiFi (in general), your local network ... and by that in the end on the internet^^ (security is an illusion!)

(effort + possible danger / harm) < benefit?

An alternative to consider at this post: http://www.apneaboard.com/forums/Thread-SD-Card-Extension?pid=190860#pid190860  Bigwink