Message Boards Message Boards

Get time series data from FitBit service connection?

Posted 7 years ago

Working through the basic examples in the Wolfram documentation related to the FitBit service connection. I'm able to get a proper ServiceObject from:

fitbit = ServiceConnect["Fitbit", "New"]

Running ServiceExecute for the "ActivityData" requests as shown in the example returns results as expected. However, running a similar ServiceExecute on "StepsPlot" does not return any results. I've gone through several other available requests (e.g., "SleepDate", "UserDate", "CaloriesTimeSeries", etc.) and what I'm finding is that requests that take "StartDate" and "EndDate" parameters don't seem to work for me.

I'm running Mathematica "11.2.0 for Mac OS X x86 (64-bit) (September 11, 2017)". Again, not really doing anything fancy other than copy-n-pasting the examples from the documentation and slightly adjusting date ranges to reflect "real" data for my case. BTW, leaving the exact dates from the example seems to make no difference in behavior (e.g., still getting back symbolic result).

Any ideas on what I'm doing wrong or missing here?

Below is a screen shot of my notebook for reference.

FitBit Example Failing

POSTED BY: Mac Rod
16 Replies
Posted 7 years ago

Confirmed that in the original environment where I first saw (and reported) the issue, it now works as expected. Tested several time series type data / plots and got back all expected results. Also noticed that

ServiceExecute[fitbit, "ActivityData", {"Date" -> "May 15, 2017"}]

now returns data in Dataset format, which is great "side effect" of fix.

Thanks all for a great [first] community experience. Really impressed...

POSTED BY: Mac Rod

Thanks @macrod for your kind words. Feedback is super useful for us to to keep our connections working fine and up to date, specially because they depend on systems not controlled by us.

Also, it's very important for us to know how our users use our connections so we can have a better idea of what new features to add or improve.

Please let me know if you have more questions or issues.

Hi guys. The Fitbit fix should be available now. Just Quit your kernel and do

fitbit=ServiceConnect["Fitbit"]

and use it as intended. Wolfram Language should autoupdate that connection. Please can you confirm the fix is working?

I'm still looking into the dialogs issue Marco reported.

Thanks

I can confirm that in my machine (now OSX 10.13) this resolves the Fitbit issue.

I have also checked on one computer that after I upgraded to OSX 10.13 the other ServiceConnect(s) also work now. I still have an issue with the Microsoft Translator, but that might just be me. They did systematically not work on several of my machines before, but it might be solved now.

I will try this out on more machines tomorrow and report back.

Best wishes, Marco

POSTED BY: Marco Thiel

Thanks Marco for the update.

Just to be clear...

  1. Fitbit works for you now.

  2. Dialogs work fine now.

  3. You have an issue with Microsoft Translator. Can you please elaborate? Please note that Microsoft has been migrating their old Azure DataMarket platform to a new Azure Portal and things have changed a bit on their end. They used to require two tokens to authenticate, now they just ask for the subscription key (which its creation is not super obvious). Please let me know if you need help creating this on their new Azure portal.

Dear Christian,

yes,

re 1. Fitbit works fine.

re 2. On one computer, which was updated to High Sierra, I tested the dialogs seemed to work find for all ServiceConnect services I tried. The error I reported was only under Sierra, and I had it on multiple machines with a very similar setup. I will test tomorrow whether after updating it works on all of them.

re 3. Yes, that was what I suspected. I am planning to investigate tomorrow and let you know.

Thank you very much for your help.

Best wishes,

Marco

POSTED BY: Marco Thiel

Thank you for your answer. I'm checking to escalate this to other group because it seems it's not a ServiceConnect issue. I'll keep an eye here though to be sure this gets fixed.

Dear Christian,

ok, this is weird. I just tried

URLExecute["http://exampledata.wolfram.com/authentication.php"]

and get:

enter image description here

I suppose that's not ideal. PacletInformation gives

{"Name" -> "OAuth", "Version" -> "11.1.49", "BuildNumber" -> "", 
 "Qualifier" -> "", "WolframVersion" -> "11.0+", "SystemID" -> All, 
 "Description" -> "", "Category" -> "", "Creator" -> "", 
 "Publisher" -> "", "Support" -> "", "Internal" -> False, 
 "Location" -> 
  "/Applications/Mathematica 11.2.app/Contents/AddOns/Applications/OAuth", 
 "Context" -> {"OAuthLoader`", "OAuth`"}, "Enabled" -> True, 
 "Loading" -> Automatic}

and TracePrint does not finish (status us running) but gives this output:

OAuthDialogDump`Private`MultipleKeyDialog[Factual,{Key>KEY},https://www.factual.com/contact/new#free_api_access,http://www.factual.com/tos]

Here's a screenshot:

enter image description here

Note the black bar at the right hand side. I cannot abort, but have to kill the kernel to make it stop. Then I get:

enter image description here

Also keep in mind that this is not yet confirmed by any other user. In fact, Arno says that he can connect to Twitter.

On earlier versions of Mathematica all works fine. I hope this helps.

Best wishes and thank you,

Marco

POSTED BY: Marco Thiel

Thank you for your answer. I see you are indeed using the 11.2 release build 5822637.

Regarding Fitbit, I can confirm the problem from my end and we already have a fix the will soon be pushed and you'll receive an automatic update.

What concerns me most is the issue with the dialogs. Do you mind running some lines?

First, I would like to see if this happens with other dialogs. Can you please try running:

URLExecute["http://exampledata.wolfram.com/authentication.php"]

That should return something like this:

enter image description here

If you also get $Aborted there, that would be useful evidence to track down this problem. If not, we'll keep investigating.

Now, can you please share the output of:

PacletInformation["OAuth"]

And also of this:

TracePrint[ServiceConnect["Factual"],_OAuthDialogDump`Private`MultipleKeyDialog]

Here is my info:

In[1]:= SystemInformation["Small"]

Out[1]= {"Kernel" -> {"SystemID" -> "MacOSX-x86-64", 
   "ReleaseID" -> "11.2.0.0 (5822637, 2017091101)", 
   "CreationDate" -> 
    DateObject[{2017, 9, 11, 10, 19, 17.}, "Instant", "Gregorian", 
     1.]}, "FrontEnd" -> {"OperatingSystem" -> "MacOSX", 
   "ReleaseID" -> "11.2.0.0 (5822637, 2017091001)", 
   "CreationDate" -> 
    DateObject[{2017, 9, 10, 22, 36, 40}, "Instant", "Gregorian", 
     1.]}}

My problems with FitBit exactly match those of the OP. On the other hand, I am able to connect to Twitter w/o issues and run the examples in the documentation. I haven't tried connecting to other services.

POSTED BY: Arno Bosse

Dear Christian,

thank you for looking into this. Here is the resulting output from my system:

enter image description here

Note that I am having trouble with many ServiceConnect services. Also, I have tried on several independent Macs.

Best wishes,

Marco

POSTED BY: Marco Thiel

Hi everyone. Thanks for reporting this. I'm not able to replicate this with Mathematica 11.2 release version on Linux. Can you please share your:

SystemInformation["Small"]

This is working fine for me at least:

screenshot

I'll run this on a Mac and report back

Posted 7 years ago

Thank you for confirming it was not me (this time) doing something wrong. I may downgrade for the time being since you were able to get it working with MMA 11.1.1.

POSTED BY: Mac Rod

Ups, I just noticed that GoogleCustomSearch also seems to have an issue:

enter image description here

It shows $Abort in the input fields and the upper Abort cannot be deleted so that I cannot properly connect. ServiceExcecute for Twitter throws out an error message, too, but that might be a temporary issue:

enter image description here

RunKeeper and Flickr work. Factual also shows the $Abort and I cannot authenticate.

enter image description here

Microsoft Translator does not appear to work either:

enter image description here

The console shows messages like these:

enter image description here

Can anyone reproduce these problems?

Best wishes,

Marco

POSTED BY: Marco Thiel

Dear All,

I can confirm that, too. (OSX 10.12.6), MMA 11.2.

On the same machine the request does work on MMA 11.1.1

Best wishes,

Marco

POSTED BY: Marco Thiel

I see the same thing in v11.2, also with the other available FitBit requests.

POSTED BY: Arno Bosse
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract