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 185.3k 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.
    • F Offline
      frog @tismepaulo
      last edited by frog

      @tismepaulo Actually, I got it working by firstly not using ssh and running this directly on the display using a terminal and secondly not using sudo. Populated the tokens.ini with the results from the results of the script - and changed the access of the tokens.ini file to 666 - re-ran again the setupAccess.py and it said all was good.

      having said that - while I get the authorisation page from Fitbit, I got zero values on the MM. The fitbit account page says that I have access, but initially no data comes through… Next thing I did was running getData.py (in the python directory) I do get a good response:

      {"message": "credentials.ini exists", "type": "status"}
      {"message": "Reading from credentials.ini", "type": "status"}
      {"message": "Read of credentials.ini successful.", "type": "status"}
      {"message": "credentials.ini exists", "type": "status"}
      {"message": "Reading from credentials.ini", "type": "status"}
      {"message": "Read of credentials.ini successful.", "type": "status"}
      {"message": "tokens.ini exists", "type": "status"}
      {"message": "Reading from tokens.ini", "type": "status"}
      {"message": "Read of tokens.ini successful.", "type": "status"}
      {"message": "Making API call", "type": "status"}
      {"message": "API call okay", "type": "status"}
      {"message": "Tokens valid", "type": "status"}
      {"values": {"data": 4684, "goal": 10000}, "resource": "steps", "type": "data"}
      {"values": {"data": 0, "goal": 1}, "resource": "floors", "type": "data"}
      

      So I think it is at least reflecting accurately now what the fitbit site is showing for steps, but is incorrect for distance - still showing 0 (maybe because I’m using KM not miles?)

      1 Reply Last reply Reply Quote 0
      • R Offline
        Rmtcts
        last edited by

        I’m having a bit of trouble getting this to work with my Magic Mirror. The display is there but it has 0 in all of the categories. I have followed the steps and I get up to running setupAccess.py which takes me to a webpage where I allow access to all of the checkboxes, but it then just redirects to the magic mirror screen with 0s in all of the categories. if I run getData.py it says

        {"message": "credentials.ini exists", "type": "status"}
        {"message": "Reading from credentials.ini", "type": "status"}
        {"message": "Read of credentials.ini successful.", "type": "status"}
        {"message": "credentials.ini exists", "type": "status"}
        {"message": "Reading from credentials.ini", "type": "status"}
        {"message": "Read of credentials.ini successful.", "type": "status"}
        {"message": "tokens.ini exists", "type": "status"}
        {"message": "Reading from tokens.ini", "type": "status"}
        {"message": "Read of tokens.ini successful.", "type": "status"}
        {"message": "Making API call", "type": "status"}
        {"message": {"401": {"errors": [{"message": "Access token invalid: <your access token>. Visit https://dev.fitbit.com/docs/oauth2 for more information on the Fitbit Web API authorization process.", "errorType": "invalid_token"}], "success": false}}, "type": "error"}
        {"message": "Invalid token, reauthorise fitbit API", "type": "status"}
        

        and the tokens.ini file says:

        [Tokens]
        acc_tok = <your access token>
        ref_tok = <your refresh token>
        
        1 Reply Last reply Reply Quote 0
        • F Offline
          frog
          last edited by

          Well the token.ini file should be altered to include the correct credentials. That’s why you are getting the error. Fix that and you may get somewhat further. I manually entered the info to get mine to (partially) work.

          1 Reply Last reply Reply Quote 0
          • R Offline
            Rmtcts
            last edited by

            Where could I get the access and refresh tokens from?

            1 Reply Last reply Reply Quote 0
            • A Offline
              Azrael Masters @frog
              last edited by Azrael Masters

              @frog I’ve got the same Issue with the Image of “2016-11-25-raspbian-jessie”.
              I’m logged in on the BigScreen (not with SSH) and typing via Terminal:

              pi@raspberrypi:~/MagicMirror/modules/MMM-fitbit $ npm install python-shell
              /home/pi/MagicMirror/modules
              └── python-shell@0.4.0
              npm WARN enoent ENOENT: no such file or directory, open '/home/pi/MagicMirror/modules/package.json'
              npm WARN enoent ENOENT: no such file or directory, open '/home/pi/MagicMirror/modules/node_modules/node_helper/package.json'
              npm WARN modules No description
              npm WARN modules No repository field.
              npm WARN modules No README data
              npm WARN modules No license field.
              

              I also tried this, without success:

              pi@raspberrypi:~/MagicMirror $ npm install python-shell
              magicmirror@2.0.0 /home/pi/MagicMirror
              ├── UNMET PEER DEPENDENCY grunt@1.0.1
              └── python-shell@0.4.0
              npm WARN grunt-yamllint@0.2.0 requires a peer of grunt@~0.4.0 but none was installed.
              

              Anybody an Idea, what I need to do?

              1 Reply Last reply Reply Quote 0
              • T Offline
                tismepaulo @olliewarren411
                last edited by

                @olliewarren411 Hi, would you be able to explain what you changed in the CSS to get fitbit to display vertically please? I want to try this out.

                1 Reply Last reply Reply Quote 0
                • C Offline
                  codyli2002hk
                  last edited by

                  Hi everyone,

                  This Module so cool. Is there anyway to show more than one user?

                  bheplerB 1 Reply Last reply Reply Quote 0
                  • bheplerB Offline
                    bhepler Module Developer @codyli2002hk
                    last edited by bhepler

                    @codyli2002hk You could probably put two instances of the module up on your mirror. Just copy & paste the entire module configuration. Change the position tag, clientID & clientSecret and call it good.

                    1 Reply Last reply Reply Quote 0
                    • D Offline
                      daniel44992
                      last edited by

                      Hi, this module works and displays great except for the fact that the only field that is displaying values is steps. Flights, calories, etc. all show 0 values but have the images and progress bars. When I ran setupAccess.py, I made sure all the boxes were checked so that every field was being shared. After doubting whether I actually did this, I went to my Fitbit profile and confirmed that the data is being shared with the app.
                      As another form of double checking my Fitbit sync, I have my Fitbit profile also linked to my Alexa and when I asked Alexa, it correctly said each of the fields that are currently zeros on the mirror display.
                      Has anyone else had this issue and if so how did you fix it?

                      O 1 Reply Last reply Reply Quote 0
                      • O Offline
                        onetwankyfive @tismepaulo
                        last edited by

                        @tismepaulo same issue for me as well

                        1 Reply Last reply Reply Quote 0
                        • 1
                        • 2
                        • 3
                        • 4
                        • 5
                        • 6
                        • 12
                        • 13
                        • 4 / 13
                        • First post
                          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