Apnea Board Forum - CPAP | Sleep Apnea
OSCAR -> InfluxDB -> Grafana - 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: OSCAR -> InfluxDB -> Grafana (/Thread-OSCAR-InfluxDB-Grafana)

Pages: 1 2


OSCAR -> InfluxDB -> Grafana - omygolly - 10-06-2019

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


RE: OSCAR -> InfluxDB -> Grafana - Gideon - 10-06-2019

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.


RE: OSCAR -> InfluxDB -> Grafana - omygolly - 10-07-2019

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)


RE: OSCAR -> InfluxDB -> Grafana - omygolly - 10-07-2019

Is there anywhere one can request future enhancements (such as the ones above) to the OSCAR software developement team?


RE: OSCAR -> InfluxDB -> Grafana - DeepBreathing - 10-07-2019

(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.


RE: OSCAR -> InfluxDB -> Grafana - unidee - 10-07-2019

(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


RE: OSCAR -> InfluxDB -> Grafana - Crimson Nape - 10-07-2019

(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


RE: OSCAR -> InfluxDB -> Grafana - Gideon - 10-07-2019

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.


RE: OSCAR -> InfluxDB -> Grafana - omygolly - 10-08-2019

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.


RE: OSCAR -> InfluxDB -> Grafana - omygolly - 10-08-2019

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.