Not possible

:seedling:

Sleep as Android

27 votes

Tagged as Integration

Created 19 December 2015 by Josh Sharp

Moved into Not possible 23 October 2016

  • Sign in to comment and vote. Sign in with Google
  • avatar
    Josh Sharp

    Their API doesn't discriminate between time in bed and time asleep, which makes the data a lot less useful, so we're leaving this closed for now.

    19 December 2015
  • avatar
    Rotem Raviv

    What do you mean time in bed and time asleep? are there any sleep trackers that distinguish between the two?

    07 March 2016
  • avatar
    Josh Sharp

    @rotemraviv I'm not sure about mobile apps as we haven't tested many, but all the device trackers like Fitbit, Jawbone UP, Misfit, Withings etc track both. The difference is that "time in bed" is just the duration from when you turn the app on, to when you turn it off again in the morning. Time asleep is the period you were actually asleep (or at least a good guess at it based on noise and movement) which is often a lot less because of the time it takes to fall asleep, any time you woke up during the night, etc. The issue here is Sleep as Android does not track time awake, so it's technically reporting in its data "you were asleep from as soon as you turned on our app to the time you turned it off again".

    07 March 2016
  • avatar
    Rotem Raviv

    @joshsharp I understand what you mean. It does tell the difference from when you are lightly sleeping as opposed to deep sleep, but it might not show that in the API. The only thing that bothers me is that there are no other apps that have an API and are good on Android Wear watches, so I am stuck with absolutely nothing to use.

    07 March 2016
  • avatar
    Josh Sharp

    @rotemraviv as far as I remember there is light sleep in the API, but that's not good enough for me ;) all the others track awake time separately to light sleep. I sympathise though, sorry there's no good solution! I think we'll try to add Google Fit sometime soon, which I believe they export to. So even though the data isn't nearly as useful, you'll have the option of using Sleep as Android via Fit when that's done :)

    08 March 2016
  • avatar
    Rotem Raviv

    Google Fit won't have the percentage of good sleep though, right?

    08 March 2016
  • avatar
    Josh Sharp

    @rotemraviv right, it won't be any better, but seeing as we're adding Google Fit in general, it does give you the option to use that data while we still avoid supporting them explicitly or having to deal with their API. Compromise :)

    08 March 2016
  • avatar
    Rotem Raviv

    Thank you!

    08 March 2016
  • avatar
    danlefeb

    Subscribing to this in case it changes. I find this interesting: "you were asleep from as soon as you turned on our app to the time you turned it off again" because this is actually one of the few apps I've found that has a countdown timer to let you actually fall asleep. I use that because I have a spouse and dogs that sleep with me in bed, so the movement tracking of "sleep" is never accurate to when I'm actually asleep. Anyway, just wanted to voice that I really hope there's something that works for this app at some point! :)

    11 April 2016
  • avatar
    Josh Sharp

    @danlefebvre2 interesting, I'm curious — if you know the tracking of your sleep based on movement is inaccurate, what do you get out of sleep tracking this way? Do you use it solely as a "time in bed" tracker so you know for how many hours you were potentially asleep?

    11 April 2016
  • avatar
    danlefeb

    @joshsharp Yeah, pretty much what you said. I don't track based on movement, because any movement-based tracking is always inaccurate. I only track the amount of time I'm asleep and not the light/deep sleep cycles. It's a best estimate, sure, but it tends to be more accurate (I think, at least) than any other method I've found of tracking sleep. For example, I don't use my FitBit to track sleep because it starts tracking as soon as I tap it. But like most people I usually don't fall asleep as soon as I hit the pillow. So I use the countdown timer to give myself 15-20 minutes to fall asleep.

    On the other side it works well, too, because Sleep as Android is my alarm. So it stops tracking when the alarm goes off. I found I'd often forget to tell my FitBit I wasn't sleeping anymore, so it'd be in sleep mode for the first few hours of my day.

    11 April 2016
  • avatar
    WordSherbert

    Sad this isn't possible, but oh well. Voted just in case it ever might become possible as I use this app every day and have done for years now.. :)

    24 April 2016
  • avatar
    Pedro Rodriguez

    Gotta be a way to get this to work.

    02 May 2016
  • avatar
    Mike Link

    @pedrorodriguez14 Bump.

    02 May 2016
  • avatar
    Josh Sharp

    If you'd like to see this added, please just vote it up — comments that are the equivalent of "I want this" just add noise and make it harder for us to keep track of and respond to actual discussion :) and unfortunately the mismatched data situation hasn't changed and is unlikely to.

    02 May 2016
  • avatar
    Mike Link

    This post is inspired by a conversation happening on the GFit card, but since it’s really about Sleep as Android, I’m posting it here.

    I guess I’m just having difficulty understanding why Sleep as Android’s (SAP) data is “bad” (or objectively worse than sleep data from any other tracker). Having now used three sleep trackers (Beddit, Withings Aura/Sensor, and SAP), I can say confidently that it is not the worst data out there. That award goes to data recorded by the Withings Aura, which records throughout the night on some days and, on others, just stops recording mid-sleep. And for the life of me I can’t figure out how to delete any of these records (I can delete them on the mobile app, but they remain on the web app as well as on Exist). The Beddit sensor worked really well (and was relatively inexpensive), but only syncs with Exist via Misfit, so excludes anyone outside of that ecosystem. So whatever sleep data I’ve synced with Exist has been from Withings and about 50% of that data is (wildly) inaccurate and, thus, imho, worse than anything from SAP.

    Also, @joshsharp, you said that SAP doesn’t differentiate between “time in bed” and “time asleep, but that may only be the case for those who use it via the stand-alone mobile app. I know that if you use SAP with a device that has a HR sensor (I use it with a Moto 360), it tracks your heart rate for “automatic awake and REM detection.” (I can attest that SAP records my awake time throughout the night, and does so more accurately/consistently than Withings had. And SAP has many more features and ways to interact with your data than the other sleep trackers I’ve used. I highly recommend it to anyone with a partnered wearable. But I digress.)

    So is the issue that SAP’s API simply doesn’t export data that reflects a distinction between in bed/asleep or that not all users are recording the same quality of data? If the former, do you think this is something we/I could lobby SAP to change/improve (I have no idea what API even stands for, much less how they work)? If the latter, is SAP’s data really any worse than Withings’ (I assume Withings Pulse users don’t have the same issues as Withings Aura/Sensor users)?

    Sorry for the long post, but sleep data is, to my mind, one of the more useful QS outputs available and I was hoping that once the GFit integration was live, SAP data would also be integrated (@joshsharp, you seemed to suggest this in a previous post).

    M

    p.s. I love Exist. Keep up the good work.

    09 July 2016
  • avatar
    Josh Sharp

    Hey @elmcityfree, thanks for the post. I totally get that you want to get sleep data into Exist, and you're frustrated that you can't. Let me try to explain.

    The main issue, as I tried to explain earlier in the thread here, is that when I was testing Sleep as Android by using the app, without a device, it seemed to track the entire period from "I'm starting to track my sleep" to "I've turned off the app" as time asleep. We track this as time in bed, with time asleep as a separate number, and to my mind there's a big difference — being in bed is not necessarily being asleep. (As a side note, I wasn't aware it integrated with any devices — can the Moto 360 do sleep tracking on its own, directly into Google Fit, or is this specifically a SaA integration with Google Wear?) Anyway, the point is we made a judgement call that because all we could tell the user was a time in bed period, not how long they'd actually *slept*, the data was not good enough. It's inconsistent with the data we get from every other integrated service. And having looked at the [API docs again](http://sleep.urbandroid.org/do..., the types of events it tracks do not include "awake during sleep" so it seems if it can track your awakenings via your watch, Mike, it can't tell us about them :( So possibly, part of the issue is that the API doesn't return the entire data it has access to. I could be wrong, but that's how it looks to me. (Someone else mentioned, I think, that we could use the "light sleep" it reports as "time awake" but light sleep is light sleep, not being awake. That's not going to fly.)

    It's funny that you mention Withings because we've had a bunch of users with issues with its data as well. If I had my time again, I'd only integrate Withings for weight and heartrate, excluding the activity tracker data, because it just isn't very good! But now we have it, we're stuck with it. We're forced to maintain it because it would upset users to take away a source of data, even a bad one. Having been in that situation once already, I'm loath to integrate another service that doesn't seem up to scratch. By doing so we're implicitly telling users, "this service is good, we endorse it, you can use it without worry". But I don't want to endorse dodgy data that will bring us issues from users who want to know about their time asleep, and don't understand why Sleep as Android can't provide that like every other sleep integration. You know that phrase "Garbage In, Garbage Out"? Bad data leads to more bad data — in this case bad averages, bad insights and correlations, etc etc. I kinda feel like I'm the Knight of Good Data, sworn to defend Exist's lands and people from the evil Incorrect Numbers... I take my duties seriously.

    Here's what I propose. (I'll cross-post this to the Google Fit card for those following along there as well.) Google Fit integration is going to land this coming week as it's ready to go, sans sleep. Once you and others who also use it for sleep tracking have it connected, with your permission I'll use your real sleep data as a test to see what SaA's data looks like once it's been sent to Google Fit. If it seems to work, and we can reliably track bedtime, wake time, and a duration of time actually spent asleep, I'll go back and add sleep tracking via Google Fit too. That's totally fine with me, I'll be stoked to get the data in there if it works. If we can't get all that we're after, I'll update Trello with the specifics and we'll decide if getting some data is better than no data. How does that sound?

    10 July 2016
  • avatar
    Mike Link

    @joshsharp, thanks a lot; that sounds great!

    re: Moto 360, no I don't think it does sleep tracking on its own; SAA uses its heart monitor and accelerometer as I understand it.

    p.s. in have no idea why I was abbreviating that as SAP; I meant SAA. (>_<)

    10 July 2016
  • avatar
    Matthew Kelch

    @joshsharp I admittedly haven't actually tested the SAA API, but this doesn't jive with my understanding of the data I've seen in my SAA backups (Google Drive).

    Every sleep record has to and from timestamps that is equivalent to the 'time in bed' that you are looking for. The API docs you linked may also be out of date/incomplete. I noticed that I have an 'AWAKE_START' event that would provide the other piece of data you are looking for. Generally speaking I've found the data I get from SAA to be the most consistent and reliable -- it's using a lot more sensors as inputs than your standard sleep tracker.

    Please let me know if there is anything I can do to help out on this integration.

    30 July 2016
  • avatar
    Josh Sharp

    @matthewkelch Yes, Sleep as Android tracks time in bed. It has start and end times. The issue is that it does not discriminate between "time in bed", ie. from hitting start at bedtime until hitting stop in the morning, and "time asleep", ie. the time you actually spent sleeping, which should always be less than time in bed. It doesn't seem to account for awakenings via the API, either as a quantity or as a period, and has no value that corresponds to "awake time", only different types of sleep. Basically all it's good for is tracking "I was in bed from this time until this time". If they do record periods of being awake, then they need to update their API to reflect that! It may be recent because when I tested this to work on the integration I couldn't see this, only "light sleep" when I was actually awake. Not good enough.

    If you'd like to see this happen, you're more than welcome to talk to Urbandroid and write a Sleep as Android integration for Exist — I'm happy to give you help with our API, etc as needed.

    03 August 2016
  • avatar
    Matthew Kelch

    @joshsharp Thanks for the reply, I'll reach out to you via email.

    23 August 2016
  • avatar
    Jiří Richter

    @joshsharp Hi, Urbandroid team here. I was approached by one of Exist.io users and made aware of this Trello board.
    I have added the needed information in our API documentation page. Especially the awake event labels (there are two kinds of them - awake events detected by an awake detection algorithm and awake events triggered by user action).

    See the docs here: http://sleep.urbandroid.org/documenta...

    19 September 2016
  • avatar
    Josh Sharp

    @jiirichter thanks for updating your docs. I'll take a look and reevaluate if we will decide to integrate Sleep as Android.

    19 September 2016
  • avatar
    Alexander Lindemann

    Hi, any changes in plans for this integration?

    22 September 2016
  • avatar
    Josh Sharp

    @alexanderlindemann2 not at this stage.

    23 September 2016
  • avatar
    Jiří Richter

    Hi Josh - Jiri from Urbandroid again. Did anything change?
    We are interested in integration with Exist.io.
    Is there anything we can change in our API to be compatible with Exist? I see that you have put this integration into "Not possible" bin -- why is that?
    Many thanks
    Jiri
    Urbandroid Team - Sleep as Android

    06 April