Read the statement by Michael Teeuw here.
Fitbit
-
@Oliver_Tooth Hrm. The next step would probably be to check the NPM logs. I think they’re located at
~/MagicMirror/npm-debug.log
, or possibly in the FitBit module’s directory itself.It sure sounds like you’re not extracting data from the website.
-
@bhepler Slightly embarrassing to admit i can’t find that debug file anywhere!
-
@Oliver_Tooth Well, the Wife wants her FitBit stats on the mirror so I’m going to end up using this module at some point. I’ll try and catch up to you and we’ll debug this together.
-
@bhepler That’d be fantastic if you could! This is a 21st birthday present due in just under a weeks time, so i’m starting to panic somewhat!
-
@daniel44992 I too am having this exact issue. Did you ever find a solution?
-
@Oliver_Tooth I was able to successfully install the Fitbit module and get it to pull information from the web API. It took a little tweaking, but I did get it to work.
Problems I encountered:
- Python was not installed. I had to install it and figure out how to install “pip”.
- Fitbit doesn’t make their developer area visible off their main website. I ended up bouncing through their forums first.
- Example config file on the module GitHub page contains errors. The character after
config:
should be{
, not[
. - The secret key and appID field values need to be surrounded by single quotes, something not explained in the readme file.
Here’s the relevant portion of my config.sys file.
{ module: 'MMM-fitbit', position: 'bottom_left', config: { credentials: { client_id: '000XX0', client_secret: 'abbacadabba1234567890', }, resources: [ 'steps', 'floors', 'caloriesOut', 'distance', 'activeMinutes', 'sleep', 'heart' ], update_interval: 60 } },
When you run
npm start
the MMM-Fitbit python script will run and kick out a few lines in the console. I’m not entirely sure what it’s doing, but here’s what mine reads:Set credential request recieved. { client_id: '000XX0', client_secret: 'abbacadabba1234567890' } Initial run request recieved. Running getData.py results: [{"message":"credentials.ini exists","type":"status"},{"message":"Writing credentials to credentials.ini","type":"status"},{"message":"Writing id: 000XX0 and secret: abbacadabba1234567890","type":"status"},{"message":"Credentials write successful","type":"status"}]
When I ran the
setupAccess.py
script, it failed to modify thecredentials.ini
file. I ended up editing it manually and plugging in my application ID and my secret key. The format is simple. Spaces before & after the=
and no quotes around the ID or key. -
@bhepler Please, if you spot any problems with the documentation, create a pull request on GitHub and I’ll happily make those changes.
-
@bhepler That’s great news! I’ve managed to get mine up and working, but from what I can tell initially, it doesn’t seem to stay authorised for longer than a day, i’m currently browsing the python-fitbit forum for help on that. It’s also only showing data for steps, with all other fields showing 0. Is this something you’ve encountered?
-
@Oliver_Tooth Somewhat. I see steps, distance and calories. Sleep is zero. There’s definitely something going on here. I haven’t run it long enough to encounter the authorization problem. I’ll investigate further tonight.
@Vendittelli - I’ll do that. I should have a PR for you in a couple days. Thanks for the great module!
-
Hello, thank you for that nice addon…i finally managed to make it work (exemple code is still incorrect on github…) but there is a problem, im using an alta hr and i only have the “steps” info on display, everything else is set to 0 :/
Any idea how i can fix that ?