SleepyHead Qt v0.8 alpha

General Discussion on any topic relating to CPAP and/or Sleep Apnea.
User avatar
jedimark
Posts: 1300
Joined: Fri Feb 18, 2011 12:45 am
Location: Bundaberg, Australia
Contact:

SleepyHead Qt v0.8 alpha

Post by jedimark » Tue Jul 05, 2011 12:40 am

Hi all,

Here's a preview of SleepyHead Qt version 0.8. Not a beta.. If your expecting a beta, please don't download this.. this is waaaay too unfinished to be called that.
(perhaps even more unfinished than what you may have seen previously)

I'll post updates relating to this Qt version in this thread. I will not rename the title of this one to make it easier to find.

Click here for where to get the 10.5MB Behemoth, and to view the README
http://sourceforge.net/projects/sleepyh ... es/Testing

Note the word "Testing" in that url. Did I mention this is not a beta?

IMPORTANT: Previous users must delete or move the SleepApp folder in my documents otherwise SleepyHead WILL crash every time you try to start the app.

Supports PR System One, Contec CMS50, and quite possibly ResMed S9 too

Plenty of things wrong with this already: some of the graphs scales aren't correct yet, overview pages info panel is quite empty, preferences and profiles just aren't written yet, Nothing in the extras tab in daily view actually works or saves.. (I left it in hoping to inspire some ideas on what to really put there)

The notes feature works, but might not be a good idea to rely on it till extra's tab is finished.. It uses the same journal machine object as notes.

Graphs still don't reorder yet. They are resizable/collapsible now (except for Event flags, which is now a central overview/control object). This is rather kludgy, but nonetheless better than not having this feature. You can have full screen with just one graph if your persistent enough with the fidgety handles..

Event flags still currently shows Resmed S9 users a few empty lines related to the PRS1..This is on the todo list. ResMed only has H, OA & CA (At least the data sets I've seen yet)

I really need feedback on what to add at this stage..

For PRS1, point the importer at the folder or SD card containing the P-Series folder
For CMS50, point the importer at the directory containing SpO2.ini, SpO2 Review.ini and Data folder
For Resmed S9, point the importer at the folder or SD card containing the DATALOG & STR.edf file, etc..

Have fun.

/Mark

_________________
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 :)
Last edited by jedimark on Tue Jul 05, 2011 1:43 am, edited 1 time in total.
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
Breathe Jimbo
Posts: 954
Joined: Sun Sep 12, 2010 3:02 pm
Location: Pasadena, CA

Re: SleepyHead Qt v0.8 alpha

Post by Breathe Jimbo » Tue Jul 05, 2011 1:31 am

These are the steps that I used to build SleepyHead for Mac OS X 10.6 (Snow Leopard). These steps include the prerequisites of installing Xcode (and all related Apple development stuff) and using MacPorts to install QT 4.7.3. If you already have Xcode and QT on your Mac running Snow Leopard, you can skip some of these steps (i.e. those relating to MacPorts and installing QT). If not, please note that QT may take several hours (7 on each of my Macs) to build, so you may want to perform that step shortly before bedtime and let it run all night as you sleep.

1. Open the App Store (in the Apple pull-down menu in the upper left-hand corner). Purchase and download Xcode for $4.99. This will take a while because Xcode is big.

2. Open your Applications folder and double-click on Install Xcode. I don't remember installation options, but if you see any you basically want EVERYTHING. Installation will take a while because Xcode is big. After installation, reboot to be on the safe side.

3. Go to http://www.macports.org/install.php Since you have installed Xcode and X11 is installed by default as part of Snow Leopard, you can scroll to the second section called "Mac OS X Package (.pkg) Installer." Left-click on the hyperlink for "Snow Leopard" and follow the instructions to install MacPorts from the .dmg file that will be downloaded.

4. Open your Applications folder and the Utilities subfolder therein, and double-click on the Terminal icon.

5. Right-click on the Terminal icon in your Dock, left-click on Options, and left-click again on Keep in Dock. All your commands to MacPorts, and other commands set forth below, will be via the command line in the Terminal, so you should have the Terminal handy in your Dock.

6. Save these two commands to a file somewhere because you will want to enter them periodically, on the command line in the Terminal, to keep MacPorts up-to-date:

sudo port selfupdate
sudo port upgrade outdated

7. Enter "sudo port selfupdate" (no quotes) on the command line, hit Return, enter your password, and hit Return again. Wait for the command line to reappear.

8. Same for "sudo port upgrade outdated" (no quotes) and hit Return, etc. Wait for the command line to reappear. If you see the "Error: No ports matched the given expression," that is not a problem. It means everything is up to date, so just continue.

9. Warning: it took about 7 hours to build QT on my iMac and MacBook, so you may want to do the next step near bedtime and let it run overnight. Enter "sudo port install qt4-mac +debug +universal" on the command line, hit Return, etc. Remember: this takes a long, long time, so do not expect anything to happen for a long, long time.

10. When you see the command line again (after several hours), enter "port info qt4-mac" and hit Return. You are ready to get and build the SleepyHead source code if you see the following output:

$ port info qt4-mac
qt4-mac @4.7.3 (aqua)
Variants: (+)debug, demos, examples, framework, mysql,
odbc, psql83, psql84, psql90, psql91, [+]quartz,
raster, sqlite2, (+)universal

Description: Qt Tool Kit: A cross-platform framework
(headers, data, and libraries) for writing
cross-platform GUI-based applications.
Homepage: http://qt.nokia.com/

Build Dependencies: pkgconfig
Library Dependencies: zlib, dbus, openssl, sqlite3, tiff, libpng,
libmng, jpeg
Conflicts with: qt3, qt3-mac, qt4-mac-devel
Platforms: macosx
License: unknown
Maintainers: michaelld@macports.org

11. In the Terminal, enter "cd" (no quotes here or below) and hit Return.

12. Enter "mkdir git" and hit Return.

13. Enter "cd git" and hit Return.

14. Enter "git clone git://sleepyhead.git.sourceforge.net/gitroot/sleepyhead/sleepyhead" and hit Return. (The forum software likes to abbreviate this long command, so you may need to right click on the preceding link, copy the link, and then paste the link into the Terminal, after "git clone ".)

15. Once git finishes the download and you see the command line again, enter "cd sleepyhead" and hit Return.

16. Enter "qmake" and hit Return.

17. Enter "make -j3" and hit Return.

18. Enter "mv sleepyheadqt.app ~/desktop" and hit Return.

19. Housekeeping: enter "make clean" and hit Return.

20. Go to your Desktop and double-click on the sleepyheadqt icon.

21. To load your data, your SD card must be mounted on your system, so that it appears as a Device in the list on the upper left side of a Finder window. Alternatively, you can make a "duplicate" of your SD card and drag the duplicate folder to your Desktop, the Documents folder, or elsewhere. To load your data in SleepyHead, click on the Import icon on the right side of the Welcome window and navigate to your SD card or the duplicate folder. It takes about 10 second to import at this point.

N.B. SleepyHead is currently alpha code - a very rough work in progress. Much does not work, and many things will change. At this point, your use is experimental and should be focused primarily on finding bugs and problems. SleepyHead is not "ready" for ordinary use and should not be used as your main software. Keep your old software and always backup your data.

If you are successful in following these steps and building SleepyHead for your Mac, please consider subscribing to the developer mailing list at https://lists.sourceforge.net/lists/lis ... head-devel so that you can report bugs and problems to Mark.

_________________
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
jedimark
Posts: 1300
Joined: Fri Feb 18, 2011 12:45 am
Location: Bundaberg, Australia
Contact:

Re: SleepyHead Qt v0.8 alpha

Post by jedimark » Tue Jul 05, 2011 2:25 am

Thanks Jimbo.

I posted some linux build instructions on source forge.. I'll copy these mac instructions Jimbo wrote up to sourceforge later.

SleepyHead will revert to it's normal name once the Qt newness wears off and the old version is forgotten.. (Qt's technically a nokia trademark..)
I just attached it to differentiate it clearly from the previous wx version, as this was quite a big reworking of the project.

The SleepApp folder may be put in Users/(username)/SleepApp instead of MyDocuments.. This is a temporary stuffup with this build, as I haven't given the windows build all that much attention other than testing it works..

This folder is still going rename when the database formats are stable, but it might go under Application Settings or something (wherever apps are supposed to put there data) For now, while things are a little raw it helps being able to easily find it.

_________________
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
Breathe Jimbo
Posts: 954
Joined: Sun Sep 12, 2010 3:02 pm
Location: Pasadena, CA

Re: SleepyHead Qt v0.8 alpha

Post by Breathe Jimbo » Tue Jul 05, 2011 1:02 pm

jedimark wrote:This folder is still going rename when the database formats are stable, but it might go under Application Settings or something (wherever apps are supposed to put there data) For now, while things are a little raw it helps being able to easily find it.
The standard location under OS X appears to be:

~/Library/Application Support/SleepyHead

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

sluzynski
Posts: 3
Joined: Tue Jun 21, 2011 9:26 pm

Re: SleepyHead Qt v0.8 alpha

Post by sluzynski » Tue Jul 05, 2011 1:15 pm

It's worth pointing out that SleepyHead builds fine against the binary distribution of the Qt SDK from Nokia (http://qt.nokia.com/downloads) - you don't need to build it from MacPorts.

_________________
MachineMaskHumidifier

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

Re: SleepyHead Qt v0.8 alpha

Post by Breathe Jimbo » Tue Jul 05, 2011 2:08 pm

sluzynski wrote:you don't need to build it from MacPorts.
That's true. However, I am not a programmer, so it was easy for me to go the MacPorts route.

_________________
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
jedimark
Posts: 1300
Joined: Fri Feb 18, 2011 12:45 am
Location: Bundaberg, Australia
Contact:

Re: SleepyHead Qt v0.8 alpha

Post by jedimark » Tue Jul 05, 2011 5:31 pm

sluzynski wrote:It's worth pointing out that SleepyHead builds fine against the binary distribution of the Qt SDK from Nokia (http://qt.nokia.com/downloads) - you don't need to build it from MacPorts.
Thanks for verifying that.. Me and MacPorts aren't real close friends after watching what torments Jimbo & Troy went through getting the old wx version running.

It's quite a few gigabytes of download for X-Code & Qt SDK.. (last I checked it's over 5GB worth of data combined)
Then again I find the idea of a mac user without a decent internet connection absurd..

To be clear : Sluzynski's described method is the correct Nokia Qt sanctioned method.. and applies to both for Mac & Windows builds.
If you've got the spare ~2GB bandwidth left after downloading Apples' massive X-code development stuff, please go the Nokia Qt SDK route.

Jimbo's method is a little more OpenSource friendly, and could likely save you some bytes, at least on the Qt front.
If you plan on building other (non Qt) open-source projects, subject yourself to MacPorts torture.. Then learn how not to use MacPorts where possible.

Both paths will get you a working build of sleepyhead.

BTW, for the benefit of other mac users, how to get Git without macports? Will X-code's gcc build the official Git source ok?
(I know little about mac development, apart from it's compilers are hideously outdated and broken)

_________________
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
Breathe Jimbo
Posts: 954
Joined: Sun Sep 12, 2010 3:02 pm
Location: Pasadena, CA

Re: SleepyHead Qt v0.8 alpha

Post by Breathe Jimbo » Tue Jul 05, 2011 6:04 pm

jedimark wrote:BTW, for the benefit of other mac users, how to get Git without macports? Will X-code's gcc build the official Git source ok?
(I know little about mac development, apart from it's compilers are hideously outdated and broken)
git is already on an OS X system, at least after downloading all the Xcode stuff.

The gcc and g++ provided along with Xcode is Apple's version of 4.2.1, which builds the SH source just fine.

_________________
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 Qt v0.8 alpha

Post by archangle » Wed Jul 06, 2011 4:14 pm

0.7 version shows "square wave" type plots for pressure.

0.8 version shows "triangle wave" type plots for pressure.

i.e. 0.7 pressure jumps instantly from one level to the other, 0.8 shows it slowly ramping from one pressure to another.

I believe that the jump is closer to what the machine actually does.

_________________
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
jedimark
Posts: 1300
Joined: Fri Feb 18, 2011 12:45 am
Location: Bundaberg, Australia
Contact:

Re: SleepyHead Qt v0.8 alpha

Post by jedimark » Wed Jul 06, 2011 9:01 pm

archangle wrote:0.7 version shows "square wave" type plots for pressure.

0.8 version shows "triangle wave" type plots for pressure.

i.e. 0.7 pressure jumps instantly from one level to the other, 0.8 shows it slowly ramping from one pressure to another.

I believe that the jump is closer to what the machine actually does.

It's actually the same graph drawn differently.. Square mode draws twice as many data points. I temporarily switched it off, thanks to ResMed being a hog and having so much data. (curse you ResMed!)

The versions of Encore I've seen show it plotted non-square. (Encore shows it all squished though.) Ramp does not show correctly in square mode, because the PRS1 doesn't actually store the in-between points.. In this case it really is a slow gradient (or possibly a logarithmic curve). In all other cases the machine jumps fairly quickly. There is no marker in the codes that I have seen to indicate ramp button has been pressed.

It's definitely going back to square later, because I think it makes more sense for everything but ramp. There will likely be an option to turn it on & off, as this is a simple change that can be done live.

I've nearly completed the ASV System One stuff, which is a lot more like ResMed stuff in terms of graphs and data. (In fact it's very similar in content)

The more machine models I have the better for finding the common ground between machines, and makes it easier to design the code display just what data's available.

_________________
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
Pugsy
Posts: 64936
Joined: Thu May 14, 2009 9:31 am
Location: Missouri, USA

Re: SleepyHead Qt v0.8 alpha

Post by Pugsy » Wed Jul 06, 2011 9:32 pm

Just got the chance to give it a try.
Looking good. No problems at all. Very well done.

_________________
Machine: AirCurve™ 10 VAuto BiLevel Machine with HumidAir™ Heated Humidifier
Additional Comments: Mask Bleep Eclipse https://bleepsleep.com/the-eclipse/
I may have to RISE but I refuse to SHINE.

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

Re: SleepyHead Qt v0.8 alpha

Post by archangle » Wed Jul 06, 2011 11:43 pm

jedimark wrote: It's actually the same graph drawn differently.. Square mode draws twice as many data points. I temporarily switched it off, thanks to ResMed being a hog and having so much data. (curse you ResMed!)
Sounds like you've got the right plans. Looking as well as I can, it appears encore shows it as a couple of "stairsteps" instead of as a triangle, but that may just be non-aliased rendering at poor resolution of a "ramp" function.

I was familiar with the way encore rendered my M-series data. That's very definitely "square wave" type plots. The auto function seems to be much quicker and done much more "rampy" in the PRS1. Interestingly enough, the actual pressure does sort of ramp on both machines. If I look at the display, it progresses like 12.0, 12.1, 12.2,...13.0. It takes probably 5 seconds or so to jump 1 cm. I guess in reality, it's more of a trapezoid wave.

_________________
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
JointPain
Posts: 261
Joined: Thu Apr 28, 2011 10:41 am
Location: Houston, TX

Re: SleepyHead Qt v0.8 alpha

Post by JointPain » Thu Jul 07, 2011 7:31 am

Hi Mark,

It compiled fine under 64 bit Gentoo Linux, although I did have to upgrade my Qt libraries from version 4.6.2 to version 4.7.2, so you might want to list Qt version 4.7 or better as a requirement.

Running it, I got lots of messages similar to the following on the console:

"2011-07-06 03:01:32"
"2011-07-06 03:01:36"
"2011-07-06 03:01:40"
Unknown Signal "Mask Pres"
Unknown Signal "Exp Press"
Unknown Signal ""
Unknown Signal ""
"2011-07-06 03:01:43"

and a
Total Events 0

at the end, which seemed strange.

Otherwise, it appears to run fine (all of a minute or two of testing - I have to rush now). Looks very nice.

_________________
Mask: Swift™ FX Nasal Pillow CPAP Mask with Headgear
Humidifier: S9™ Series H5i™ Heated Humidifier with Climate Control
Additional Comments: Pressure is 11-14. Old CPAP was a Resmed S6 Lightweight. Also have Profile lite mask. ResScan is actually version 3.14. Now I use Sleepyhead.

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

Re: SleepyHead Qt v0.8 alpha

Post by jedimark » Thu Jul 07, 2011 9:09 am

JointPain wrote:Hi Mark,

It compiled fine under 64 bit Gentoo Linux, although I did have to upgrade my Qt libraries from version 4.6.2 to version 4.7.2, so you might want to list Qt version 4.7 or better as a requirement.

Running it, I got lots of messages similar to the following on the console:
Thanks for noting the 4.7 requirement.. I tried to stick with 4.6 as a minimum, but I must of missed something and used a new call.

ResMed support is only new, so I'm expecting rough edges.. Those Unknown Signal messages are ok in Git version.. I know what they are, just not reading them yet.. (The data is read, I just need to assign a code)

Debug stuff isn't shown on currently windows. It's pretty much safe to ignore anything dumped the the console that doesn't say ERROR, especially when built from Git.. I put all sorts of silly messages and traces there.

Are your events showing in the flags, overlays & Events tab?

I'm currently redesigning the way data stuff is stored. Not a super big change, but on that should make the program even easier to work with. ASV support is coming along nicely..

Brain fog and headaches have been hammering me lately..

_________________
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
robysue
Posts: 7520
Joined: Sat Sep 18, 2010 2:30 pm
Location: Buffalo, NY
Contact:

Re: SleepyHead Qt v0.8 alpha

Post by robysue » Fri Jul 08, 2011 12:25 am

Just downloaded this version. Looks really nice, but it's no where near as robust as 07-4229 on my Eee PC netbookt for some reason. And I did rename the old SleepyApp folder the previous version was using before I started the new version.

Some annoying things:

1) Default window size is too large for the netbook's small screen and it doesn't want to resize easily. The full screen toggle works ok though.

2) I can't see the ticks for OAs (again) due to the bright, light cyan color.

3) This is the real problem: When I switch days, the graphs don't switch even though the information given under the calendar does switch to the data for the chosen date. The graphs don't load consistently either. And if I switch from "Daily" to "Welcome" and back to "Daily" the graphs don't show up at all---all I see is a leftover Welcome screen together with the sidebar with the calendar on top and the summary data on bottom. Not sure if I'm doing something wrong or if I've just hit some bugginess of some sort. I did rename the SleepyApp folder for the 07-4229 version so I don't think that's the problem. And I no longer see a SleepyApp folder in the MyDocuments folder either.

4) Clicking on a date with no data seems to crash this version on my machine for some reason. Didn't cause any problems with the 07 version.

5) The averages shown in the Details window for IPAP, EPAP, leak, and snore all seem to be 0.00 day after day after day. This was NOT true in 07-4229 by the way.

Finally, at some point I asked you if some Encore Viewer/Pro reports of my BiPAP data would be useful for you for debugging purposes since you used my data as one of the major data sets for getting the BiPAP stuff working. But I can't remember if you said it would be useful or not and I know I never sent it. So would it? If so, I'll create a bunch of Encore reports and tar & compress them and send them on to you.

I do like the new look and I really appreciate the detailed lists of events and times they occur---this looks like one of the features in Onkor that I always thought was potentially useful . That's a nice touch.

_________________
Machine: DreamStation BiPAP® Auto Machine
Mask: Swift™ FX Nasal Pillow CPAP Mask with Headgear
Additional Comments: PR System DreamStation and Humidifier. Max IPAP = 9, Min EPAP=4, Rise time setting = 3, minPS = 3, maxPS=5