Apnea Board Forum - CPAP | Sleep Apnea
FlashAir Serverless Google Drive Sync - 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: FlashAir Serverless Google Drive Sync (/Thread-FlashAir-Serverless-Google-Drive-Sync)



FlashAir Serverless Google Drive Sync - Trev.Dev - 10-07-2019

tldr: Let me know if you would be interested in a FlashAir -> GoogleDrive -> Web  application that is totally serverless.  



I worked on a lua script that would sync my FlashAir to a GoogleDrive account.  This requires no software installation on your PC and just a lua script that you would add to your flashair.  Files automatically sync from the WIFI SD card to google drive with no interaction after setup.  

I probably have 50 hours of messing with my FlashAir to have a reliable sync to GoogleDrive.  There is still work to publish the file and a web application so I thought I would check the interest level here first.

It has worked flawlessly for my ResMed AirSense 10.  There is still a little work to make it dead simple to install and use all from a LUA web interface.

My goal was to include a website that could read from google drive and provide some very basic stats & graphs ( nothing compared to OSCAR ).  This means you would be able to preview your results from your phone or if you aren't at your home computer.  I hated it if I didn't have time to login to my pc at home to download and review the data before going to work. I also backlogged an option to read local files in memory using zip.js if you aren't using google drive.

Let me know if this is something that interests you.  I am looking for a little motivation to do the extra work to make it dead simple for anybody to use / install.
I have only tested this on my ResMed AirSense 10 but don't see any reason this wouldn't work for anything else since it is just syncing files.  Web App would only work with the format from AirSense 10 to start.





The GoogleDrive oauth flow is sandboxed to only the CPAP files

Code:
https://developers.google.com/drive/api/v2/about-auth
https://www.googleapis.com/auth/drive.file
Per-file access to files created or opened by the app. File authorization is granted on a per-user basis and is revoked when the user deauthorizes the app.


This means if you would use the zero configuration setup you grant access for the FlashAir to create files and only read / update files it has created.  If there is enough demand I could add configuration pages to utilize your own GDrive api keys.


RE: FlashAir Serverless Google Drive Sync - mtwomey - 10-07-2019

That's pretty cool. I didn't realize these Flashair cards could run lua.


RE: FlashAir Serverless Google Drive Sync - AlanE - 10-07-2019

They can but a limited version of it. Debug and OS functions of LUA are not available.

Now with Flashair dev site being closed, getting information is going to be harder to come by. Hopefully someone will pick it up in the future.

I would love to test this out. I can directed the data to my own Google drive?


RE: FlashAir Serverless Google Drive Sync - captainsteubing - 10-07-2019

(10-07-2019, 12:06 AM)Trev.Dev Wrote: tldr: Let me know if you would be interested in a FlashAir -> GoogleDrive -> Web  application that is totally serverless.  

I probably have 50 hours of messing with my FlashAir to have a reliable sync to GoogleDrive.  There is still work to publish the file and a web application so I thought I would check the interest level here first.

It has worked flawlessly for my ResMed AirSense 10.  There is still a little work to make it dead simple to install and use all from a LUA web interface.



My goal was to include a website that could read from google drive and provide some very basic stats & graphs ( nothing compared to OSCAR ).  This means you would be able to preview your results from your phone or if you aren't at your home computer. 



 If there is enough demand I could add configuration pages to utilize your own GDrive api keys.

Definitely interested! Very cool project love the ideas.


RE: FlashAir Serverless Google Drive Sync - edfreeman - 10-07-2019

I use FreeFileSync to synchronize my FlashAir to a card that resides in the SD slot on my laptop, runs as a batch file every day @ 11 am in the background. Thing is Oscar will fetch the data directly from the Flashair provided you've designated it as a Network drive in Windows Explorer, just takes a bit longer than reading an SD card in your computer (you'll think it has stalled, but it hasn't).


RE: FlashAir Serverless Google Drive Sync - jtech1 - 11-26-2019

(10-07-2019, 12:06 AM)Trev.Dev Wrote: tldr: Let me know if you would be interested in a FlashAir -> GoogleDrive -> Web  application that is totally serverless.  



I worked on a lua script that would sync my FlashAir to a GoogleDrive account.  This requires no software installation on your PC and just a lua script that you would add to your flashair.  Files automatically sync from the WIFI SD card to google drive with no interaction after setup.  

I probably have 50 hours of messing with my FlashAir to have a reliable sync to GoogleDrive.  There is still work to publish the file and a web application so I thought I would check the interest level here first.

It has worked flawlessly for my ResMed AirSense 10.  There is still a little work to make it dead simple to install and use all from a LUA web interface.

My goal was to include a website that could read from google drive and provide some very basic stats & graphs ( nothing compared to OSCAR ).  This means you would be able to preview your results from your phone or if you aren't at your home computer.  I hated it if I didn't have time to login to my pc at home to download and review the data before going to work. I also backlogged an option to read local files in memory using zip.js if you aren't using google drive.

Let me know if this is something that interests you.  I am looking for a little motivation to do the extra work to make it dead simple for anybody to use / install.
I have only tested this on my ResMed AirSense 10 but don't see any reason this wouldn't work for anything else since it is just syncing files.  Web App would only work with the format from AirSense 10 to start.





The GoogleDrive oauth flow is sandboxed to only the CPAP files

Code:
https://developers.google.com/drive/api/v2/about-auth
https://www.googleapis.com/auth/drive.file
Per-file access to files created or opened by the app. File authorization is granted on a per-user basis and is revoked when the user deauthorizes the app.


This means if you would use the zero configuration setup you grant access for the FlashAir to create files and only read / update files it has created.  If there is enough demand I could add configuration pages to utilize your own GDrive api keys.

I would be very interested in testing this.  I found some links to sample lua code for google drive and dropbox, but they were on Toshiba developers site which is closed down.  All I need is the upload part.  Anyone know if the sample files still exist anywhere?