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

steps

I'm not sure how to add a step counter to my custom watch, I've tried everything I could with my nonexistent programming skills when I try to download a watch face off Github to use as an example it just doesn't work on my versa 3. 

 

TLDR; how do I add a step counter to the digital watch template.

Best Answer
0 Votes
9 REPLIES 9

Hi @droids  - something like this help? Steps.text = (userActivity.today.adjusted["steps"] || 0);

Don't forget to allow userActivity in your package.json

Author | ch, passion for improvement.

Best Answer
0 Votes

Riding on this question, can I use userActivity.today.adjusted["steps"] in realtime? For instance, I want to capture when the user starts/stops walking so I can save the timestamp in my app? 
Thanks in advance!

Best Answer
0 Votes

@ac_devel- it depends on the precision you want. The watch doesn't always deliver steps in real time, especially when it concerns dominant hand.

 

Instead it batches steps and then delivers them if it is considered movement during stop/start conditions. Once motion is continuous it's not so much a problem.

Author | ch, passion for improvement.

Best Answer
0 Votes

as long as it's not delayed too much, I can accept it. As long as I can catch the time stamp for start and stop. 
the other idea would be to align my app's data to the user's steps time series but having all in the same file from the app would be good.

Best Answer
0 Votes

I'd say you could do so with a start/stop button.

Read timestamp on press and then calculate the steps for this activity by storing steps at start in a variable.

Then calculate stepsAtStop - stepsAtStart.

Similar for both timestamps to calculate activity duration.

Best Answer
0 Votes

That's an interesting idea. However I want to try to catch it without the buttons since I want to capture the steps even when users wake up in the middle of the night. I can't really ask them to push a button. 

Best Answer
0 Votes

I've found that it usually kicks in after about 10 steps. That's probably close enough.

 

You'd probably want to filter the data so it doesn't include small sequences, like crossing the room.

Peter McLennan
Gondwana Software
Best Answer

I ended up using an interval that checks for the steps. It runs every minute (simulating what happens with Fitbit's steps time series). I check the difference from the previous step count to see if the user moved. 
Thank you for your help! 

Best Answer

Follow up on this: the method I am using is not right. It's too sensitive to movements that one of my users looked like they were sleep walking. lol! Also I checked out their intraday series and no steps were logged with the time my app registered their log. Small steps are okay since I want to see if they wake up at night and get out of bed however I noticed some people have <10 steps and they said they didn't stand up at all while some have null (which I cannot explain since a-b at most can be a negative number and not a null). 
The safest way I get is probably to get the intraday activity since it's post-processed by fitbit. I tried using the api with python. 

https://api.fitbit.com/1/user/{session.fitbitId}/activities/steps/date/<date>/1d/1min.json'  
but the response is missing the intraday part. Do you guys have any idea why? My python app is given the permission to access the all user info so I don't get why I don't see intraday-steps on the response.
Best Answer
0 Votes