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

Monitoring data wirelessly
RE: Monitoring data wirelessly
Just updated software to Mac OS Big Sur 11.0.1. Getting the following new error message from Java now. How to I get into the console and what do I do?
[Image: 8IaMsFX.png]
Post Reply Post Reply
RE: Monitoring data wirelessly
MCS2014 - This post is written in an effort to try and help.  

I am noticing that you don't seem to be knowledgeable of the Mac operating system.  This can add to the frustration of trying to get an application operational.  I am recommending that you step away from this project for a minute or two and read up on the Mac.   Again in order to try to help you, I have found a free site hosted by Mac users for this purpose. Here is the link: MacMost Beginners Guide.   You are not required to join or anything, even though there will be a popup trying to get you to signup for their newsletter, just select, "Maybe Later" option.  This site also offers how-to videos as well.

I hope this will help.
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
RE: Monitoring data wirelessly
After more trial and error, it appears this is a problem with Java, not macOS, and I am still unable to get back my original mac profile.
Everything else checks out:
0 packet loss when pinging, the card is recording the data (verified when reading the card's data from the computer), it is connecting to FlashAir when I enter 192.168.0.250 into my browser, but I keep getting the above Java Application launch failed error message every time I try to create a new profile. I tried looking into both the Java and mac Console and don't know what to look for, I am not an IT expert. Maybe go back to trying it on windows again?
Post Reply Post Reply
RE: Monitoring data wirelessly
Looks like you recently upgraded to Big Sur on your Mac.  Big Sur seems to have broken Java on many machines so it may be a while before an Apple update comes out.

You can also try to install Oracle Java yourself.  FlashPAP was written in Java 7 I believe, so you would need to install Java 8 (LTS???).  I think Java is up to 14 or 15 but I don't know if they are all backwards compatible with the older stuff.  
Another option to search for would be OpenJDK or AdoptOpenJDK.  They are opensource projects for Java.

if your not stuck on using FlashPAP, you can use Macs built in "rsync" and ApplScript instead.  It gets the job done and is my prefererd way of doing it all.  I just turned it into an AppleScript on my desktop, and it is not affected by Java.  Doubleclick it and it mounts FlashAir, copies the filr that have changed to your computer where you can import the data into OSCAR.  If it sounds like something you would like to try I will post the applescript code here and give you guidance  getting it working, it's fairly easy.

I am still on Catalina and have no intension of upgrading to Big Sur until they get another upgrade or 2 fixed first!

Here is the AppleScript for review:
Code:
#Enter you FlashAir card name or IP address below (between the quotes " ")
set diskName to "192.168.1.240"
#
#Enter the location you want your xPAP data transferred to (between the quotes " "). The folder (directory) must already exist!
set copyLocation to "/users/yourusername/Documents/OSCAR_DATA/"
#
#Enter the location of OSCAR.app, by default it's /Applications
set oscarLocation to "/Applications"
#
#Mount the FlashAir card and make sure it shows up in /Volumes
try
    mount volume "http://" & diskName
    repeat until diskName is in (do shell script "ls /Volumes")
        delay 0.2
    end repeat
on error e
    display dialog "An error occured: " & e
end try
#
#Open Terminal and use rsync to copy FlashAir to computer or NAS
tell application "Terminal"
    activate
    do script "rsync -avz /Volumes/" & diskName & "/" & " " & copyLocation in window 1
end tell
#Pause the app until rsync is finished
set isBusy to true
repeat until isBusy is false
    tell application "Terminal"
        tell window 1
            set isBusy to busy as boolean --> Test if busy
        end tell
    end tell
    delay 1 --> Check every second
end repeat
delay 1
#Unmount FlashAir so we don't accidently change anything on the card
do shell script "diskutil unmount /Volumes/" & diskName
delay 1
do shell script "open" & " " & oscarLocation & "/OSCAR.app"
quit application "Terminal"
after a few minor changes for your computer, just copy it into Script Editor and save it as an app.
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
RE: Monitoring data wirelessly
(11-29-2020, 01:26 AM)Jeff8356 Wrote: Responses in red:

Looks like you recently upgraded to Big Sur on your Mac.   Correct.

Big Sur seems to have broken Java on many machines so it may be a while before an Apple update comes out.

You can also try to install Oracle Java yourself.  But I already have java. Is this a different version? Forgive me, but this is all Greek to me. I repeat, I am not a techie and it looks like you guys have vast experience in this area.

FlashPAP was written in Java 7 I believe, so you would need to install Java 8 (LTS???).  I think Java is up to 14 or 15 but I don't know if they are all backwards compatible with the older stuff. Another option to search for would be OpenJDK or AdoptOpenJDK.  They are opensource projects for Java. Again, this is all Greek to me.

if your not stuck on using FlashPAP, you can use Macs built in "rsync" and ApplScript instead.  It gets the job done and is my prefererd way of doing it all.  I just turned it into an AppleScript on my desktop, and it is not affected by Java.  Doubleclick it and it mounts FlashAir, copies the filr that have changed to your computer where you can import the data into OSCAR.  If it sounds like something you would like to try I will post the applescript code here and give you guidance  getting it working, it's fairly easy.

I am still on Catalina and have no intension of upgrading to Big Sur until they get another upgrade or 2 fixed first!

Here is the AppleScript for review:
Code:
#Enter you FlashAir card name or IP address below (between the quotes " ")
set diskName to "192.168.1.240"
#
#Enter the location you want your xPAP data transferred to (between the quotes " "). The folder (directory) must already exist!
set copyLocation to "/users/yourusername/Documents/OSCAR_DATA/"
#
#Enter the location of OSCAR.app, by default it's /Applications
set oscarLocation to "/Applications"
#
#Mount the FlashAir card and make sure it shows up in /Volumes
try
    mount volume "http://" & diskName
    repeat until diskName is in (do shell script "ls /Volumes")
        delay 0.2
    end repeat
on error e
    display dialog "An error occured: " & e
end try
#
#Open Terminal and use rsync to copy FlashAir to computer or NAS
tell application "Terminal"
    activate
    do script "rsync -avz /Volumes/" & diskName & "/" & " " & copyLocation in window 1
end tell
#Pause the app until rsync is finished
set isBusy to true
repeat until isBusy is false
    tell application "Terminal"
        tell window 1
            set isBusy to busy as boolean --> Test if busy
        end tell
    end tell
    delay 1 --> Check every second
end repeat
delay 1
#Unmount FlashAir so we don't accidently change anything on the card
do shell script "diskutil unmount /Volumes/" & diskName
delay 1
do shell script "open" & " " & oscarLocation & "/OSCAR.app"
quit application "Terminal"
after a few minor changes for your computer, just copy it into Script Editor and save it as an app.

If you have the patience to walk me thru changing the software over to ApplScript (which I am totally unfamiliar with), I would be open to trying it since it's working on your end. Thanks for the assistance thus far.
Post Reply Post Reply
RE: Monitoring data wirelessly
Using AppleScript:

Open Finder on your Mac and in your Applications folder look for Script Editor.app located in Utilities.  When the window opens select "New Document" (bottom left).
Copy the script below in the code window and paste it into the top part of Script Editor window.

There are only three points you will need to change in the beginning of the script to meet your needs. They are marked #1, #2 , #3.
  • #1 should be the IP address of your FlashAir card
  • #2 Is the folder you want the data copied to.  I don't know your username on your computer so you will need to edit that.  Using Finder, create that FlashAirData folder in Downloads
  • #3 is where you have your OSCAR.app installed.  If you followed the install instructions when you first downloaded OSCAR it should be in /Applications. If you installed it somewhere else you will need to enter that location.
Code:
##1 Enter you FlashAir card name or IP address below (between the quotes " ")
set diskName to "192.168.0.250"
#
##2 Enter the location you want your xPAP data transferred to (between the quotes " "). The folder (directory) must already exist!
set copyLocation to "/Users/MCS2014/Downloads/FlashAirData/"
#
##3 Enter the location of OSCAR.app, by default it's /Applications
set oscarLocation to "/Applications"
#
#Do not change anything below here
#Mount the FlashAir card and make sure it shows up in /Volumes
try
    mount volume "http://" & diskName
    repeat until diskName is in (do shell script "ls /Volumes")
        delay 0.2
    end repeat
on error e
    display dialog "An error occured: " & e
end try
#
#Open Terminal and use rsync to copy FlashAir to computer or NAS
tell application "Terminal"
    activate
    do script "rsync -avz /Volumes/" & diskName & "/" & " " & copyLocation in window 1
end tell
#Pause the app until rsync is finished
set isBusy to true
repeat until isBusy is false
    tell application "Terminal"
        tell window 1
            set isBusy to busy as boolean --> Test if busy
        end tell
    end tell
    delay 1 --> Check every second
end repeat
delay 1
#Unmount FlashAir so we don't accidently change anything on the card
do shell script "diskutil unmount /Volumes/" & diskName
delay 1
do shell script "open" & " " & oscarLocation & "/OSCAR.app"
quit application "Terminal"

After you edit the above 3 spots, use the top menubar in Script Editor choose File > Save
In the Save window select "File Format" and choose "Application", then give your new app a name (CopyCPAP.app in the below screenshot).  Choose where you want to save it (mine is on my Desktop),  then click the Save button (lower right).  After it is saved some of the text will change color, this is normal.
You can now close Script Editor (Command + Q).

   

If all went well you should be able to double click CopyCPAP.app.  Your Mac will likely ask for your permission to access files the first time.  It will then mount your FLashAir card, a Terminal window will open showing you that rsync is working, when rsync is finished it will open OSCAR and close the Terminal window.  You may need to tell OSCAR where the new FlashAirData folder is when you do your import.

The first time rsync is run it will copy everything from your FlashAir card which may be slow depending on how much data is there.  After that it will only copy files that have changed so it will go pretty quick.
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
RE: Monitoring data wirelessly
(11-30-2020, 11:17 AM)Jeff8356 Wrote: Using AppleScript:

Open Finder on your Mac and in your Applications folder look for Script Editor.app located in Utilities.  When the window opens select "New Document" (bottom left).
Copy the script below in the code window and paste it into the top part of Script Editor window.

There are only three points you will need to change in the beginning of the script to meet your needs. They are marked #1, #2 , #3.
  • #1 should be the IP address of your FlashAir card
  • #2 Is the folder you want the data copied to.  I don't know your username on your computer so you will need to edit that.  Using Finder, create that FlashAirData folder in Downloads
  • #3 is where you have your OSCAR.app installed.  If you followed the install instructions when you first downloaded OSCAR it should be in /Applications. If you installed it somewhere else you will need to enter that location.
Code:
##1 Enter you FlashAir card name or IP address below (between the quotes " ")
set diskName to "192.168.0.250"
#
##2 Enter the location you want your xPAP data transferred to (between the quotes " "). The folder (directory) must already exist!
set copyLocation to "/Users/MCS2014/Downloads/FlashAirData/"
#
##3 Enter the location of OSCAR.app, by default it's /Applications
set oscarLocation to "/Applications"
#
#Do not change anything below here
#Mount the FlashAir card and make sure it shows up in /Volumes
try
    mount volume "http://" & diskName
    repeat until diskName is in (do shell script "ls /Volumes")
        delay 0.2
    end repeat
on error e
    display dialog "An error occured: " & e
end try
#
#Open Terminal and use rsync to copy FlashAir to computer or NAS
tell application "Terminal"
    activate
    do script "rsync -avz /Volumes/" & diskName & "/" & " " & copyLocation in window 1
end tell
#Pause the app until rsync is finished
set isBusy to true
repeat until isBusy is false
    tell application "Terminal"
        tell window 1
            set isBusy to busy as boolean --> Test if busy
        end tell
    end tell
    delay 1 --> Check every second
end repeat
delay 1
#Unmount FlashAir so we don't accidently change anything on the card
do shell script "diskutil unmount /Volumes/" & diskName
delay 1
do shell script "open" & " " & oscarLocation & "/OSCAR.app"
quit application "Terminal"

After you edit the above 3 spots, use the top menubar in Script Editor choose File > Save
In the Save window select "File Format" and choose "Application", then give your new app a name (CopyCPAP.app in the below screenshot).  Choose where you want to save it (mine is on my Desktop),  then click the Save button (lower right).  After it is saved some of the text will change color, this is normal.
You can now close Script Editor (Command + Q).



If all went well you should be able to double click CopyCPAP.app.  Your Mac will likely ask for your permission to access files the first time.  It will then mount your FLashAir card, a Terminal window will open showing you that rsync is working, when rsync is finished it will open OSCAR and close the Terminal window.  You may need to tell OSCAR where the new FlashAirData folder is when you do your import.

The first time rsync is run it will copy everything from your FlashAir card which may be slow depending on how much data is there.  After that it will only copy files that have changed so it will go pretty quick.

Here it what was pasted and edited in Script Editor:

##1 "192.168.0.250"
#
##2 "/computeruser2/Downloads/FlashAirData/"
#
##3 "/Applications"
#
#Do not change anything below here
#Mount the FlashAir card and make sure it shows up in /Volumes
try
mount volume "http://" & diskName
repeat until diskName is in (do shell script "ls /Volumes")
delay 0.2
end repeat
on error e
display dialog "An error occured: " & e
end try
#
#Open Terminal and use rsync to copy FlashAir to computer or NAS
tell application "Terminal"
activate
do script "rsync -avz /Volumes/" & diskName & "/" & " " & copyLocation in window 1
end tell
#Pause the app until rsync is finished
set isBusy to true
repeat until isBusy is false
tell application "Terminal"
tell window 1
set isBusy to busy as boolean --> Test if busy
end tell
end tell
delay 1 --> Check every second
end repeat
delay 1
#Unmount FlashAir so we don't accidently change anything on the card
do shell script "diskutil unmount /Volumes/" & diskName
delay 1
do shell script "open" & " " & oscarLocation & "/OSCAR.app"
quit application "Terminal"


And here is the error message I got when clicking on CopyCPAP:
[Image: nFlogcs.png]
Post Reply Post Reply
RE: Monitoring data wirelessly
You never set this variable.  In fact, you commented it out with, "##1 "192.168.0.250"".  Any line that starts with a number sign(#), means it is a comment and not to act upon it.

You need to place this in the top of your code:
set diskName to "192.168.0.250"

Update:
After further reviewing your code, you commented out these variables as well:
set copyLocation to "/Users/MCS2014/Downloads/FlashAirData/"
set oscarLocation to "/Applications"
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
RE: Monitoring data wirelessly
@mcs2014, 

You deleted the beginning of the script when you should have just edited what was there!!!  There was no mention of deleting anything in the instructions!
Based on what you have, this is what your script should look like.  Just copy and paste everything below:

Code:
##1 Enter you FlashAir card name or IP address below (between the quotes " ")
set diskName to "192.168.0.250"
#
##2 Enter the location you want your xPAP data transferred to (between the quotes " "). The folder (directory) must already exist!
set copyLocation to "/Users/computeruser2/Downloads/FlashAirData/"
#
##3 Enter the location of OSCAR.app, by default it's /Applications
set oscarLocation to "/Applications"
#
#Do not change anything below here
#Mount the FlashAir card and make sure it shows up in /Volumes
try
   mount volume "http://" & diskName
   repeat until diskName is in (do shell script "ls /Volumes")
       delay 0.2
   end repeat
on error e
   display dialog "An error occured: " & e
end try
#
#Open Terminal and use rsync to copy FlashAir to computer or NAS
tell application "Terminal"
   activate
   do script "rsync -avz /Volumes/" & diskName & "/" & " " & copyLocation in window 1
end tell
#Pause the app until rsync is finished
set isBusy to true
repeat until isBusy is false
   tell application "Terminal"
       tell window 1
           set isBusy to busy as boolean --> Test if busy
       end tell
   end tell
   delay 1 --> Check every second
end repeat
delay 1
#Unmount FlashAir so we don't accidently change anything on the card
do shell script "diskutil unmount /Volumes/" & diskName
delay 1
do shell script "open" & " " & oscarLocation & "/OSCAR.app"
quit application "Terminal"

As Crimson Nape mentioned, any line that starts with a # is just a comment in the script and is not processed.  The next line below the # is the one that usually needs to be changed.
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
RE: Monitoring data wirelessly
(12-02-2020, 12:42 AM)Jeff8356 Wrote: @mcs2014, 

You deleted the beginning of the script when you should have just edited what was there!!!  There was no mention of deleting anything in the instructions!
Based on what you have, this is what your script should look like.  Just copy and paste everything below:

Code:
##1 Enter you FlashAir card name or IP address below (between the quotes " ")
set diskName to "192.168.0.250"
#
##2 Enter the location you want your xPAP data transferred to (between the quotes " "). The folder (directory) must already exist!
set copyLocation to "/Users/computeruser2/Downloads/FlashAirData/"
#
##3 Enter the location of OSCAR.app, by default it's /Applications
set oscarLocation to "/Applications"
#
#Do not change anything below here
#Mount the FlashAir card and make sure it shows up in /Volumes
try
   mount volume "http://" & diskName
   repeat until diskName is in (do shell script "ls /Volumes")
       delay 0.2
   end repeat
on error e
   display dialog "An error occured: " & e
end try
#
#Open Terminal and use rsync to copy FlashAir to computer or NAS
tell application "Terminal"
   activate
   do script "rsync -avz /Volumes/" & diskName & "/" & " " & copyLocation in window 1
end tell
#Pause the app until rsync is finished
set isBusy to true
repeat until isBusy is false
   tell application "Terminal"
       tell window 1
           set isBusy to busy as boolean --> Test if busy
       end tell
   end tell
   delay 1 --> Check every second
end repeat
delay 1
#Unmount FlashAir so we don't accidently change anything on the card
do shell script "diskutil unmount /Volumes/" & diskName
delay 1
do shell script "open" & " " & oscarLocation & "/OSCAR.app"
quit application "Terminal"

As Crimson Nape mentioned, any line that starts with a # is just a comment in the script and is not processed.  The next line below the # is the one that usually needs to be changed.

Ok, back on track, revised to exactly the above script, clicked CopyCPAP.app, rsync completed, the Terminal window closed, OSCAR opened.  Then I got this:

[Image: Q1T2Gu6.png]
So, I clicked Yes, but all OSCAR shows is the last import which was read when I had the card in the computer from last Fri. So, it isn't picking up the data that's since been recorded as the card was placed back in the machine. What did I do wrong now? Huh
Post Reply Post Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
Question OK TO IMPORT SLEEP DATA FROM OLD SD CARD INTO OSCAR W/O MESSING UP CURRENT DATA? Plmnb 1 71 6 hours ago
Last Post: Ibrumley
  Intermittent use of C-PAP machine and OSCAR monitoring Thanassis 6 240 02-27-2024, 10:52 AM
Last Post: Thanassis
  Viatom/WellUE data is different than OSCAR displayed data GordK 3 289 02-23-2024, 04:48 PM
Last Post: GordK
  Data structure / data definition of AirSense 11 CD, CMSd50+ or OSCAR?hing obvious, … Perickson 4 1,628 02-18-2024, 01:49 PM
Last Post: Perickson
  Import OSCAR data wirelessly LikeaGlove90 0 541 11-14-2023, 01:13 AM
Last Post: LikeaGlove90
  Changed data directory from OneDrive, Now can't read data Rich66 9 1,023 08-24-2023, 11:32 PM
Last Post: Rich66
  Can OSCAR download data wirelessly clownbell 5 3,235 04-27-2022, 12:24 PM
Last Post: TennisTom


New Posts   Today's Posts


About Apnea Board

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