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

MMM-Fitbit2 Install Process

Scheduled Pinned Locked Moved Solved Troubleshooting
15 Posts 3 Posters 4.3k Views 3 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.
  • E Offline
    En-TACT @Vizulize
    last edited by Sep 14, 2023, 4:31 PM

    @Vizulize , I’m on authorization step. After I enter ./auth.sh via terminal, it prompts me for clientID and clientSecret. I can see the alpha-numeric characters I typed for clientID, but not for clientSecret. The cursor just sits there … is this intended? After I press enter, it does not open a browser.
    Also, no python/tokens-.json file was creadted. Therefore my Fitbit module is only showing “Loading”.

    My setup:

    • Raspberry Pi 3 B+ v1.2
    • USB Keyboard
    • Wireless Mouse
    • Raspbian Linux 11 (bullseye)

    Thanks!

    1 Reply Last reply Reply Quote 0
    • E Offline
      En-TACT @sdetweil
      last edited by Sep 14, 2023, 4:35 PM

      @sdetweil, should I repeat those steps again with first line sudo? Or, should I remove MMM-Fitbit module and start anew?

      Just to be thorough to repeat the steps, I would run:

      sudo npm i -g npm-check-updates
      npm init
      npm install
      ./init.sh

      S 1 Reply Last reply Sep 14, 2023, 4:56 PM Reply Quote 0
      • S Do not disturb
        sdetweil @En-TACT
        last edited by sdetweil Sep 14, 2023, 4:56 PM Sep 14, 2023, 4:56 PM

        @En-TACT The first step is done No need to fix that.

        you should not do the NPM init at all
        as it will overwrite the package.json the author provided

        The other two steps depend on Python3 and I don’t know if the system you’re using has Python3 installed properly yet. The raspberry pi does not come with python3 installed by default

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        E 1 Reply Last reply Sep 14, 2023, 5:17 PM Reply Quote 0
        • E Offline
          En-TACT @sdetweil
          last edited by Sep 14, 2023, 5:17 PM

          @sdetweil I ran the command, python --version. Returned Python 3.9.2.

          Does that suffice, or is there something I can run to check python is properly installed?

          S 1 Reply Last reply Sep 14, 2023, 6:24 PM Reply Quote 0
          • S Do not disturb
            sdetweil @En-TACT
            last edited by sdetweil Sep 14, 2023, 6:25 PM Sep 14, 2023, 6:24 PM

            @En-TACT The script runs python3 not python

            Sam

            How to add modules

            learning how to use browser developers window for css changes

            E 1 Reply Last reply Sep 14, 2023, 7:59 PM Reply Quote 0
            • E Offline
              En-TACT @sdetweil
              last edited by En-TACT Sep 14, 2023, 8:04 PM Sep 14, 2023, 7:59 PM

              @sdetweil I got a bit further than before after entering my authorization credentials … the Chrome browser eventually opened, logon Fitbit site, and selected all options. However, after I clicked accept, received this browser error message:

              500 Internal Server Error
              The server encountered an unexpected condition which prevented it from fulfilling the request.

              Traceback (most recent call last):
              File “/home/pi/.local/lib/python3.9/site-packages/cherrypy/_cprequest.py”, line 638, in respond
              self._do_respond(path_info)
              File “/home/pi/.local/lib/python3.9/site-packages/cherrypy/_cprequest.py”, line 697, in _do_respond
              response.body = self.handler()
              File “/home/pi/.local/lib/python3.9/site-packages/cherrypy/lib/encoding.py”, line 223, in call
              self.body = self.oldhandler(*args, **kwargs)
              File “/home/pi/.local/lib/python3.9/site-packages/cherrypy/_cpdispatch.py”, line 54, in call
              return self.callable(*self.args, **self.kwargs)
              File “/home/pi/MagicMirror/modules/MMM-Fitbit2/python/setup_access.py”, line 58, in index
              self.oauth.fetch_access_token(code, self.redirect_uri)
              File “/home/pi/.local/lib/python3.9/site-packages/fitbit/api.py”, line 142, in fetch_access_token
              return self.session.fetch_token(
              File “/usr/lib/python3/dist-packages/requests_oauthlib/oauth2_session.py”, line 244, in fetch_token
              self._client.parse_request_body_response(r.text, scope=self.scope)
              File “/usr/lib/python3/dist-packages/oauthlib/oauth2/rfc6749/clients/base.py”, line 421, in parse_request_body_response
              self.token = parse_token_response(body, scope=scope)
              File “/usr/lib/python3/dist-packages/oauthlib/oauth2/rfc6749/parameters.py”, line 431, in parse_token_response
              validate_token_parameters(params)
              File “/usr/lib/python3/dist-packages/oauthlib/oauth2/rfc6749/parameters.py”, line 438, in validate_token_parameters
              raise_from_error(params.get(‘error’), params)
              File “/usr/lib/python3/dist-packages/oauthlib/oauth2/rfc6749/errors.py”, line 405, in raise_from_error
              raise cls(**kwargs)
              oauthlib.oauth2.rfc6749.errors.InvalidClientError: (invalid_client)

              S V 2 Replies Last reply Sep 14, 2023, 8:01 PM Reply Quote 0
              • S Do not disturb
                sdetweil @En-TACT
                last edited by Sep 14, 2023, 8:01 PM

                @En-TACT I do not know this part of the app process. sorry… the author will have to help here

                Sam

                How to add modules

                learning how to use browser developers window for css changes

                1 Reply Last reply Reply Quote 0
                • V Offline
                  Vizulize Module Developer @En-TACT
                  last edited by Sep 14, 2023, 8:41 PM

                  @En-TACT Check that you have the correct client ID, client secret, and the redirect URI.

                  E 1 Reply Last reply Sep 16, 2023, 11:25 PM Reply Quote 0
                  • E Offline
                    En-TACT @Vizulize
                    last edited by Sep 16, 2023, 11:25 PM

                    @Vizulize this module is working on my mirror, thank you!

                    1 Reply Last reply Reply Quote 1
                    • 1
                    • 2
                    • 2 / 2
                    2 / 2
                    • First post
                      11/15
                      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