• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
MagicMirror Forum
  • Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
A New Chapter for MagicMirror: The Community Takes the Lead
Read the statement by Michael Teeuw here.

Fitbit

Scheduled Pinned Locked Moved Troubleshooting
129 Posts 42 Posters 165.0k Views 37 Watching
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • O Offline
    Oliver_Tooth
    last edited by May 10, 2017, 2:33 PM

    Hi folks, i’ve installed this module and got it up and running ,but it doesn’t seem to be pulling any data. Could anyone possibly point me in the right direction on how best to fix this? Cheers.

    B 1 Reply Last reply May 10, 2017, 6:06 PM Reply Quote 0
    • B Offline
      bhepler Module Developer @Oliver_Tooth
      last edited by May 10, 2017, 6:06 PM

      @Oliver_Tooth For starters, I would open up the developer tools to see if there are any obvious errors when the module is attempting to load data from the Fitbit servers.

      If you’re using an external machine to view the web application (such as Firefox, Chrome, Edge or whatever) press the F12 button. You should see the screen divide and show you what’s going on behind the scenes. Find the console tab and click on it. Look for any error messages in red and see if that helps.

      If you’re modifying the Pi directly, add the dev switch to the start command: npm start dev. It will likewise open up the developer tools and you can see what’s going on.

      It’s a start.

      O 1 Reply Last reply May 10, 2017, 6:24 PM Reply Quote 0
      • O Offline
        Oliver_Tooth @bhepler
        last edited by May 10, 2017, 6:24 PM

        @bhepler Cheers for the pointers. I’ve looked through the dev console and I can’t see anything glaringly obvious. Weirdly however, i’ve gone onto my account section on Fitbit’s website and it doesn’t actually say that this module (app) is listed as having access to the data, despite me running through all the setup as written.

        B 1 Reply Last reply May 10, 2017, 6:27 PM Reply Quote 0
        • B Offline
          bhepler Module Developer @Oliver_Tooth
          last edited by May 10, 2017, 6:27 PM

          @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.

          O 1 Reply Last reply May 10, 2017, 6:59 PM Reply Quote 0
          • O Offline
            Oliver_Tooth @bhepler
            last edited by May 10, 2017, 6:59 PM

            @bhepler Slightly embarrassing to admit i can’t find that debug file anywhere!

            1 Reply Last reply Reply Quote 0
            • B Offline
              bhepler Module Developer
              last edited by May 10, 2017, 7:42 PM

              @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.

              O 1 Reply Last reply May 10, 2017, 8:06 PM Reply Quote 0
              • O Offline
                Oliver_Tooth @bhepler
                last edited by May 10, 2017, 8:06 PM

                @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!

                1 Reply Last reply Reply Quote 0
                • O Offline
                  Oliver_Tooth @daniel44992
                  last edited by May 14, 2017, 9:43 AM

                  @daniel44992 I too am having this exact issue. Did you ever find a solution?

                  1 Reply Last reply Reply Quote 0
                  • B Offline
                    bhepler Module Developer
                    last edited by May 15, 2017, 1:48 PM

                    @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 the credentials.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.

                    V O V 3 Replies Last reply May 15, 2017, 4:01 PM Reply Quote 1
                    • V Offline
                      Vendittelli Module Developer @bhepler
                      last edited by May 15, 2017, 4:01 PM

                      @bhepler Please, if you spot any problems with the documentation, create a pull request on GitHub and I’ll happily make those changes.

                      1 Reply Last reply Reply Quote 1
                      • 1
                      • 2
                      • 6
                      • 7
                      • 8
                      • 9
                      • 10
                      • 11
                      • 12
                      • 13
                      • 8 / 13
                      8 / 13
                      • First post
                        80/129
                        Last post
                      Enjoying MagicMirror? Please consider a donation!
                      MagicMirror created by Michael Teeuw.
                      Forum managed by Sam, technical setup by Karsten.
                      This forum is using NodeBB as its core | Contributors
                      Contact | Privacy Policy