six40winks

picture of me sleeping with zeo and fitbit sensors

Day 28/29 – Zeo Mobile Programming

| 8 Comments

Warning!  Geek post! If you’re not interested in the tech side of measuring sleep, just scroll to the bottom for todays sleep graphs.

It’s been very frustrating to find out that the very tool I bought to track my whole experiment didn’t have the option to track naps.  Instead it records naps and core sleep  but then “forgets” all the naps.  In particular the nap information stays on the phone but when all sleep episodes are uploaded to the myzeo site only the longest sleep in 24h is saved.

picture of me sleeping with zeo and fitbit sensors

sleeping with zeo and fitbit to track movement and brainwaves

So if I do Everyman today with 3h30 (core sleep) – 22m (nap) – 29mn (nap) -25mn (nap), synchronise with the mysleep.myzeo site, and look at the statistics online, it will only display the 3h30 sleep.  There’s an option to download the data as a CSV file, but when you look inside only the 3h30 episode appears.

Obviously this is pretty annoying, as the whole point of using ZEO-mobile to track polyphasic sleep is to study the structure of the naps.  To the company’s credit the bedside version allows one to track the naps after some tweaking (update the firmware, install some software, reset the SD card).  There’s even the option to access the raw data but it requires some hacking (update firmware, rewire serial cable, and use the ZeoRawData Library with a bunch of dependencies).  However the product I have (and I suspect a lot of people too) is the cheaper more convenient version:  The Zeo Mobile, with no serial cable, SD card or RawData Library.

The company does have a good track record of respecting privacy and being open (sharing code and specifications) … even if they are sometimes slow to reply on the forums or add features.  So I thought I’d try to hack the mobile to access and process my own data.  Here is the process I followed in my 1st attempt:

(1) Browse the Zeo forums. Aha! a Mobile API!

(2)  Go to Github’s Open Zeo – Android Mobile data API, scan the README.rst diagonally.  Hum … not sure what he’s talking about.  Maybe this German at schlafhacking.de?  What? 4C:98:EF:00:1E:E5       clock offset: 0x026f    class: 0×080700 and then some 00000000-deca-fade-deca-deafdecacaff …. What the heck is he talking about?  Ok, back to Github. Let’s look at the demos.  Hum … I’ve never seen this kind projects full of …  .xml, .ant, .cfg, .properties.   All right, all right … I give up:  I will read the README file!

(3) It seems I have to create an Andoid App of my own which piggybacks on the libraries from Zeo.  That’s a whole new and different kettle of fish!  I’ve never made an android app or programmed in Java for that matter. So on to the Android Developer Docs.

(4) WHAT?  I have to use the Eclipse IDE instead of my beloved Emacs.  Let’s ask stackoverflow, google code, Ubuntu Forums.  They recommend ECB. What is ECB? OK.  Well, it seems developing Android apps without Elipse is pretty painful.  Even “Hello World” is plagued with Elipse dependencies.

It’s 5am … my eyes are getting tired.  Let’s shave, wash my face and come back.

Ok.  One nap later, after installing and testing Elipse a little I decided to step back.  It’s 7:30am.  I’ll contact the developer on GitHub and ask for advice before diving into a new Android App.

12h and one nap later  …  he sent a very prompt and friendly reply. It is possible.  A tutorial to install the Android SDK and JDK will be left for another post.  Below is the sleeping data for today and yesterday:


 

(2012/04/04, (3:15,7, “well awake, working”), (4:50,7,”aware, email, code”), (5:45,6,”a little drowsy”), (5:56, 6.5,”eat, move, back”), (7:08, 6, “yawn”), (7:11,5,”bedtime”), (7:45,5,”temptation to snooze”),(7:50,7.5,”well rested, nice REM”))
High energy levels all day.  2nd nap at 13h, 3rd nap at 19h … tired after 22h30.  Probably doing so well because the day before I did around 6h of sleep.

sleeping data from zeo in an everyman sleep schedule with 3 naps

sleeping data in everyman sleep schedule for April 4th 2012

(2012/04/05, (3:35,4, “eyes more irritated than yesterday”), (4:25,4.5,”very tired, sandy eyes”), (5:10,5,”more sleepy than normal. hard to keep eyes open”), (5:15,4,”nod off”), (5:25,5), (5:30,6,”standing in kitchen to stay awake”),(6:00,6.5),(7:30,6.5),(8:00,6),(9:00,7),(12:00,7.5),(19:30,7.5),(20:30,7),(21:00,6),(22:00,5),(22:30,4))  Clearly not adapted.  Unfortunately this week I need to work from the sofa (visitors in the house) .  To avoid falling asleep I had to abandon the sofa and sit at our uncomfortable kitchen chairs.  Later in the day, with the excitement of reading and organizing a trip I forgot about the 17h or18h nap only to realize at 19h. By that time I had agreed with our family guests to go out for dinner  so I had to skip that nap. This made me extremely tired after 22h.

sleeping phases measured with zeo with REM, light, deep, sleep

sleeping phases for April 5th 2012

 

8 Comments

  1. Pingback: Everyman3 / Day 7 – Back on track | Uberman Experiment

Leave a Reply