===Code for CopyCPAP script:===
<nowiki>(* Updated 11 December 2020 *)##Enter you FlashAir card name or IP address below (between the quotes " ")
set diskName to "192.168.1.240"
#
#
#Enter the location of OSCAR.app, by default it's /Applications
# if you have it installed on your desktop you can change it to "/Users/yourusername/Desktop
set oscarLocation to "/Applications"
#
#Do not edit anything below this linehere ############################## Close any running instances of Terminalquit application "Terminal"delay 3
#
#Mount the FlashAir card and make sure it shows up in /Volumes
tell application "Finder" try if not (exists "/Volumes/" & diskName) then 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 tryend tell
#
#Open Terminal and use rsync to copy FlashAir to your computer or NAS
tell application "Terminal"
activate do script "rsync -avz avzP /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 2
# Eject FlashAir so we don't accidently change anything on the card
tell application "Finder"
try
eject alias diskName
end try
end tell
delay 1
#Unmount FlashAir so we don't accidently change anything on the carddo shell script "diskutil unmount /Volumes/" & diskNamedelay 1Now open OSCAR and quit Terminal
do shell script "open" & " " & oscarLocation & "/OSCAR.app"
quit application "Terminal"</nowiki>
Once you save the the file as an application it can be used like any other app on your Mac. Just double-click it to start it.
==Sample config file for FlashAir==
A sample FlashAir config file that works with FlashAir:<br /><br />
----
<codepre>[WLANSD]<br /> DHCP_Enabled=NOIP_Address=192.168.1.240 ← Change to the fixed IP you wantSubnet_Mask=255.255.255.0Default_Gateway=192.168.1.1 ← Change to your router IPPreferred_DNS_Server=192.168.1.1 ← Change to your router IP
DHCP_Enabled=NO<br />IP_Address=192.168.1.240 ← Change to the fixed IP you want<br />Subnet_Mask=255.255.255.0 <br />Default_Gateway=192.168.1.240 ← Change to your router IP<br />Preferred_DNS_Server=192.168.1.240 ← Change to your router IP<br />[VENDOR]
[VENDOR]VERSION=F15DBW3BW4.00.04CID=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ← Unique ID number, don’t changePRODUCT=FlashAirAPPSSID=MyWiFi ← Your WiFi nameAPPNETWORKKEY=MyPassword ← Your WiFi password (will show as asterisk)APPNAME=resmedfa ← Name for your FlashAir cardAPPMODE=5 ← Important: this must be set to 5APPAUTOTIME=0DNSMODE=1UPLOAD=1NOISE_CANCEL=2LOCK=1WEBDAV=1TIMEZONE=-16<br /pre>
VERSION=F15DBW3BW4The TIMEZONE is calculated by using your UTC offset * 4.00.04<br />CID=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ← Unique ID number, don’t change<br />PRODUCT=FlashAir<br />APPSSID=MyWiFi ← Your WiFi name<br />APPNETWORKKEY=MyPassword ← Your WiFi password For example if your UTC is -4 then (will show as asterisk)<br />APPNAME=resmedfa ← Name for your FlashAir card<br />APPMODE=5 ← Important: this must be set to 5<br />APPAUTOTIME=0<br />DNSMODE=1<br />UPLOAD=1<br />NOISE_CANCEL=2<br />LOCK=1<br />WEBDAV=1<br />TIMEZONE-4 * 4 =-16<br /></code>)
----