1

I need to get the current state from my SmartBand SWR12 - if I am asleep or awake.

In the example on the Sony developers site I see that I can get per-minute report of this state with the options "awake", "light" and "deep". Here is this link: https://developer.sony.com/develop/services/lifelog-api/endpoints/activities/#sleepActivityType

But when I try to test it in API Explorer I get only empty responses for the last minute (even not only the last one minute, but also the last 3, 5, 10, etc.). Is it possible? And if it is, how can I do it?

Thanks!

  • That does sound strange. Can you post the query you are trying here? So you are saying that the data skips minutes? Can you post a small set of results showing what the skip looks like? – pg316 Apr 04 '16 at 18:21
  • Well, I try anything like this in the API Explorer: https://apigateway.lifelog.sonymobile.com/v1/users/me/activities?start_time=2016-04-03T15%3A00%3A00.000Z&end_time=2016-04-03T16%3A00%3A00.000Z&type=sleep but always get empty response: { "result": [] } – Alexander Rysev Apr 04 '16 at 23:26
  • One thing to do might be checking to be sure that the account you are using to record data is the same account you are using to access data using the API Explorer. After you have confirmed that the accounts are the same can you try running this query to see if you get any sleep data at all: https://apigateway.lifelog.sonymobile.com/v1/users/me/activities?type=sleep – pg316 Apr 05 '16 at 04:48
  • Yes, the account is the same. And i see that this query shows me only periods of sleep: "light" and 'deep". No "awake" state like in the example in the documentation. So I think that if I run my query using the period when I didn't sleep I'll get empty response, no "awake", is it right? – Alexander Rysev Apr 05 '16 at 21:32
  • ok I see. The query I sent you should have given you everything that the API was tracking as far as sleep goes. Let me investigate on my side and see if I can find a better answer. – pg316 Apr 08 '16 at 16:09
  • Thanks! My main need is to get from the API my current state - awake or asleep. Tell me please the query that will give me such response. – Alexander Rysev Apr 09 '16 at 08:14
  • Hi Robert, did you investigate my question? How can I get my current state? – Alexander Rysev Apr 18 '16 at 19:48
  • Hi Alexander. I have been checking with the development team for an answer. They are looking in to the issue now and I will let you know as soon as I hear something. – pg316 Apr 18 '16 at 19:50
  • Hi Alexander. Sorry for the delay in getting back to you. It seems that there is in fact an issue retrieving awake data from the SWR12 so for now you will not be able to pull awake data using that device. Please let me know if you have more questions about this. – pg316 May 16 '16 at 20:37

0 Answers0