SleepyHead 0.8.8 "Almost Beta" Release

General Discussion on any topic relating to CPAP and/or Sleep Apnea.
User avatar
peterg
Posts: 191
Joined: Fri Aug 05, 2011 11:01 pm

Re: SleepyHead 0.8.8 "Almost Beta" Release

Post by peterg » Sat Dec 10, 2011 8:01 pm

jedimark wrote:
As for Intellipap, Nope.. sorry, you need whatever gives you the SD card for it to work at the moment with SleepyHead.
......... I'm not sure of DeVilbiss's reasoning for having a separate data acquisition module. Is there a 9pin din serial port connector on your box? or is that on the SmartLink module too?

its a 6 pin round PS2 connector on my machine.
goin by this (blowup extra photos
https://www.cpap.com/productpage/devilb ... ystem.html
the module uses a cable that is 6 pin round to USB (which presumaby connects the module to machine).
there is an adapter serial to usb which presumably connects machine to computer.
and a sd card reader (why , I dont know, maybe for data portability).

also, only a couple of weeks ago a thread here was trying to nut out the Intellipap's data format. to whom do we owe credit? and I am surprised that Devilbiss didnt go one extra and use encryption as standard (shutup memo to me, don;t give them any ideas).
I love the openness of Sleepuhead and this forum and look forward to delving into the data next year when I get the module.
Power to the people.

User avatar
jedimark
Posts: 1300
Joined: Fri Feb 18, 2011 12:45 am
Location: Bundaberg, Australia
Contact:

Re: SleepyHead 0.8.8 "Almost Beta" Release

Post by jedimark » Sat Dec 10, 2011 9:01 pm

peterg wrote:
jedimark wrote:
As for Intellipap, Nope.. sorry, you need whatever gives you the SD card for it to work at the moment with SleepyHead.
......... I'm not sure of DeVilbiss's reasoning for having a separate data acquisition module. Is there a 9pin din serial port connector on your box? or is that on the SmartLink module too?

its a 6 pin round PS2 connector on my machine.
goin by this (blowup extra photos
https://www.cpap.com/productpage/devilb ... ystem.html
the module uses a cable that is 6 pin round to USB (which presumaby connects the module to machine).
there is an adapter serial to usb which presumably connects machine to computer.
and a sd card reader (why , I dont know, maybe for data portability).
Cool
also, only a couple of weeks ago a thread here was trying to nut out the Intellipap's data format. to whom do we owe credit? and I am surprised that Devilbiss didnt go one extra and use encryption as standard (shutup memo to me, don;t give them any ideas).
I love the openness of Sleepuhead and this forum and look forward to delving into the data next year when I get the module.
Power to the people.
Intellipap hacking was my fault. admittedly it wasn't that hard once I figured out the repeating patterns in the U & L files.. It will be much more fun if we can get at the flow waveform..

As for encryption, why should they be allowed to encrypt YOUR data so YOU can't read it? They do not own it.. ResMed recognizes this, and provides an open format..

I see major legal ramifications in preventing users of these devices having access to their own information. You signed no legal document transferring ownership of your recorded breathing patterns over to them, and anything based of these is a derived work.

_________________
Machine: ResMed AirSense™ 10 AutoSet™ CPAP Machine with HumidAir™ Heated Humidifier
Mask: Swift™ FX Nasal Pillow CPAP Mask with Headgear
Humidifier: S9™ Series H5i™ Heated Humidifier with Climate Control
Additional Comments: CMS50D+/F Oximeter, S9 VPAP Auto/Adapt, PRS1 Auto, Intellipap Auto, SleepyHead :)
Author of the free, cross platform, open-source sleep tracking software SleepyHead.
Download http://sleepyhead.jedimark.net
Source Code http://gitlab.com/sleepyhead/sleepyhead-code

cpaptex
Posts: 118
Joined: Tue Nov 15, 2011 4:18 pm

Re: SleepyHead 0.8.8 "Almost Beta" Release

Post by cpaptex » Mon Dec 12, 2011 7:31 pm

The DME gave me a new machine today. So tomorrow when I d/l the info onto my laptop. Is there a way to continue with the data? The new machine will start from scratch. 0 days used, 0 AHI etc.

Do I create a new user?
I'm getting better day by day. Few if any OA Events, mostly CAs and Hyponeas.

I have Interstital Lung Disease

User avatar
jedimark
Posts: 1300
Joined: Fri Feb 18, 2011 12:45 am
Location: Bundaberg, Australia
Contact:

Re: SleepyHead 0.8.8 "Almost Beta" Release

Post by jedimark » Mon Dec 12, 2011 9:15 pm

cpaptex wrote:The DME gave me a new machine today. So tomorrow when I d/l the info onto my laptop. Is there a way to continue with the data? The new machine will start from scratch. 0 days used, 0 AHI etc.

Do I create a new user?

Nope.. Just import as normal. Each day in SleepyHead allows for a different machine.. Can even be a different brand.

Be careful with crossover days... If your sleeping funny times you could run into trouble.. worse case scenario, you will need to lose a day of data from your old machines data (a good time to back your SD card up from your old machine)

Let me know if it barfs, it's not hard to sort out..

_________________
Machine: ResMed AirSense™ 10 AutoSet™ CPAP Machine with HumidAir™ Heated Humidifier
Mask: Swift™ FX Nasal Pillow CPAP Mask with Headgear
Humidifier: S9™ Series H5i™ Heated Humidifier with Climate Control
Additional Comments: CMS50D+/F Oximeter, S9 VPAP Auto/Adapt, PRS1 Auto, Intellipap Auto, SleepyHead :)
Author of the free, cross platform, open-source sleep tracking software SleepyHead.
Download http://sleepyhead.jedimark.net
Source Code http://gitlab.com/sleepyhead/sleepyhead-code

User avatar
idamtnboy
Posts: 2186
Joined: Mon Nov 01, 2010 2:12 pm
Location: Idaho

Re: SleepyHead 0.8.8 "Almost Beta" Release

Post by idamtnboy » Mon Dec 12, 2011 9:44 pm

Mark, I just happened to look at this Sleepyhead graph in this thread. viewtopic/t71982/1st-30-daysneed-advice-B4-Dr-appt.html. Is your way of plotting AHI correct? It's not the same as in Resscan. In Resscan the AHI graph resets to zero at the beginning of each 1 hour period starting with the time therapy was started. The AHI for that hour is a count of the events for that 1 hour period and increments up with each event. On the particular graph in the link it reset to zero only one time. Are you calculating the running AHI differently from Resscan and that's why the graph is different?

_________________
Mask: AirFit™ P10 Nasal Pillow CPAP Mask with Headgear
Humidifier: S9™ Series H5i™ Heated Humidifier with Climate Control
Additional Comments: Hose management - rubber band tied to casement window crank handle! Hey, it works! S/W is 3.13, not 3.7

User avatar
jedimark
Posts: 1300
Joined: Fri Feb 18, 2011 12:45 am
Location: Bundaberg, Australia
Contact:

Re: SleepyHead 0.8.8 "Almost Beta" Release

Post by jedimark » Mon Dec 12, 2011 10:20 pm

idamtnboy wrote:Mark, I just happened to look at this Sleepyhead graph in this thread. viewtopic/t71982/1st-30-daysneed-advice-B4-Dr-appt.html. Is your way of plotting AHI correct? It's not the same as in Resscan. In Resscan the AHI graph resets to zero at the beginning of each 1 hour period starting with the time therapy was started. The AHI for that hour is a count of the events for that 1 hour period and increments up with each event. On the particular graph in the link it reset to zero only one time. Are you calculating the running AHI differently from Resscan and that's why the graph is different?
I calculate the Ahi/Hr graph with a sliding 1hr window (moving in 30 second increments).. Which I feel is the most statistically correct and more accurate method..

I do believe ResScans method in this case is rather wrong, and does not convey an accurate picture of what's going on: it could reset in the middle of an event cluster because it crossed an hour boundary, and negate the seriousness of it.

However that said, there is nothing wrong with supporting both models and having an option in preferences to select between the two.
Hmm.. It would need to be recalculated for each day, and have its summary index updated every time the settings were changed.

_________________
Machine: ResMed AirSense™ 10 AutoSet™ CPAP Machine with HumidAir™ Heated Humidifier
Mask: Swift™ FX Nasal Pillow CPAP Mask with Headgear
Humidifier: S9™ Series H5i™ Heated Humidifier with Climate Control
Additional Comments: CMS50D+/F Oximeter, S9 VPAP Auto/Adapt, PRS1 Auto, Intellipap Auto, SleepyHead :)
Author of the free, cross platform, open-source sleep tracking software SleepyHead.
Download http://sleepyhead.jedimark.net
Source Code http://gitlab.com/sleepyhead/sleepyhead-code

User avatar
jedimark
Posts: 1300
Joined: Fri Feb 18, 2011 12:45 am
Location: Bundaberg, Australia
Contact:

Re: SleepyHead 0.8.8 "Almost Beta" Release

Post by jedimark » Tue Dec 13, 2011 12:14 am

I wanted to show off the beginnings of a new feature, one I didn't think I could wrap my head around until SleepyHead 2.
Right now this is just for PRS1 users, as it plugs into the Resp Rate calculations, but will be expanded to any machine with Flow Data soon.

I was playing with detecting apneas from flow waveform, and my algorithm started picking up on some events that the PRS1 missed. I made it only bother to flag the events if the PRS1 didn't detect them already, otherwise there would be double ups everywhere. The PRS1 also flags a couple mine misses, but the two together compliment each other..

My algorithm also detects a few "almost" or borderline apneas. It has two parameters which will be adjustable in preferences.. duration in seconds, and a percentage of flow restriction. It can only detect them during import, so I would need to make it recalculate a lot of data if the settings changed.

For now, I call them "User Flags".

In the following screenshot, all these events are longer than 10 seconds, but were not detected by the PRS1.
(The blue highlighting is just the mouse selection to show the relevant area)
Edit: Rough copy and paste job.. the SpO2 belongs to the middle one..

Image

Ideas for improvements are welcome

_________________
Machine: ResMed AirSense™ 10 AutoSet™ CPAP Machine with HumidAir™ Heated Humidifier
Mask: Swift™ FX Nasal Pillow CPAP Mask with Headgear
Humidifier: S9™ Series H5i™ Heated Humidifier with Climate Control
Additional Comments: CMS50D+/F Oximeter, S9 VPAP Auto/Adapt, PRS1 Auto, Intellipap Auto, SleepyHead :)
Author of the free, cross platform, open-source sleep tracking software SleepyHead.
Download http://sleepyhead.jedimark.net
Source Code http://gitlab.com/sleepyhead/sleepyhead-code

User avatar
idamtnboy
Posts: 2186
Joined: Mon Nov 01, 2010 2:12 pm
Location: Idaho

Re: SleepyHead 0.8.8 "Almost Beta" Release

Post by idamtnboy » Tue Dec 13, 2011 12:20 am

jedimark wrote:I calculate the Ahi/Hr graph with a sliding 1hr window (moving in 30 second increments).. Which I feel is the most statistically correct and more accurate method..

I do believe ResScans method in this case is rather wrong, and does not convey an accurate picture of what's going on: it could reset in the middle of an event cluster because it crossed an hour boundary, and negate the seriousness of it.
I thought maybe you were using a sliding window. Does any scheme provide a truly meaningful picture? A sliding half-hour window would be more accurate over the short term, but is it more meaningful? I'm not sure resetting in the middle of a cluster really matters. Is a single cluster of 10 events within 30 minutes a worse condition than 10 events evenly spaced out over the night? At the end of the day, or rather night(!), we focus on the AHI for the whole night, which of course is an average for the whole night, but is that better than what happens in a single specific time period? I think if the medical profession had a good solid handle on the issue we would see a different approach. I'm of the opinion that striving for a definitive number to discriminate between not so bad, bad, and really bad apnea conditions is kind of like counting clouds. Difficult to come up with a solid number, and if you do, what does it mean anyway?

When I'm paying attention to my weight I focus on the 5 day running average number. Five is somewhat arbitrary but it seems to be a good compromise between being a short enough time span to easily see real changes taking place, and long enough to smooth out day to day fluctuations. For a single night your approach does that. Maybe something like that is the AHI number we really ought to focus on, our average AHI for the last 5 nights. I know my night to night AHI jumps around like a kid on a trampoline.

In manufacturing statistical process control is the method of choice. Basically you measure the characteristic of interest on several consecutive parts, e.g. five, periodically through the run, say like every 50 or 100 parts. This gives a good picture of part to part variability, and comparing the average from one group to the next gives a picture of the overall trend. Something like that may be the way to go. Maybe build an option into Sleepyhead to summarize past data into a similar type picture.

We probably have the best answer already in this forum to the question, "How good are my numbers?" "How do you feel?"

_________________
Mask: AirFit™ P10 Nasal Pillow CPAP Mask with Headgear
Humidifier: S9™ Series H5i™ Heated Humidifier with Climate Control
Additional Comments: Hose management - rubber band tied to casement window crank handle! Hey, it works! S/W is 3.13, not 3.7

User avatar
jedimark
Posts: 1300
Joined: Fri Feb 18, 2011 12:45 am
Location: Bundaberg, Australia
Contact:

Re: SleepyHead 0.8.8 "Almost Beta" Release

Post by jedimark » Tue Dec 13, 2011 12:50 am

idamtnboy wrote:
jedimark wrote:I calculate the Ahi/Hr graph with a sliding 1hr window (moving in 30 second increments).. Which I feel is the most statistically correct and more accurate method..

I do believe ResScans method in this case is rather wrong, and does not convey an accurate picture of what's going on: it could reset in the middle of an event cluster because it crossed an hour boundary, and negate the seriousness of it.
I thought maybe you were using a sliding window. Does any scheme provide a truly meaningful picture? A sliding half-hour window would be more accurate over the short term, but is it more meaningful? I'm not sure resetting in the middle of a cluster really matters. Is a single cluster of 10 events within 30 minutes a worse condition than 10 events evenly spaced out over the night? At the end of the day, or rather night(!), we focus on the AHI for the whole night, which of course is an average for the whole night, but is that better than what happens in a single specific time period? I think if the medical profession had a good solid handle on the issue we would see a different approach. I'm of the opinion that striving for a definitive number to discriminate between not so bad, bad, and really bad apnea conditions is kind of like counting clouds. Difficult to come up with a solid number, and if you do, what does it mean anyway?

When I'm paying attention to my weight I focus on the 5 day running average number. Five is somewhat arbitrary but it seems to be a good compromise between being a short enough time span to easily see real changes taking place, and long enough to smooth out day to day fluctuations. For a single night your approach does that. Maybe something like that is the AHI number we really ought to focus on, our average AHI for the last 5 nights. I know my night to night AHI jumps around like a kid on a trampoline.

In manufacturing statistical process control is the method of choice. Basically you measure the characteristic of interest on several consecutive parts, e.g. five, periodically through the run, say like every 50 or 100 parts. This gives a good picture of part to part variability, and comparing the average from one group to the next gives a picture of the overall trend. Something like that may be the way to go. Maybe build an option into Sleepyhead to summarize past data into a similar type picture.

We probably have the best answer already in this forum to the question, "How good are my numbers?" "How do you feel?"

The way I see it, if you woke up right after a cluster of 70 events in the previous hour, your guaranteed to feel much worse, than if you had an hour of recovery sleep after such a cluster, so I feel it's a very time relative thing.. (and I get clusters like this a lot)

Whatever time window it's showing, it's still an indication of something bad going on.
Maybe having a preference option for this time window to be adjustable, and a checkbox to reset every hour would be enough?

Averaging the Daily ahi/hr graph will smooth the graph, and possibly make it look more attractive, but will not change the trend of the data.
This kind of thing will probably help more with the Overview summary Ahi/Hr chart. (and be nice as a secondary plot on the Weight/BMI thing too)

Unfortunately numbers quite often mean jack.. I've had days with a low AHI, and no clusters, yet I feel like death.. Other days with an AHI through the roof, and I feel almost human..

_________________
Machine: ResMed AirSense™ 10 AutoSet™ CPAP Machine with HumidAir™ Heated Humidifier
Mask: Swift™ FX Nasal Pillow CPAP Mask with Headgear
Humidifier: S9™ Series H5i™ Heated Humidifier with Climate Control
Additional Comments: CMS50D+/F Oximeter, S9 VPAP Auto/Adapt, PRS1 Auto, Intellipap Auto, SleepyHead :)
Author of the free, cross platform, open-source sleep tracking software SleepyHead.
Download http://sleepyhead.jedimark.net
Source Code http://gitlab.com/sleepyhead/sleepyhead-code

User avatar
Java Time
Posts: 135
Joined: Fri Nov 11, 2011 3:08 pm
Location: Washington State in the rain

Re: SleepyHead 0.8.8 "Almost Beta" Release

Post by Java Time » Tue Dec 13, 2011 12:39 pm

jedimark wrote:
idamtnboy wrote:I'm of the opinion that striving for a definitive number to discriminate between not so bad, bad, and really bad apnea conditions is kind of like counting clouds. Difficult to come up with a solid number, and if you do, what does it mean anyway?

When I'm paying attention to my weight I focus on the 5 day running average number. Five is somewhat arbitrary but it seems to be a good compromise between being a short enough time span to easily see real changes taking place, and long enough to smooth out day to day fluctuations. For a single night your approach does that. Maybe something like that is the AHI number we really ought to focus on, our average AHI for the last 5 nights. I know my night to night AHI jumps around like a kid on a trampoline.
...Averaging the Daily ahi/hr graph will smooth the graph, and possibly make it look more attractive, but will not change the trend of the data.
This kind of thing will probably help more with the Overview summary Ahi/Hr chart. (and be nice as a secondary plot on the Weight/BMI thing too)
Maybe I'm misunderstanding what is being requested. I'm not quite sure if what is being stated above is just a comment that "looking at multiple day trends is good" (which I agree with ) or if this is a "request to ADD trend data to sleepyhead". My apologies if I'm confused and my comments below are out of context.

I believe you already have this "multiple day" feature on the overview page and I use it all the time. If I want a running 3 day, 5 day, 7 day, etc, I zoom in on overview until I have the desired number of days showing on the screen. I then drag the bar left or right without changing the scale. All of the calculated averages in the upper right corner of each section update as a day adds or drops off of the right or left hand side of the screen.

This works really slick and is useful to track "x number of day" trends on any of the overview data.
If you are struggling with congestion, it helped me to add Alkalol to my daily sinus rinse. This reduced my congestion and allows me to breathe freely with my CPAP mask. CPAPtalk post about Alkalol use here: viewtopic.php?p=665255#p665255

User avatar
Perrybucsdad
Posts: 834
Joined: Mon Sep 12, 2011 7:09 am
Location: Northeast Ohio

Re: SleepyHead 0.8.8 "Almost Beta" Release

Post by Perrybucsdad » Tue Dec 13, 2011 1:01 pm

Mark, when exporting the data from the app, what does "Pressure" and "EPAP" indicate under event for the detail export? I have a Resmed unit.

Image

_________________
Machine: ResMed AirSense™ 10 AutoSet™ CPAP Machine with HumidAir™ Heated Humidifier
Mask: AirFit™ P10 Nasal Pillow CPAP Mask with Headgear
Additional Comments: ResScan v5.9; Sleepyhead v1.0.0-beta

User avatar
Breathe Jimbo
Posts: 954
Joined: Sun Sep 12, 2010 3:02 pm
Location: Pasadena, CA

Re: SleepyHead 0.8.8 "Almost Beta" Release

Post by Breathe Jimbo » Tue Dec 13, 2011 2:14 pm

jedimark wrote:I was playing with detecting apneas from flow waveform, and my algorithm started picking up on some events that the PRS1 missed. I made it only bother to flag the events if the PRS1 didn't detect them already, otherwise there would be double ups everywhere. The PRS1 also flags a couple mine misses, but the two together compliment each other..

My algorithm also detects a few "almost" or borderline apneas.
Thank God a corporate programming job hasn't crushed your talent and creativity!

_________________
Humidifier: S9™ Series H5i™ Heated Humidifier with Climate Control
Additional Comments: Since 9/9/10; 13 cm; ResScan 3.16; SleepyHead 0.9; PapCap

User avatar
archangle
Posts: 9293
Joined: Sun Mar 27, 2011 11:55 am

Re: SleepyHead 0.8.8 "Almost Beta" Release

Post by archangle » Tue Dec 13, 2011 2:55 pm

jedimark wrote:I wanted to show off the beginnings of a new feature, one I didn't think I could wrap my head around until SleepyHead 2.
I'm a bit concerned about the idea of "roll your own" event detection. I think there's a lot of black magic in determining this. If you try to do your own event detection, you run the risk of finding something that works well for jedimark, but not for other people.

There seems to be a good bit of uncertainty in detecting apnea events, but I think that's mostly in the gray area where there is a judgement call. It's not a bad enough event that it really makes a lot of difference in terms of health effects. If the event is long enough and deep enough any machine will call it an apnea.

There's also the philosophical question of taking SleepyHead from a tool that simply reports what the CPAP machine said to something that does its own interpretation of events. Not that it's wrong, but it's something to consider.

_________________
Mask: Swift™ FX Nasal Pillow CPAP Mask with Headgear
Humidifier: S9™ Series H5i™ Heated Humidifier with Climate Control
Additional Comments: Also SleepyHead, PRS1 Auto, Respironics Auto M series, Legacy Auto, and Legacy Plus
Please enter your equipment in your profile so we can help you.
Click here for information on the most common alternative to CPAP.
If it's midnight and a DME tells you it's dark outside, go and check for yourself.

Useful Links.

User avatar
Java Time
Posts: 135
Joined: Fri Nov 11, 2011 3:08 pm
Location: Washington State in the rain

Re: SleepyHead 0.8.8 "Almost Beta" Release

Post by Java Time » Tue Dec 13, 2011 3:17 pm

archangle wrote:
jedimark wrote:I wanted to show off the beginnings of a new feature, one I didn't think I could wrap my head around until SleepyHead 2.
I'm a bit concerned about the idea of "roll your own" event detection. I think there's a lot of black magic in determining this. If you try to do your own event detection, you run the risk of finding something that works well for jedimark, but not for other people.

There seems to be a good bit of uncertainty in detecting apnea events, but I think that's mostly in the gray area where there is a judgement call. It's not a bad enough event that it really makes a lot of difference in terms of health effects. If the event is long enough and deep enough any machine will call it an apnea.

There's also the philosophical question of taking SleepyHead from a tool that simply reports what the CPAP machine said to something that does its own interpretation of events. Not that it's wrong, but it's something to consider.
Maybe it could be an option that is "turned on" by users from the setup menu. That way the default is off unless someone wants it.

I think several people who are used to SleepyHead would like to have this feature, but maybe you are correct about keeping it away from the newest folks who might just get confused.

I'd think most people would like the SleepyHead "default setting" to most accurately represent what they see in "Encore" or the other DME software so they are talking "apples to apples" with their doctor.

Understanding more details about your data is an advanced and important SleepyHead benefit, but I'd think the more detailed SleepyHead data is more for home use, rather than for discussion with the DME or doctor.
Last edited by Java Time on Tue Dec 13, 2011 5:51 pm, edited 1 time in total.
If you are struggling with congestion, it helped me to add Alkalol to my daily sinus rinse. This reduced my congestion and allows me to breathe freely with my CPAP mask. CPAPtalk post about Alkalol use here: viewtopic.php?p=665255#p665255

User avatar
KarenM
Posts: 7
Joined: Fri Nov 18, 2011 7:32 am

Re: SleepyHead 0.8.8 "Almost Beta" Release

Post by KarenM » Tue Dec 13, 2011 5:17 pm

So I have the S9 series VPAP Adapt SV. Anything special about reading that card or using Sleepyhead on my Mac? Thanks.
KarenM
robysue wrote:
KarenM wrote: So is there anything that will allow for pulling the data from the S8 card and use on a Mac? I'm new too and wondering what info is in there and wishing I could periodically look at it.
Thanks
KarenM,

The machine you show in your profile is a Resmed S9 VPAP S Bilevel. (I.e. a plain old bi-level, not an auto bilevel). SH on the mac should have no problems reading that machine's data.

Just to be clear: The S9 VPAP S Bilevel looks like this:
Image



And the S8 VPAP looks like this:
Image

So do you have the correct machine in your signature? In other words, do you have the S9 VPAP or the S8 VPAP?

_________________
MaskHumidifier
Additional Comments:
Karen