Using the Zeo Android API

There are a bunch of things that are not obvious from the documentation.  These are just notes on things I figured out while developing an app using their API.

To clarify terminology I’m using:

  • Short epoch – 30 seconds worth of sleep data.  The base hypnogram contains sleep stages that each represent a short epoch.
  • Long epoch – 5 minutes worth of sleep data which Zeo summarizes as one sleep stage regardless of the stages of the corresponding short epochs.  The display hypnogram contains sleep stages that each represent a long epoch.


  1. Though the base hypnogram contains a reading every 30 seconds, the headband only transmits these back to the phone every 5 minutes.  I’ve seen it transmit in smaller increments but I think this only happens upon certain events:
    1. Headband is docked/undocked
    2. Headband is on/off head
    3. Personally I’ve never seen SmartWake work, but I wouldn’t be surprised if the headband knew to transmit an update any time you move in and out of REM.  I haven’t actually seen this, but it just sounds like a reasonable possibility.
  2. The display hypnogram seems to always contain an even number of epochs.  So when there is only one long epoch of real data the display hypnogram will contain two elements, the second being a 0 for “undefined”.  When the next long epoch finishes, the second element will be updated with real data and the display hypnogram will still have two elements.
    1. This means if you want to know the most recent long epoch stage you cannot just take the last element.
  3. When a Sleep Record is “finalized” it has appeared that the undefined epochs get trimmed from the end of the display hypnogram but not the base hypnogram.  After a particular night of sleep I saw that the Sleep Record had continued to be updated long after I docked the headband (both hypnograms).  Eventually it did stop, and at that point the undefined epochs were removed from the end of the display hypnogram.  The same did not happen to the base hypnogram
  4. When a smaller increment of short epochs is transmitted as described in #1, it does not write a corresponding incomplete long epoch at that point.  The long epoch will be added to the display hypnogram when it is finished.

Drobo FS

Finally able to get my Drobo FS!  FedEx didn’t leave the little delivery notice to sign, so I had to drive 30 miles away to go pick it up or wait until they try again next week.   I’ve wanted a standalone NAS for a long time and I’ve been interested in the Drobo since a friend at work told me about the original (direct attached, not NAS) model.

Ok, I should note that I work in Tech Support for a software company.  A few of my criticisms or commiserations may be based on this.

Current Storage

Old computer with degraded RAID5 array

New computer will be only SSD... let Drobo handle the storage.

My current storage situation is that I have a 4 x 500Gb RAID5 array on the motherboard (DFI LanParty NForce 590) of a computer I built at the end of 2006.  One of those drives died and was RMA’d a few months ago.  Then the replacement died while I was waiting for my Drobo to arrive (RMA in progress).  So the array is hanging in there in a degraded state with three drives.  There is also a 1TB drive on that system and a 1Tb drive on my current system (built Jan 2010).  I’ll need to shift files around to be able to move empty drives to the Drobo.  My plan is to clear the 1Tb drive of my current system and start the Drobo with that.  Then I can move some files over to make enough space to clear another drive, etc.  I’ll need to be able to move 1.1Tb elsewhere before I can take apart the array and move those three drives into the Drobo.


Anticipation was already high as it was a new tech toy I had wanted for a long time.  The packaging sustained this feeling as I opened the outer shipping box to be greeted with the words “Welcome to the world of…”.   Lifting the flap of the inner box revealed the white on black distinctive drobo lettering.  Packaging may not be a huge deal, but it is a nice first impression.

The simple instructions underneath suggest that I 1.Install Dashboard, 2. Insert Drives, 3. Connect Cables.  One minor concern is that it says to start with at least two drives.  I”m pretty sure this is just because you need more than one to to protect against a drive failure.  The Drobo Calculator ( and a KB article ( suggest that it will function with one.

This inner box I’ve described contains the CD and the User Guide on the left and the power cord on the right.  There is a 6′ Cat 6 cable underneath the User Guide.  Removing this inner box reveals the actual device, well protected by foam.

Installing the Dashboard

I took a detour and registered my Drobo from the CD’s link.  I was surprised to see that they didn’t have Windows 7 listed on their question of which OS it would be used with.  I chose Other and typed Windows 7.  Not all that important, but those are the kind of oversights that would bother me in my job.

Then I figured I would check their support downloads to install the latest version from there.  I was surprised that it said Drobo FS users should install from the included disk and to contact support if you didn’t have it.  This is, of course, the perspective of someone who works in Support, but the latest installations should always be available on the website, even if there are no updates to what shipped.

Proceding with the install from the CD was uneventful.  Finishing the install opens the Dashboard with the flashing Drobo logo: “Ready for Connection”.  Time to get the physical device going.

It occurs to me at this point that I’ll need to shut down this computer to get my starting drive out.  With greater worry it occurs to me that the music is playing off  of this drive.  Panic subsiding, I realize I could get out my netbook and stream music from the copy I’ve made on my existing RAID array on another computer.  It’s good to have computers lying around everywhere.


Ok, got my 1Tb drive out.  It clicked into the Drobo very easily.  I wedged it in between my Wii and my roommate’s Xbox.  Clicking the Cat6 cable into the last open port in the switch in this room makes me think I should have gone with the 8 port instead of the 4.  Plugging in the power I expect it to spring to life…  Ah, power button.  Ok, now I get the full light show.  Green, blue, orange/yellow.  It does a crazy dance for a bit then settles on one green one red.  My first thought is “Hard drive Christmas!”  But less jolly is the suggestion that lights seem to be insisting I insert a second drive.  As I mentioned above, I had the impression that I could start with one, which would make my data shifting much easier.

Looking at the Drobo Dashboard, it is still blinking “Ready for Connection.”  Looking back at the picture I took of the bottom of the Drobo (hey, I’m in my chair the Drobo is allll the way over there), I match the MAC address and see that my router has assigned it an IP.

Unnecessary Tech Details and Reorganization

Since Drobo Dashboard disappointingly isn’t seeing anything (Yes, I’ve exited from the system tray and restarted it), I try navigating via IP and find that contains the zero byte file “”.   Supporting backups via TimeMachine is cool, but I’m not an Apple guy, so my joy is limited.  For kicks I try creating a new text file.  Yes, it appears that I can write to the share.  I’m just a little concerned that copying data may be risky if I’ve only got one drive and the Dashboard doesn’t recognize it yet.  Ok, I think even if I assume it is fine, the calculator suggests it reserves half of it.  So that’s like 465Gb free space there.  The other Tb drive now has about 900Gb that would need to be cleared before use…  I think this means I’ll need to delete some stuff and start some big file moves then let that go overnight.  I’ll move about half on to an external 500Gb drive and the other half on to the RAID array which will shortly after have to be moved back off.

It’s data tetris!

…Upon waking up I see Windows wants to know if I know that moving the files means they won’t be shared any more.  Damnit.  So now some more waiting as files transfer.

Dashboard and Second drive

Turned off windows firewall and now the Dashboard sees the Drobo.  Not sure why it didn’t show a warning that it blocked it.  It prompts you to set the admin password and you can enable DroboApps in the same place.

Putting in the second drive started the green yellow blinky dance and the data protection status on the Dashboard suggested it would take about 15 minutes.  I was able to read and write to the drives at this point, and a quick file copy showed 34Mb/s write, 40Mb/s read.

When it finished I started mass transferring files.  Over time the speed fell to 26Mb/s.  After enabling jumbo frames (9K), which required a restart, sustained transfer stayed at 31Mb/s.


Before restarting to enable Jumbo frames, I also installed some of the DroboApps:  You just drop the tgz in the DroboApps share.  The fact that you need to restart doesn’t seem necessary.  Maybe all it does on restart is unzip them.

I installed DroboAdmin (nicer management of apps), Apache (which I’m pleased has PHP built in), CTorrent (Command line torrent client), Dropbear SSH, and Wake on LAN.

I used Putty to SSH into the Drobo and look around.  I’m not great with nix comands, but still it’s cool to have access.  CTorrent didn’t seem to work.  I don’t know how much I’d want to use that over command line anyway, but it seemed worth trying.  Wake on LAN looks like it might be fun to add to a cronjob…  I don’t think my current computer’s bios has a setting to turn on at a certain time, so I might have the Drobo do it via WOL.


DroboCopy is a part of the Dashboard software worth mentioning.  It lets you schedule simple mirroring/copying between directories.  Some people might want a more elaborate kind of backup, but for me, this is exactly what I want and this saves me the extra bit of effort of using separate software.

Pulling Out a Drive

I was wondering if there was anything else I should add here, then I had an idea.  It was the same kind of “I wonder if it’s hot?” idea as the many times I’ve burned my hands.  The whole point of this thing is to handle drive failures, so how about I pull one out with my file transfer still going.

I pushed the release and the lights started yelling at me in orange and red.  I looked at my file transfer: it didn’t even slow down.  The Dashboard software popped up a notification letting me know that it can’t protect against failure with only one drive.

The speed dropped some when I put the drive back in, but that makes sense.  It needs to do the the green/yellow dance for a few minutes to get caught up.  Although I’m wondering if I should cancel the file transfer until if finishes… the time estimate has gone from 2 to 3 to 4 minutes.  Ok, it went to 5 minutes now, so I’m going to cancel the file transfer and let it finish.  I would have hoped it could have handled that, but it looks like you can transfer data faster than it can catch up on replication.  Still it’s not a bad idea to just let it finish before continuing to transfer data.  And this would only be a issue during sustained mass transfer while a drive is put in.

Separate Shares

I created a share specific to myself for some stuff, then left the public one for everything else.  DroboApps are also mounted as a share.  I had an issue where it tried to map a share over and over until all letters were taken.  I unmapped them manually then restarted the Dashboard and then it was fine.

Final Thoughts

I still have a lot of waiting to do as things copy over.  And I still have to play more data tetris before I can break my RAID5.  Ah, I should mention that it is pretty quiet.  It isn’t inaudible, but it is quieter than other electronics in the same room, so I’ll never hear it.

I’m sure I’ll play with apps more later, but for the most part I’m going to just enjoy having a unified file share independant from any of my computers with zero configuration redundancy.

…I meant to edit and post this a month ago.  Oh well.

Communicating with Log Files

I can only hope that somewhere out there people are paying attention to web server stats and what they mean for customer demand…
When I go to, click Big Bang Theory, click full episodes, see nothing listed, then close the window…
When I go to click full episodes and have access to great quality episodes of everything and the ads are of easily tolerable length then it becomes a permanent tab in my browser…

Surrendering the Toque

It seems the proper name for a chef’s hat is a toque.

The cycle has progressed:  I am too lazy to make food again.  Fortuanately this shift cooincided nicely with Nick moving in with me.  Nick is actually willing to spend the effort to make tasty food.

As a colaborative effort shortly after he moved in we made Chicken Tenders with Honey Mustard Sauce which turned out very yummy.

Another time when we had friends over he had marinated some meat and I tried this Lime Soy Swordfish marinade.  I’d say the lime soy was good but nothing special.  Swordfish is already so good.

But for now, I think I can pass the toque along.


So I bought myself this netbook… whee, new toy.  I’m partly typing this to get used to the smaller keyboard.  It’s a little tough but good enough for its purpose.  It is the Acer Aspire One, 2.2lbs, 8.9″ screen, 512Mb RAM, 8Gb SSD, Linux.  I would like to get more familiar with Linux, so this will give me a reason.

My Memories Are In An Obsolete Format

I’m finally getting rid of some old VHS tapes.  Some of what I still have are these old promotional tapes that Nintendo Power used to mailout to preview new games.  The archivist in me wouldn’t let me get rid of them unless I knew they were preserved somewhere on the internet.  Here are the ones I had:


Star Fox 64:

Diddy Kong Racing:

The Banjo-Kazooie one is made up of game footage narrated by Jon Lovitz.  The other two are crazy skit types. The Star Fox one also has very short previews for a bunch of other games including Goldeneye and Zelda.  There was also one from Midway of which I didn’t find a clip.  But I had no nostalgia for that one anyway.

I remember watching these enough to quote them back then.  (“That’s right, hovercraft!  This is racing like we’ve never seen before Trent.”)  N64 was the time when I was most excited about gaming, despite all the cool things that are available now, and that I can currently play them on a 130″ projector… ahh, good old days vs. modern advantages.

Raising the Bar on Sustenance

I go through phases of only eating out and phases of only making my own food.  Lately I’ve shifted back to making my own food.  Here are a few of the things I’ve been eating.

I ate this a lot until I realized that tomato-less salsa hurt my stomach.  Apparently it takes me a long time to make correlations like that.

But anyway it’s really tasty.  It consists of the items in the picture there: Caesar chicken, corn & chile salsa, habanero tortilla, and any kind of tomatoes.

This is a damn delicious sandwich my aunt made when I visited. I demanded to know how to make it, so there it is.  Oh and after the first time I made it I skipped the arugula.

Pretty much the same kind of tortilla and tomatoes I always use.  Chicken cooked with bell pepers, sliced almonds and a kind of orange cranberry sauce.  It turned out very yummy.  And the almonds made more of a difference than I would have thought.

This was delicious!  I had only had swordfish twice before in restaurants but it seemed like it’d be a cool thing to try myself.  I cooked it in butter and basil and, I think, lemon pepper.  I like throwing tomatoes in with anything, of course.  My short experience has been that swordfish is just good no matter what.  I didn’t really do any preparation to the artichoke hearts so they were decent but probably could have used at least some addition.

I admit part of the reason I added kiwi was that the plate was going to look too empty in the picture.  But man, kiwi is amazing.

The chicken is just a frozen breast from Trader Joe’s: no special prep.  And even though I was already having spinach, the pasta is spinach & basil.  I forget at the moment what the sauce is called, but it’s the cheating part of this meal.  It’s some kind of meat sauce and it is so good that other elements fade into the background.  Oh well, every meal can’t be a dance of culinary subtlety.

Scallops in butter and lemon peper.  I probably need to buy a bigger variety of ingredients.  The pasta was also specifically lemon pepper pasta.  This meal probably needed some kind of sauce to make it work, but I had nothing to fill that void.  They were ok as is, but only occasionally like scallops anyway.  Also the smell of scallops lingered after cooking…  So overall, probably not going to make them again.  More swordfish!

I love tortilla soup and this Trader Joe’s recipe has an extremely high awesomeness:difficulty ratio.