Wednesday, 24 December 2014

Version 2.7

Version 2.7 of Morpheuz is now live on the Pebble App Store and My Pebble Faces.

Icons showing activity monitor;
ignore; smart alarm set;
recording; bluetooth and comms
and battery level

Changes:
  • Improved icons - simplified icon set, right aligned
  • Export done icon - new icon to show an export has been done
  • Last auto export date on the settings page - shows when the last auto export was run
  • Auto export timeout handling - if the service or network is unavailable then there is a clear indication this happened
  • Better auto export error handling - if the auto export errors then this is shown
  • Anonymous usage statistics using www.straphq.com
  • Minor bug in calculation routines quashed
  • Improved layout of export section of settings page

Note: To help improve Morpheuz, this version collects anonymous usage statistics once a day. This usage data is small, contains no identifying information and no sleep or movement data. It can be disabled, if you desire (bottom of settings page). Please look here for more information.

Monday, 22 December 2014

Setting up Pushover for the first time

In addition to downloading Pushover onto your iPhone or Android phone you need to do a little setting up with pushover.net

Fortunately this only needs to be done once:

Open the settings page on Morpheuz and scroll down to this bit:


Go to the Pushover Dashboard:


Initially you will need to register an application:


Here is an icon to use (rmb click to download):

Once you have created it, then it will look like this, if you click on the name from the dashboard:


Once you have entered the user and the token (both case sensitive 30 character long keys) and pressed save Morpheuz will be ready to go.

"Last result" shows what happened last time it attempted to use the Pushover user and token. If you re-enter settings, don't worry if this says 'Disabled', until the next export time.

Export happens at least 9 hours after you have reset it for bed time. If you have shut Morpheuz down then it will come alive for 5 minutes some 10 hours after you've reset.

Providing you already have a watch full of data, you can test using the resend option.

For those of you curious as to why this approach was taken, feel free to have a look at the Pushover FAQ.

Sunday, 21 December 2014

Automatic Healthkit Export & Updating Morpheuz

Version 2.6 of Morpheuz included some automatic export functions; Pushover and Automatic Healthkit export via Smartwatch Pro. Pushover is available right away, but the automatic HealthKit export needs a new version of Smartwatch Pro which needs to go through the usual Apple App Store approval process.

Keep a lookout for the new version of Smartwatch Pro, and as soon as it arrives, do a manual export then set the automatic tick box and save.

On a different topic, some people have reported trouble updating Morpheuz. Please, if you can spare the time, report this to Pebble. Other than being a little large, there is nothing special about the Morpheuz app itself.

Try this technique if you have trouble:
  1. Switch to a standard watchface
  2. Shutdown and restart your Pebble
  3. Unload Morpheuz from My Pebble
  4. Load Morpheuz again from your locker
  5. If this doesn't work, repeat but remove from your locker
The current version of Morpheuz, at the time of writing, is 2.6

Thursday, 11 December 2014

Version 2.6 is live

Somewhere in a Pebble App Store near you (or MyPebbleFaces) you will find version 2.6 of Morpheuz.

This is the fully automatic export edition. See here for details.


Sleep well.

Monday, 8 December 2014

Version 2.6 is nearly ready

So what's changed, I hear you ask?

The little stuff

  • The progress bar at the bottom of the digital (or classic) display is now a little bar chart
  • The application icon is now a cute little bed with a sleeping person
  • The smart alarm icon is a small bell instead of a huge alarm clock
  • The alarm now sounds for 30 seconds, waits a minute and repeats this pattern five times instead of the previous three
  • The export to Healthkit via Smartwatch Pro icon has moved into the much expanded export section

The big stuff part 1

Morpheuz has long lacked an automatic export system. In fact on Android it has very much lacked an export everyone can use (cut and paste CSV works for all, but the email export only works on some Android versions and manufactures).

Exporting the raw data is fine, but there is quite a lot of interpretation done by the settings/graph page, so it would be really nice to be able to see past days graphs, no?

It would also be nice if this just happened and you didn't need to do anything much to make it happen. I thought so too.

So, here is how it works:
  1. Sign up for Pushover
  2. Register Morpheuz as an application
    Here is an icon you can use:

  3. Pushover provides a user key and an api token/key
  4. Enter these into the settings page on Morpheuz and press Save
  5. Ten hours after you've pressed reset on the Morpheuz menu and gone to bed, or used Auto-Reset, Morpheuz will send all your data over a secure connection to Pushover. Don't worry if you've shut Morpheuz down, it will wake for five minutes to do the work and then gracefully shut down.
  6. When you have time, look in Pushover:



  7. Click on an entry:



  8. Click on 'Report'
  9. View the report in Safari or Chrome:



  10. Pushover will keep up to 500 of these reports
  11. The report shown in Safari will allow copying of CSV or email export, so if you want to keep this data, you don't have to try to do it when you are groggy after a night's sleep.

The big stuff part 2

In version 2.3 Morpheuz introduced a link up with Max Bäumle's Smartwatch Pro to push data into iOS 8's Healthkit.

In 2.6 we take this a stage further with automatic transfer to Healthkit.

This is how it works:
  1. Do one manual export of sleep times into Healthkit from the configuration page
  2. Doing this registers a secret token with Smartwatch Pro as well as sending across that day's sleep times
  3. Click the automatic checkbox and Save
  4. Ten hours after you've pressed reset on the Morpheuz menu and gone to bed (you've guessed the rest...) Morpheuz will send the data to the Smartwatch Pro servers using the same secret token. The only data that is sent is the secret token, the sleep time and the wake time. The data is immediately pushed, without storage on the servers to your phone, where Smartwatch Pro inserts the data into Healthkit.
  5. If Smartwatch Pro isn't running then a notification is displayed, which when actioned enters the data into Healthkit.
  6. This requires an update to Smartwatch Pro which will be in the Apple App Store in a few weeks

Friday, 21 November 2014

Version 2.5 is now on the Pebble App Store

The new version of Morpheuz is now out there.
  1. Set the Smart Alarm from your watch. The settings for the smart alarm time are now on the menu and not on the configuration/settings page on the phone.
  2. The configuration/settings page shows charts and allows export, nothing else.
  3. You can change the smart alarm times after you've reset.
  4. Changing the smart alarm times will affect the time the alarm goes off, but only if it hasn't already, and the time is still in the future.
  5. Make sure you export before changing the times or the new times will appear in the export and everything will look a little wonky.
  6. Saving the email address on the configuration page does not result in a reset. Reset is now only from the watch.
  7. The menu has been re-ordered.
  8. You can now use the smart alarm without the phone at all.
  9. Android users and iOS users now experience the same smart alarm setting (used to be drop down lists for iOS and type it yourself for Android)
  10. Clock updates less frequently when you are not moving (every five minutes) and brings itself up to date if a button is pressed or you start moving. This improves battery life.
  11. The alarm set icon has been moved up to the position occupied by the alarm sounding icon. The position now shows alarm set, alarm sounding and weekend mode. Weekend mode is indicated only by icon and not by the word Weekend across the wakeup times.
  12. The powernap countdown is in the top left corner on both analogue and digital displays. It no longer sits across the wakeup times.
  13. The ticked/unticked icons have changed on the menu.
  14. The smart alarm times (and auto reset times) now pay attention to 12/24 hour settings, although the configuration page is always 24 hour.
  15. Auto Reset. There is a new 'Auto Reset' option on the menu. When set this will reset Morpheuz at the same time tomorrow as was done tonight. It will also make Morpheuz the current app if it isn't running (i.e. it uses wakeup)
  16. Considerable optimisation of the code - mostly this helps me to add new features in the future, but it may have a marginal improvement on battery life in some cases.
Sleep well and enjoy, James

Wednesday, 5 November 2014

Version 2.4

Version 2.4 should now be live on the Pebble app store and on MyPebbleFaces
  • The alarm starts with 10 shorter vibes before escalating - some people found the alarm initially too strong. 
  • There is an optional analogue watch face. 

  • Analogue display shows; reset time, earliest wakeup time, latest wakeup time, progress, alarm active, weekend mode and powernap timer.
  • Instead of the increasingly weird button combinations to access basic functions and the 'button help page' which appeared on a single press of any button I have introduced regular Pebble style menus. This makes Morpheuz seem more familiar, allows the pressing of a button to illuminate the backlight, and provides the means to introduce more features in the future.
  • The back button still needs a long press to leave (this is to prevent accidental closure of Morpheuz in your sleep). A short press does nothing.
  • The up button cancels the alarm if it is sounding or snoozed, otherwise does nothing.
  • The down button snoozes the alarm if it is sounding, otherwise does nothing
  • The select button brings up a menu with the following options:
    1. Ignore (was a double click of select)
    2. Reset (was a long press of up)
    3. Power nap (was a long press of select)
    4. Weekend (was a long press of down)
    5. Resend (was a double press of back)
    6. Inverse (was on the phone config page and, until now, could only be changed on a reset)
    7. Analogue
    8. Quit (still available as a long press on back)
  • When the alarm is sounding then two additional menu items appear at the top of the list:
    1. Snooze Alarm (the down button will also work)
    2. Cancel Alarm (the up button will also work)
  • Menu items which are toggles have a tick or cross against them.
  • I have added the date across the top of the menu. A lot of the messages that were there to reassure that the correct button was pressed have been removed as they were overkill.
Enjoy and sleep well

Monday, 3 November 2014

Morpheuz to Apple Health link via Smartwatch Pro

Introduction

Morpheuz records sleep patterns for a day and presents these as graphs and statistics within the configuration page for the watch app inside the Pebble Smartwatch iOS (or Android) phone app.

Morpheuz only holds sleep patterns for a day. Apple Health, amongst other information, holds sleep duration patterns over many days, months and years. To this end Morpheuz provides data suitable for entering as a data point in the Sleep zone of Apple Health.

In order to automate this process a native iOS application was needed to bridge the data between Morpheuz and Apple Health.

Max Bäumle's Smartwatch Pro, an excellent and longstanding iOS app that provides Pebble integration with the following iOS features: Calendar; Reminders; Location; Twitter and Step tracking, now provides that bridge too.

How to send Morpheuz Data to Apple Health

1. Pebble App on iOS

Pick 'Settings'
2. Morpheuz Settings screen

Pick export button
3. Smartwatch Pro

Pick OK. This dialog appears every time.
4. Return to Pebble iOS app

Close Pebble App
5. Check Apple Health

FAQ

  • Q. Nothing happens when I press the Health button. A: Ensure you have Smartwatch Pro installed.
  • Q. The Health button is missing. What happened? A: Until there is a sleep start and stop time the button does not appear
  • Q. Do I have to buy Smartwatch Pro? A: Yes, if you want this integration. It is an excellent app and is worth every cent even without the Morpheuz/Health integration.

Monday, 20 October 2014

Version 2.3

Is out and about on the Pebble app store and on MyPebbleFaces.

It has the following changes:

  • The chart displays are more modern looking (strong colours, shades & no drop shadows). I hope you like these.
  • Morpheuz attempts to work out the start and end of your period of sleep - this is represented on the chart as two vertical solid orange lines. The first is set for the first 10 minute period where your movement is below the threshold set for awake. The last is set to either the actual alarm time or if the alarm didn't go off the last 10 minute period where your movement is below the threshold set for awake.
  • The start and end of the sleep period is reported in a new statistics section called 'Sleep Analysis Data Point' - this is intended for entry directly into Apple's Healthkit.
  • The trend line has been removed from the graph - it had little purpose anyway as it was always messed up by the waking time after the alarm.
  • The drop downs for minutes (iOS only) has been changed to be in 5 minute rather than 15 minute intervals - you may now choose to wake at 7:10!
  • The text boxes for hours and minutes (Android only) have been set to type number. This presents a numeric keypad on entry.
  • The email export attempts to close the morpheuz config window as leaving it open on ios8 caused the Pebble app to hang.
  • Once you have slept and got some 'Sleep Analysis Data Point' data a button will appear below (iOS only). The purpose of this button will be revealed shortly, although you can probably guess.
  • It's all been recompiled with Pebble SDK 2.6.1
  • Morpheuz now has a background process. Since Pebble only runs on background process at a time, this ensures that you are reminded that something else is running. You have the choice to suspend it (answer yes) whilst Morpheuz is running or allow it to run (answer no). If you answer no the other activity monitoring app may close down Morpheuz and prevent the alarm and full overnight charting.

Sleep well.

Friday, 3 October 2014

A Quiet Summer

After a flurry of activity taking Morpheuz from its experimental "I wonder if I can make a Pebble do this", to a fairly mature product, I have had a little bit of a break. I'm currently in the process of producing version 2.3 which will provide figures that can be manually entered into Apple's HealthKit sleep tracking. I've smartened up the configuration page with a cleaner and more colourful look. On iOS wake up times can be set to five minute rather than fifteen minute intervals. On Android hopefully a numeric keypad will appear when editing the wake up window. Sleep well

Saturday, 17 May 2014

Version 2.2

Version 2.2 of Morpheuz has been pushed to the Pebble App Store and MyPebbleFaces. It has the following features:
  1. Ignore - a double press of the select button marks the current 10 minute period as 'ignored' (this can be undone by another double press). Ignored periods appear as a vertical grey bar on the chart and are included in their own (grey) segment on the pie chart. The idea is that getting up to visit the loo, get a drink or a little nighttime tweeting doesn't get included in the sleep pattern. There is a little 'ignore' icon on the top of the watch display.
  2. The comms activity has been reduced to an absolute minimum - this results in noticeably better battery life.
  3. The are three links on the bottom of the chart page to instructions at www.morpheuz.net, and links to the facebook page and twitter profile apps via the url scheme. The facebook and twitter are text only on Android.
  4. Notice screen has been replaced - it isn't as artistic but I needed more space for internationalisation of the text (English is the most terse of the languages so room for longer text was essential). This is really preparation for the future.
  5. Animated initial screen - a little fun (I hope).
  6. Integer arithmetic throughout. This has a very significant code size change, but should also have a minor positive impact on battery life.
  7. Resend data (double press of back button). When running normally Morpheuz sends all data to the phone ready for the settings button to be pressed. It uses the ACK from the phone to decide that the transfer has been completed. Sometimes the javascript on the phone doesn't run and there are gaps in the chart. Pressing resend will re-transmit all of the data from the watch to the phone over the next minute or so.
  8. The keyboard hint page is no longer a graphic - the text is Pebble generated - again this is for internationalisation. It doesn't look much different.
  9. The app icon has changed again. Honestly this is the last time - I'm done with low res 1 bit plane images.
  10. Email address for email export is stored.
Note: iOS users may experience a delay until the release of the Pebble iOS app as this release changes the javascript (the first time since 1.7 and hopefully the last for a while).

Wednesday, 30 April 2014

Morpheuz 2.2 Teaser Video

Morpheuz 2.2 is gradually taking shape. There are lots of changes, some apparent and some that are preparation for future changes.


Whilst I finish the work and get it to the beta testers, I thought you might like this:


Sleep well.

Tuesday, 8 April 2014

Pebble App Challenge final 8

We're now onto day two with more voting and a chance to win more money. If you love Morpheuz, please vote here.





Thank you and sleep well.

Monday, 7 April 2014

Pebble App Challenge

Love Morpheuz? Love your Pebble? Vote in the #PebbleAppChallenge.

Here's how to vote





Thank you and sleep well.

Saturday, 5 April 2014

Advertising

I love the adverts the Pebble activity apps have. I thought Morpheuz, the inactivity monitor, deserved one as well. So here it is:




Sleep well.

Monday, 31 March 2014

CNET Review

Now this is something I don't get to write every day: CNET has reviewed Morpheuz. You can read the review here - http://www.cnet.com/uk/how-to/morpheuz-pebble-app-helps-track-your-sleep/

Thanks you and sleep well.

Sunday, 30 March 2014

Version 2.1 is now live

Unload Morpheuz to the locker and re-load it your watch should bring up the new version.
  • NEW Weekend mode - One button press prevents the smart alarm going off and automatically re-enables it for the next night. Ideal for those nights when you go to bed knowing you don't need to get up. Activated by a long press on the down button either before or after the long press on the reset button.
  • Further battery optimisation - calculation for smart alarm threshold was taking place outside of the smart alarm period. This was a waste.
  • Interfacing of the smart alarm actual time is now done as part of the assured delivery loop. This prevents the smart alarm actual time being lost if the watch app is shut when comms is down.
  • New menu icon - again. Not satisfied with the last one.
  • Reset does a double buzz if the smart alarm is on and a single buzz if it is off. As before a total failure gives an SOS buzz.
  • Built with latest SDK
  • Comms icon cannot be at odds with BT icon
Also, Morpheuz is in the last 16 of the Pebble Apps Challenge. I am really pleased. Thank you for voting. Please continue to do so.

Congratulations to the other competitors - your stuff is simply amazing - if you want to know how amazing have a look:

Sleep well.

Sunday, 23 March 2014

Morpheuz is now on Facebook and Twitter

Morpheuz has a Facebook page of its own - Morpheuz Sleep Monitor and a Twitter Account (@MorpheuzSleep). Like and Follow if you'd like to be kept up to date with the latest Morpheuz developments.

Kind regards and sleep well.

Wednesday, 19 March 2014

Sitting in good company

There are over 2000 apps for the Pebble. Morpheuz is loved enough to be in the top 10.


This is so encouraging for an app developer. I like to hear ideas for how Morpheuz can be made better, I'm glad to help anyone who is having trouble, but just clicking the 'love' button is great feedback.

Thank you and sleep well.

Saturday, 15 March 2014

Version 2.0

This is very small release with the following changes:
  • The main logo has been refined.
  • The icon has been changed.
  • Accelerometer failure results in an SOS buzz pattern (accompanied by the existing failure screen). This is so it is possible to tell the difference between the reset double buzz and an accelerometer failure without looking at the screen.
  • Battery life has been improved.
  • When in inverse mode the moon on the keyboard hint page no longer has a dark face.
Enjoy and sleep well.

Friday, 28 February 2014

Version 1.9

Or, "dude, where are my flashing zzz's"

I've released Morpheuz 1.9 onto the Pebble App Store and My Pebble Faces this evening. It includes the following features:

  • A progressive alarm. Instead of the 30 seconds of one vibration per second, Morpheuz starts off with a single vibe, waits, vibes again then gets progressively more frequent. It then waits for 60 seconds and repeats the cycle twice more. I'm hoping this caters for those who wanted a more gentle start, and those, like me, who needed a grenade in a steel bucket as a wake up.
  • 'Up' now cancels the alarm (like the native Pebble alarm app). Pressing during snooze will cancel the alarm.
  • 'Down' provides a 9 minute snooze. Pressed during snooze will extend the snooze period back to 9 minutes.
  • Every few seconds whilst the alarm is sounding, the backlight is lit.
  • There is now an alarm sounding indicator in the top bar. 
  • The icon next to the smart alarm times has been replaced.
  • A short press on any button shows the "button hint page". This gives the button assignments and shows the time across the top (after all, you might be pressing a button to see the time!) A short press on any button removes this page. Regardless of which page is showing the buttons will work as designated.
  • The initial splash screen is now shown for only a few seconds, rather than waiting for the next ice age.
  • The flashing zzz have been removed. They were there as an indication the accelerometer APIs were functioning. However this was neither obvious, nor battery efficient. Morpheuz now checks on the accelerometer APIs and on first failure attempts to re-start them and on second failure shows this screen:


What happens if the accelerometer API stops working.
I hope you enjoy 1.9. I would like to thank the kind people who beta tested it for me.



I have had good information, help and advice from the Developer Evangelists at Pebble,  Cherie Williams and Thomas Sarlandie, so I sent them a Morpheuz coffee mug each. Enjoy and thank you.


Saturday, 22 February 2014

A nice cup of joe

You've slept all night monitored by Morpheuz. You've been woken at the right time. What next? Well, obviously, a nice cup of joe from a Morpheuz mug!




If you are in the UK you can get these from Zazzle here. If you are in the US you can get the same thing from Zazzle here.



Sleep well.

Thursday, 20 February 2014

Most Loved Fitness App

For everyone who has loved Morpheuz, thank you - it's at number one in the fitness section of the official Pebble app store.


If you use Morpheuz and think it is worth it, please go in and click the little heart.



Revisiting the past

Morpheuz provides a simple mechanism for exporting CSV data either as an email or by allowing it to be copied to clipboard.

This data can be charted easily in most popular spreadsheets. But should you not have the time or the inclination, you can now use the Chart Viewer tab on this blog.

Take the contents of your email, or copied data, and paste it into the data box at the top of the page. Press plot and the charts will appear.

This is the beginning. With time this will become richer and more powerful.

Note: Data kept prior to the 20th February 2014 will show a deviation from that on your phone. On your phone no data is considered past the smart alarm time. This used not to be recorded in the CSV data. After the 20th February 2014 the CSV data will include the start of the smart alarm, end of the smart alarm and actual alarm times. This allows the charts plotted on this blog to match identically with those plotted on the configuration page.

Monday, 17 February 2014

Fame at last

Laptop Mag have been very kind and put Morpheuz as one of the top 10 Pebble apps.


The article is here.

I'm very grateful to them for this accolade. Thanks.

Sunday, 16 February 2014

Enhancement Requests and Bugs

I'm always interested in enhancement requests and bug reports.

If you have a bug report then please let me know the Pebble OS version, Pebble App version, iOS or Android version and phone model.

If you are already on GitHub then please consider raising issues here.

Otherwise raise a comment on this post, or on the Pebble Forum Morpheuz posting.

Saturday, 15 February 2014

Exporting Data

If you want to keep your nightly sleep data, then Morpheuz has two very handy features to support this on the configuration page.

The first is the "mail" button. This uses the HTML standard mailto: URL scheme to create and populate an email. The email is entitled with the date and the contents are rows of CSV data giving time and value.

This is not without problems. It works flawlessly on iOS when registration of the mail client is fixed by Apple. Some Android users also have no problem, but others, depending on version of Android, manufacture add ons like TouchWiz and Sense, and finally customer choice of mail client, cannot get this to work.

The second export option is a text area populated with the CSV data. This can be selected and copied to anywhere you like.

In the future I want to provide a much more comprehensive scheme for exporting, storing and viewing trends in sleep data.

After the 20th February 2014 the following lines will be added to the CSV data if smart alarm is turned on:

06:15,START
07:00,END

If the alarm sounded then the following additional line is added:
06:25,ALARM

Friday, 14 February 2014

Algorithms Used

The algorithms are very simple. Data collection is done by taking a repeated set of 25 samples at 10Hz. For each set the average is calculated for each axis. Then the maximum deviation is worked out. The highest deviation is the stored.

Over a 1 minute period the largest overall deviation is accumulated.

The figures are then stored in 10 minute wide buckets, recording the highest figure for that 10 minute period.

Effectively you get the largest movement in any ten minute period in mG.

The sleep quality is a very simple setup at present:
  • Any 10 minute period value above 1000 (ie 1G) is regarded as awake/super restless/being abducted by aliens. 
  • Similarly a figure around 120 marks the boundary between light and heavy sleep. 

The smart alarm averages across the night, and wakes you at the first point between the wake up hours where your movement exceeds average.