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

OSCAR -> InfluxDB -> Grafana
#1
OSCAR -> InfluxDB -> Grafana
Hello,

I'm fairly new to the wonderful world of APNEA, got my machine just a few months ago.. Smile

The clues led me here, and I've now bought a FlashAIR SD-card for my Airsense 10. I've also installed OSCAR on a virtualized Lubuntu and mounted the FlashAIR card in fstab as webdav. Everything works flawlessly. The thing is however, that I would like to automatically export the data to my own db (influxdb would prolly be best) and then use Grafana to graph the most important statistics.

I know you can manually export cvs-files but that defeats the purpose as I want the data to populate the database automatically. 

I have, however, no idea how to go about this. The options in OSCAR seems to be limited. Are there other software more suited for my needs? Have anyone else tried to do something similar (and succeeded Smile?

/Omygolly
Post Reply Post Reply
#2
RE: OSCAR -> InfluxDB -> Grafana
ResMed writes the cards using an EDF format. You can write a program to interpret that data directly. That is what OSCAR does.

If you manage to do this for devices that OSCAR does not currently support, please let us know.
Post Reply Post Reply
#3
RE: OSCAR -> InfluxDB -> Grafana
I see. I'm unfortunately not a coder, so I won't be able to write a parser like that. 

I found a manual way to go about it:

1) Export everything to CSV
2) Use Bugazelle/export-csv-to-influx to export CSV to InfluxDB (using crontab and the --drop_database option would automate it) 

To make it totally automated the following additions would have to be made:

1) Auto-import SD-card data either on change or scheduled
2) Auto-export CSV scheduled times (overwrite enabled so the cronjob for export-csv-to-influx reads the same file)
Post Reply Post Reply
#4
RE: OSCAR -> InfluxDB -> Grafana
Is there anywhere one can request future enhancements (such as the ones above) to the OSCAR software developement team?
Post Reply Post Reply
#5
RE: OSCAR -> InfluxDB -> Grafana
(10-07-2019, 06:03 AM)omygolly Wrote: Is there anywhere one can request future enhancements (such as the ones above) to the OSCAR software developement team?

Yes, just mention it in this forum - the project manager and other members of the team read the forum on a regular basis. No guarantee that any particular request will be actioned soon as there is already quite a long list of things to be done.
Post Reply Post Reply
#6
RE: OSCAR -> InfluxDB -> Grafana
(10-06-2019, 03:46 PM)bonjour Wrote: ResMed writes the cards using an EDF format.

By the way, is EDF same as European Data Format?

https://www.edfplus.info/

https://en.wikipedia.org/wiki/European_Data_Format
Post Reply Post Reply
#7
RE: OSCAR -> InfluxDB -> Grafana
(10-07-2019, 10:26 AM)unidee Wrote:
(10-06-2019, 03:46 PM)bonjour Wrote: ResMed writes the cards using an EDF format.

By the way, is EDF same as European Data Format?

https://www.edfplus.info/

https://en.wikipedia.org/wiki/European_Data_Format


Long answer: Yes! Big Grin
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
#8
RE: OSCAR -> InfluxDB -> Grafana
We, the OSCAR team, are in the process of rewriting the Data read part of OSCAR.  We are mostly done with the PR portion and are actively working on the ResMed portion.

This is what we are trying to complete prior to the next release of OSCAR.  Eventually, this will lead to a redesign of the data that OSCAR uses.  Prior to this redesign, we need to have a full understanding of the data available from various machines. 

We have never considered an export of the "raw" data to an outside entity.
Post Reply Post Reply
#9
RE: OSCAR -> InfluxDB -> Grafana
Quote:We have never considered an export of the "raw" data to an outside entity.

Hi! Raw-data is not necessary, CSV would do fine as long as there was some way to schedule the exports (and preferably also enabling over-writing the same file). But that would pointless if there also wasn't a way to schedule imports of the SD-card. 

For example, import the sd-card at 12:00 daily, export the cvs 12:05 daily.
Post Reply Post Reply
#10
RE: OSCAR -> InfluxDB -> Grafana
Making the data accessible daily would mean that I could display the number of event on my Home Assistant dashboard for example, or have Alexa/Google read the report in the morning, or simply have a little RBG-light that shone red for a lot of events and green on a uneventful night.
Post Reply Post Reply



New Posts   Today's Posts


About Apnea Board

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