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-MercedesMe

    Scheduled Pinned Locked Moved Transport
    53 Posts 10 Posters 29.4k Views 9 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.
    • P Offline
      pyrophoenix @ashishtank
      last edited by

      @ashishtank Just one thing that I saw…Step 7 has your Client ID and Secret uncovered. I highly recommend to blur it if it’s still an active account :/

      A 1 Reply Last reply Reply Quote 0
      • A Offline
        ashishtank Module Developer @pyrophoenix
        last edited by

        @pyrophoenix Hi Looks like you found the issue for me :) the vehicle type right now i am checking is only Electric (default) and Diesel. I will improve the code to check for petrol as well but you can have a work around and can configure your vehicle type as 'diesel' and it will work as api is same for diesel and petrol !

        getVehicleDataUrl: function (config) {
        ......
          var vehicleStatus = 'electricvehicle';
          switch (config.vehicleType.toLowerCase()) {
            case 'diesel': <-----------------------------------------------------------------------------
              vehicleStatus = 'fuelstatus'; 
        ......
        

        About my sample client id and secret in guide they are fine as I do not have a Car :D and also that account and app are throw away account with out any real car linked to it.

        Let me know if changing the config to diesel and restarting mirror solves the issue.

        P 1 Reply Last reply Reply Quote 0
        • P Offline
          pyrophoenix @ashishtank
          last edited by

          @ashishtank Thanks for the reply!

          I have erased token and reboot it with Diesel…Still the same issue but this time it goes to the correct URL

          [08.04.2021 13:38.22.939] [LOG]   Handle OAuth request
          [08.04.2021 13:38.22.946] [LOG]   https://id.mercedes-benz.com/as/authorization.oauth2?response_type=code&client_id=c****************4a&&redirect_uri=http://localhost:8080/MMM-MercedesMe/callback&scope=mb:vehicle:mbdata:vehiclestatus offline_access&state=d*************************e
          [08.04.2021 13:38.25.124] [INFO]  Newsfeed-Fetcher: Broadcasting 66 items.
          [08.04.2021 13:38.26.049] [LOG]   Handle OAuth callback
          [08.04.2021 13:38.26.982] [LOG]   OAuth callback Success
          [08.04.2021 13:38.34.388] [LOG]   Vehicle data url https://api.mercedes-benz.com/vehicledata/v2/vehicles/W1****************9/containers/fuelstatus
          [08.04.2021 13:38.35.647] [LOG]   403 - Forbidden
          

          It is still saying error 403

          A 1 Reply Last reply Reply Quote 0
          • A Offline
            ashishtank Module Developer @pyrophoenix
            last edited by

            @pyrophoenix did you followed the step 3 correctly ? did you linked fuel status scope with app ? as shown in image below you should see
            Fuel Status BYOCAR

            12999928-2260-4d66-98d6-d9334b7d61d8-image.png

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

              Thanks! Great that YOU point it out! I cheated a bit and directly put the “fuel” on the URL as so

              https://developer.mercedes-benz.com/products/fuel_status/get_access?pm=free

              I just added it and I’ll try now.

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

                Not working…But it seems that the Bearer is not generated properly. If I try the test curl provided by the Mercedes Dev, it does work…

                A 1 Reply Last reply Reply Quote 0
                • A Offline
                  ashishtank Module Developer @pyrophoenix
                  last edited by

                  @pyrophoenix Can you delete the app in Mercedes dev portal and create new one with correct scope ? also delete tokens.json file and restart the mirror. I think it is some caching issue.

                  P 1 Reply Last reply Reply Quote 0
                  • P Offline
                    pyrophoenix @ashishtank
                    last edited by

                    @ashishtank Remove and did a brand new app on console. Removed tokens.json and reboot…Same problem

                    There is one thing that is on your step (Right from step 1) saying:

                    AUTH CALLBACK URL: http://localhost

                    Where that needs to be introduced?

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

                      Details.PNG image url)

                      A 2 Replies Last reply Reply Quote 0
                      • A Offline
                        ashishtank Module Developer @pyrophoenix
                        last edited by

                        @pyrophoenix things looks correct, http://localhost:8080/MMM_MercedesMe/callback is important other localhost urls in callback are optional. I have sent you PM what we can do next.

                        1 Reply Last reply Reply Quote 0
                        • A Offline
                          ashishtank Module Developer @pyrophoenix
                          last edited by

                          @pyrophoenix Let me know if changing the scope solves the issue. I will update the documentation accordingly.

                          P 1 Reply Last reply Reply Quote 0
                          • P Offline
                            pyrophoenix @ashishtank
                            last edited by

                            @ashishtank Hi! Unfortunatly it didn’t :/ Mercedes are looking at this matter and they will get back to me normally on Monday.

                            Thanks again for your help and I’ll keep you informed!

                            1 Reply Last reply Reply Quote 0
                            • A Offline
                              Andreas Heins
                              last edited by Andreas Heins

                              When i press “Authenticate” i only get “Handle OAuth callback” in the Log and nothing more.

                              Any Ideas?

                              Mit freundlichen Grüßen
                              Andreas

                              A 1 Reply Last reply Reply Quote 0
                              • A Offline
                                ashishtank Module Developer @Andreas Heins
                                last edited by

                                @andreas-heins Is your configuration correct ? if you have already logged in then it will not display login screen and will directly get token. Did you check if tokens.json file is created and updated after authentication ?

                                1 Reply Last reply Reply Quote 0
                                • A Offline
                                  Andreas Heins
                                  last edited by

                                  @ashishtank i checkend my configuration and now i have another error „ 400 - Invalid redirect_uri“.

                                  A 1 Reply Last reply Reply Quote 0
                                  • A Offline
                                    ashishtank Module Developer @Andreas Heins
                                    last edited by

                                    @andreas-heins looks like you are missing Step 7 from https://github.com/ashishtank/MMM-MercedesMe documentation. Please check, also which version of Magic Mirror are you using ? there are breaking changes in v2.15 in MM core and issue i have not fixed for my module yet.

                                    1 Reply Last reply Reply Quote 0
                                    • R Offline
                                      rogers0072002 @ashishtank
                                      last edited by

                                      @ashishtank hello i folow all steps and i had initial auth form
                                      i install oauth module ( explain by sdetweil in gitlab issues).
                                      My was created correctly but i receive no data.

                                      My version of MM is 2.15

                                      in mm log i found this

                                      0|MagicMirror | [28.06.2021 22:13.20.726] [ERROR]
                                      0|MagicMirror | Failed to fetch git data for MMM-homeassistant-sensors: Error: block timeout reached
                                      0|MagicMirror | [28.06.2021 22:13.21.674] [LOG]
                                      0|MagicMirror | 403 - Forbidden
                                      0|MagicMirror | [28.06.2021 22:13.21.678] [LOG]
                                      0|MagicMirror | 403 - Forbidden
                                      0|MagicMirror | [28.06.2021 22:13.21.866] [LOG]

                                      thk in advance

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

                                        @rogers0072002 sorry is not good log

                                        0|MagicMirror | Vehicle data url https://api.mercedes-benz.com/vehicledata/v2/vehicles/WDCXXXXXXXXXXXXXX/containers/fuelstatus
                                        0|MagicMirror | [28.06.2021 22:35.42.737] [LOG]
                                        0|MagicMirror | 403 - Forbidden
                                        0|MagicMirror | [28.06.2021 22:38.15.691] [LOG]
                                        0|MagicMirror | Vehicle data url https://api.mercedes-benz.com/vehicledata/v2/vehicles/WDCXXXXXXXXXXXXXX/containers/fuelstatus
                                        0|MagicMirror | [28.06.2021 22:38.16.209] [LOG]
                                        0|MagicMirror | 403 - Forbidden
                                        0|MagicMirror | [28.06.2021 22:38.21.119] [INFO]

                                        A 1 Reply Last reply Reply Quote 0
                                        • A Offline
                                          ashishtank Module Developer @rogers0072002
                                          last edited by

                                          @rogers0072002 As per logs it looks like you have not added scope or token is not valid can you delete the tokens.json file and try login again ? make sure you have linked right scope (electric or fuel) in the Mercedes app.

                                          1 Reply Last reply Reply Quote 0
                                          • M Offline
                                            matt216
                                            last edited by

                                            Hello.
                                            Lovely looking module. Having some trouble with mine. The single dial displays, but doesn’t seem to have pulled any data from Mercedes. I did not ever get an authenticate option after installing…
                                            dial.png

                                            Did pm2 restart mm and then watched pm2 logs… only thing relevant I could see was:

                                            0|mm  | [24.11.2021 13:58.46.575] [ERROR] 
                                            0|mm  | Whoops! There was an uncaught exception...
                                            0|mm  | [24.11.2021 13:58.46.583] [ERROR] 
                                            0|mm  | TypeError: Cannot read property 'toLowerCase' of undefined
                                            0|mm  |     at Class.getVehicleDataUrl (/home/pi/MagicMirror/modules/MMM-MercedesMe/node_helper.js:146:32)
                                            0|mm  |     at Class.socketNotificationReceived (/home/pi/MagicMirror/modules/MMM-MercedesMe/node_helper.js:106:25)
                                            0|mm  |     at Socket.<anonymous> (/home/pi/MagicMirror/js/node_helper.js:112:11)
                                            0|mm  |     at Socket.emit (events.js:210:5)
                                            0|mm  |     at Socket.onevent (/home/pi/MagicMirror/node_modules/socket.io/dist/socket.js:253:20)
                                            0|mm  |     at Socket.socket.onevent (/home/pi/MagicMirror/js/node_helper.js:105:13)
                                            0|mm  |     at Socket._onpacket (/home/pi/MagicMirror/node_modules/socket.io/dist/socket.js:216:22)
                                            0|mm  |     at /home/pi/MagicMirror/node_modules/socket.io/dist/client.js:205:28
                                            0|mm  |     at processTicksAndRejections (internal/process/task_queues.js:75:11)
                                            0|mm  | [24.11.2021 13:58.46.588] [ERROR] 
                                            0|mm  | MagicMirror will not quit, but it might be a good idea to check why this happened. Maybe no internet connection?
                                            0|mm  | [24.11.2021 13:58.46.593] [ERROR] 
                                            0|mm  | If you think this really is an issue, please open an issue on GitHub: https://github.com/MichMich/MagicMirror/issues
                                            
                                            

                                            I cannot see a tokens.json in the ~/MagicMirror/modules/MMM-MercedesMe folder to try that option.

                                            I have the following products enabled in developer portal:
                                            products.png

                                            Appreciate any tips, thanks.
                                            Matt

                                            A 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
                                            • 2
                                            • 3
                                            • 1 / 3
                                            • 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