Cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

The Device APIs are accessible by applications which run on Fitbit devices only !!!

ANSWERED

I want to develop not an application (not a Fitbit appication) to read gyroscope data of a Fitbit device and based on the information that I found it is only accessible by the applications which run on Fitbit devices. So I was wondering can I somehow develop a Fitbit application and read Gyroscope data and somehow transfer the data to another device?

Best Answer
1 BEST ANSWER

Accepted Solutions

It could probably be done. I've managed to stream accelerometer data at 60Hz to an external app. You can use the message API to get data from watch to companion; it's best to use WebSocket to transfer data from companion to your app.

Beware that not all Fitbit OS devices have gyroscopes.

Peter McLennan
Gondwana Software

View best answer in original post

Best Answer
0 Votes
10 REPLIES 10

I see nothing strange that device API works only on the device. You can only get that data out by sending it to a companion web service or companion app on the mobile phone (accessible via HTTP server). However, there is a significant lag and very unlikely you'll read data in real-time. 

Best Answer

Thank you for the reply. Could you please let me know how can I send those information to a companion web service and app and read it in another app? because if I want to use companion API or Web API we again don't have access to those kind of data. 

Best Answer
0 Votes

Have you looked whether Messaging API would be any help? It seems to be created for such communication so if you can pack the data and send it to either web or companion app it may just work. I'm not saying it will 🙂 My last experience with Fitbit SDK was long time ago with Ionic and got driven away by poor API. But maybe something changed since then. I thought I have seen direct HTTP conmunication but I may have mistaken it with another brand which does that.

Best Answer
0 Votes

It could probably be done. I've managed to stream accelerometer data at 60Hz to an external app. You can use the message API to get data from watch to companion; it's best to use WebSocket to transfer data from companion to your app.

Beware that not all Fitbit OS devices have gyroscopes.

Peter McLennan
Gondwana Software
Best Answer
0 Votes

Thank you, That was very helpful. Furthermore, How can I also get the data from the watch and use it in another application? not a companion?

Best Answer
0 Votes

An app on the watch can only communicate with its companion code on the phone. However, the companion code can use fetch() or WebSocket to forward the data to a different application (or even a remote web site).

Peter McLennan
Gondwana Software
Best Answer

Thank you again for the help. Since I am new on this field I have a question that might be silly. I was wondering how can I make unisex interface for a companion so for example I send the data to the companion application and through the user interface the user can see the data and press a button or make a command to push the device application to run another function. Is that possible in companion and device app communication? 

Best Answer
0 Votes

I couldn't understand the question.

 

The companion doesn't have a user interface of its own, although it can interact with the Settings API. Maybe read up on the Settings API. The companion can respond to setting changes and/or communicate them to the watch.

Peter McLennan
Gondwana Software
Best Answer
0 Votes

OK got it. If we process the data on the companion, does it use the phone cpu or watch cpu? the reason that I was to transfer the data to the phone is to process the data and send show the results on the watch. So, I was wondering by using companion am I going to use the phone's CPU for process the data? or should I use the Web API and transfer the data from the companion to another application and process the data with that application. 

Best Answer

Phone CPU (which is more powerful, so that's probably better).

I don't think the Web API is relevant, since it doesn't handle gyroscope data.

Peter McLennan
Gondwana Software
Best Answer