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

Custom data Post Web API (and also timesatamp/ notification)

ANSWERED

Hello,

I would like to write a migraine tracking app. The general idea is that I (or if this works, possibly other people) will open the app, and click a button to record a migraines on onset. It would be nice if the data were available outside of the app and be able to be notified to click a follow-up form.

 

There are two things I am wondering about if it is available and if so, if someone can direct me to the resources to do so. 

  1. Custom data post. I would love to use the Web API to post migraine data to a server. As I do not know how to code for iOS, I feel this would be the most universal option for displaying trends and results (unless there is a data visualization for custom data built in the companion app). The data would include date time and severity etc.
  2. I would love to be able to get a timestamp when the user clicks "I have a headache," and then set an alert for a bit of time later (let's say an hour) to notify them to fill out an follow-up form (on the watch preferably.

Are either of these things possible, and if so, can someone point me to some resources to figure out how to implement them?

This is for the Versa, but if it works well, I see it working for all OS 4&5 devices.

Best Answer
0 Votes
1 BEST ANSWER

Accepted Solutions

Your options are fetch() or WebSocket from companion to your server.

Peter McLennan
Gondwana Software

View best answer in original post

Best Answer
6 REPLIES 6

There isn't anything on the Fitbit side for custom data like this, but you could certainly log data to a webserver somewhere.

 

Here's a random thought.. you could use the Exercise API as a custom "Migraine" activity. The user could start/stop the session and they'll see it in their activity log. https://dev.fitbit.com/build/reference/device-api/exercise/

Best Answer

That is a wonderful idea, and something I could probably whip up quicker than a custom webserver (which is logistically a bit annoying, what with health data and server security, hence why I was hopping I could easily piggyback on the Fitbit database. I understand why this is not an option though). That could be relatively easy. I would like the ability to track interventions as well, and that may require a more robust solution. However, this is a cool idea, thanks.

Best Answer
0 Votes

Hello again,


@JonFitbit wrote:

...Here's a random thought.. you could use the Exercise API as a custom "Migraine" activity. The user could start/stop the session and they'll see it in their activity log. https://dev.fitbit.com/build/reference/device-api/exercise/


I finally got back to this project. This would have been an excellent solution; except, it seems the fitbit is no longer able to track custom exercises. It calls them aerobics. Can you add custom data to an exercise?

Best Answer
0 Votes

Hello, I am sorry to keep drudging up this old thread, but my previous solution, keeping all of the data in the companion app worked for a while, but I had a syncing problem, and then lost all of my data. So, it seems I need to sync elsewhere. It seems the custom excrecise is still broken, so now, I guess the best option is this


@JonFitbit wrote:

There isn't anything on the Fitbit side for custom data like this, but you could certainly log data to a webserver somewhere.


How would I go about this? It seems the Web api only handles fitbit data. Is it possible to post custom data to an external server (I have been learning Angular, and this seems like a good option). I am wondering what it would entail in the settings app (this is the piece that handles the data for me) to make the sync to the webserver happen.

Thank you for your help thus far.

Best Answer
0 Votes

Your options are fetch() or WebSocket from companion to your server.

Peter McLennan
Gondwana Software
Best Answer

Thank you. That helps a lot. I do not know why I was confused by that.

Best Answer
0 Votes