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.

    Need help with MMM-BMWConnect

    Scheduled Pinned Locked Moved Troubleshooting
    10 Posts 3 Posters 2.1k 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.
    • C Offline
      cenotaph
      last edited by

      I’m getting this error message upon starting MagicMirror:

      Failed to read file: Error: ENOENT: no such file or directory, open 'modules/MMM-BMWConnected/bmwtoken.json'
      Failed to read token:Couldn't find token in response
      

      I understand that the module is failing to create the token. Looking through the code, I see a reference to the “co.uk” site, as well as locale of “GB-en”. So I tried adding:

      apiBase: "www.bmw-connecteddrive.com"
      

      to config.js–still get the error. I wiped the module and pulled a fresh copy from github. I’ve validated my username/password by directly logging into the the US-based connecteddrive site.

      Anyone have a suggestion on how to fix this error?

      S 1 Reply Last reply Reply Quote 0
      • S Offline
        sdetweil @cenotaph
        last edited by

        @cenotaph said in Need help with MMM-BMWConnect:

        MMM-BMWConnected

        and u did these last two steps of install?

        cd MMM-BMWConnected
        npm install 
        

        Sam

        How to add modules

        learning how to use browser developers window for css changes

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

          Yes.

          pi@raspberrypi:~/MagicMirror/modules/MMM-BMWConnected $ npm install
          added 3 packages from 7 contributors and audited 3 packages in 2.069s
          found 0 vulnerabilities
          
          S 1 Reply Last reply Reply Quote 0
          • S Offline
            sdetweil @cenotaph
            last edited by

            @cenotaph

            edit the module lib/tokenmanager.js

            add the line marked below

            console.log("token data ="+JSON.stringify(json))   // add this line before the one following already there
             if (typeof (json.token_type) === 'undefined' || typeof (json.access_token) === 'undefined') {
                _error("Couldn't find token in response");
                return;
              }
            

            if using pm2, then stop mm, (pm2 stop 0)
            run your MM again with

            cd ~/MagicMirror
             npm start >somefile.txt
            

            then stop MM with ctrl-c
            then edit the somefile.txt
            and file the line
            “token data =”
            post the rest, its possible the api changed

            Sam

            How to add modules

            learning how to use browser developers window for css changes

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

              @sdetweil said in Need help with MMM-BMWConnect:

              console.log(“token data =”+JSON.stringify(json))

              [2020-05-09 16:47:59.840] [LOG]    token data ={"https://www.bmw-connecteddrive.com/app/default/static/external-dispatch.html?error":"access_denied"}
              

              I do have active subscriptions for Remote Services and BMW Connected+. I’m able to interact with cardata through the app on my phone (just in case there was a question as to whether or not I should be able to use the module.)

              I really appreciate your taking time to help me with this.

              S 1 Reply Last reply Reply Quote 0
              • S Offline
                sdetweil @cenotaph
                last edited by

                @cenotaph and u added your userid and password to the module config

                like this

                        config: {
                            email: "email@example.com",
                            password: "myComplexPassword"
                        }
                

                Sam

                How to add modules

                learning how to use browser developers window for css changes

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

                  Yes. And I’ve copy/pasted from config.js to the login form on the web site to make sure that there’s no typo in config.js.

                  S 2 Replies Last reply Reply Quote 0
                  • S Offline
                    sdetweil @cenotaph
                    last edited by sdetweil

                    @cenotaph where r u located? in the US someplace

                    Sam

                    How to add modules

                    learning how to use browser developers window for css changes

                    1 Reply Last reply Reply Quote 0
                    • S Offline
                      sdetweil @cenotaph
                      last edited by

                      @cenotaph yeh, I think the authorization credentials in the token manager won’t work.

                      I don’t know where that came from … but I suspect it needs to be per user, like spotify, amazon, google, u need to make an ‘app’ with permissions to connect to the data

                      Sam

                      How to add modules

                      learning how to use browser developers window for css changes

                      1 Reply Last reply Reply Quote 0
                      • P Offline
                        philmavedzenge
                        last edited by

                        I have been using this module for the past 3 or so months. Initially I had the same issue. What you need to do is to download the powershell scripts from the module’s GitHub page. Run those and see if you get any data back. I can help you if you experience any issues with this.

                        You will have to try different end points until you find the correct one for your region. I then changed the locale as described in the above posts and it’s been working since.

                        I have since changed the module a bit to add more functionality.

                        1 Reply Last reply Reply Quote 0

                        Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                        Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                        With your input, this post could be even better 💗

                        Register Login
                        • 1 / 1
                        • 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