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

    Scheduled Pinned Locked Moved Transport
    26 Posts 12 Posters 15.7k Views 12 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.
    • asimhsiddA Offline
      asimhsidd
      last edited by yawns

      Description

      MMM-TracCar is a new module for tracking moving objects through Traccar.org APIs over google maps. This is based on a websocket connection to the Traccar.org server over which locations of all the registered users are received upon any new event. Not only the markers are updated but also the map’s center & zoom level. Plus all online users have a green icon, rest are red. Error handling is built in too. Feel free to amend it as per your need and let me know of issues.

      Btw, there are free servers available on Traccar.org. :)

      Happy coding!
      ;)

      Screenshot

      thats how it shows

      Download

      [card:asimhsidd/MMM-TracCar]

      1 Reply Last reply Reply Quote 2
      • E Offline
        E3V3A
        last edited by

        Please add some more pics showing how this integrated with the resto f the MM modules

        "Everything I do (here) is for free – altruism is the way!"
        MMM-FlightsAbove, MMM-Tabulator, MMM-Assistant (co-maintainer)

        1 Reply Last reply Reply Quote 0
        • A Offline
          AgP42 Project Sponsor Module Developer
          last edited by AgP42

          Hello,

          I try to use this Module that seams amazing !

          For the field “gmapid”, I created an accound on Google Cloud Platform (with credit card number…), but it is not working. Could you please give more infos about the value requested by your module and the way to configure it ?
          The key I got looks like (I change some letters of course !) :
          ApybZyXX5ou0t-XZXSnj3w_J_lmtw6v5xxVV5U9

          Also it seams that now Google Map API key will not be free anymore (from mid-july), it there still a way to make this plugin work without paying Google ?

          Thanks a lot,
          AgP

          asimhsiddA 1 Reply Last reply Reply Quote 0
          • asimhsiddA Offline
            asimhsidd @AgP42
            last edited by

            @agp42 thanks for trying… as far as I know, Google changed their policy but it still provides developers with $200 worth of free monthly usage… so you may continue using it… anyhow, for the time, kindly share your log (console log)…

            1 Reply Last reply Reply Quote 0
            • A Offline
              AgP42 Project Sponsor Module Developer
              last edited by

              Yes, they said it will be free minimum 12 month, so let’s see !

              In fact with the auto-start I didn’t see the log initially…
              To have clear logs only with TracCar I keep only this module on my config.js file and here are the console logs accordingly :

              pi@raspberrypi:~/MagicMirror $ npm start
              
              > magicmirror@2.4.1 start /home/pi/MagicMirror
              > sh run-start.sh
              
              Starting MagicMirror: v2.4.1
              Loading config ...
              Loading module helpers ...
              Initializing new module helper ...
              Module helper loaded: MMM-TracCar
              All module helpers loaded.
              Starting server on port 8080 ...
              Server started ...
              Connecting socket for: MMM-TracCar
              Starting NodeHelper for MMM-TracCarmodule.
              Sockets connected & modules started ...
              Whoops! There was an uncaught exception...
              { Error: listen EADDRINUSE 0.0.0.0:8080
              at Object._errnoException (util.js:1024:11)
              at _exceptionWithHostPort (util.js:1046:20)
              at Server.setupListenHandle [as _listen2] (net.js:1351:14)
              at listenInCluster (net.js:1392:12)
              at doListen (net.js:1501:7)
              at _combinedTickCallback (internal/process/next_tick.js:141:11)
              at process._tickCallback (internal/process/next_tick.js:180:9)
              at Function.Module.runMain (module.js:685:11)
              at startup (bootstrap_node.js:196:16)
              at bootstrap_node.js:622:3
              code: 'EADDRINUSE',
              errno: 'EADDRINUSE',
              syscall: 'listen',
              address: '0.0.0.0',
              port: 8080 }
              MagicMirror will not quit, but it might be a good idea to check why this happened. Maybe no internet connection?
              If you think this really is an issue, please open an issue on GitHub: https://github.com/MichMich/MagicMirror/issues
              Launching application.
              

              The internet connection is working fine (all others modules can connect).
              But it’s true that I had to change the internet configuration of the MagicMirror in order to use Remote-Control module.

              To be sure this is not the cause of the error on your module, I re-use the inital config.js file, but still not working (but with different IP adresse on the log…) :

              pi@raspberrypi:~/MagicMirror $ npm start
              
              > magicmirror@2.4.1 start /home/pi/MagicMirror
              > sh run-start.sh
              
              Starting MagicMirror: v2.4.1
              Loading config ...
              Loading module helpers ...
              No helper found for module: alert.
              Initializing new module helper ...
              Module helper loaded: updatenotification
              No helper found for module: clock.
              Initializing new module helper ...
              Module helper loaded: MMM-TracCar
              All module helpers loaded.
              Starting server on port 8080 ...
              Server started ...
              Connecting socket for: updatenotification
              Connecting socket for: MMM-TracCar
              Starting NodeHelper for MMM-TracCarmodule.
              Sockets connected & modules started ...
              Whoops! There was an uncaught exception...
              { Error: listen EADDRINUSE 127.0.0.1:8080
              at Object._errnoException (util.js:1024:11)
              at _exceptionWithHostPort (util.js:1046:20)
              at Server.setupListenHandle [as _listen2] (net.js:1351:14)
              at listenInCluster (net.js:1392:12)
              at GetAddrInfoReqWrap.doListen [as callback] (net.js:1501:7)
              at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:97:10)
              code: 'EADDRINUSE',
              errno: 'EADDRINUSE',
              syscall: 'listen',
              address: '127.0.0.1',
              port: 8080 }
              MagicMirror will not quit, but it might be a good idea to check why this happened. Maybe no internet connection?
              If you think this really is an issue, please open an issue on GitHub: https://github.com/MichMich/MagicMirror/issues
              Launching application.
              

              And here is my module configuration :

              {
              module: 'MMM-TracCar',
              position: 'bottom_right',
              config: {
              url: "demo5.traccar.org", // Traccar Server URL (free server @ http://demo5.traccar.org )
              username: "blabla@blabla.org", // Traccar Account username (email) (btw, there is a free account option too!) :)
              pass: "passworddddd", // Traccar Account Password
              gmapid: "keyxxxxxx", // Google Apps key
              map_width: "300", // width of the map element
              map_height: "400", // height of the map element
              map_border_radius: "10", // border radius of the map element (optional)
              map_shadow_color: "POWDERBLUE", // shadow color of the border element (optional)
              }
              },
              

              Maybe the error is coming from this line ? :

              url: "demo5.traccar.org", // Traccar Server URL (free server @ http://demo5.traccar.org )
              

              But impossible to write the full URL due to the “//”…

              Also of course when I connect from my PC to the http://demo5.traccar.org with my username and password, I can see correctly the location of my phone (so the “TracCar” part is well configured)

              I hope I gave you enough infos :grinning_face_with_smiling_eyes:

              Thanks a lot !

              1 Reply Last reply Reply Quote 0
              • A Offline
                AgP42 Project Sponsor Module Developer
                last edited by

                Solved ! :flushed_face:

                Oups…

                I “just” try with the full server address, including the http://, and it perfectly run…

                So my mistake, sorry !

                1 Reply Last reply Reply Quote 0
                • asimhsiddA Offline
                  asimhsidd
                  last edited by

                  @AgP42

                  Haha… glad your solved it yourself. Please give a thumbs-up on the git page…

                  A 1 Reply Last reply Reply Quote 0
                  • A Offline
                    AgP42 Project Sponsor Module Developer @asimhsidd
                    last edited by

                    @asimhsidd done ! :slightly_smiling_face:

                    1 Reply Last reply Reply Quote 0
                    • H Offline
                      hunty1980
                      last edited by

                      Great module - thank you for sharing.

                      Is there anyway to start the Map in Satellite View as default and also adjust the default Zoom level. I want it to be a wider zoom from the current default.

                      Thanks,
                      G

                      1 Reply Last reply Reply Quote 2
                      • I Offline
                        iwaldrum
                        last edited by

                        Bump - Is there a way adjust the default zoom level. I find that it is too zoomed in most cases.

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

                          Same question here about default zoom level. any option?

                          justjim1220J Mykle1M 2 Replies Last reply Reply Quote 0
                          • justjim1220J Offline
                            justjim1220 Module Developer @maxs
                            last edited by

                            @maxs @iwaldrum you can add zoom: 75; to your custum css file
                            Or you can use your keyboard and press Ctrl > - to zoom out or ctrl >Shift > + to zoom in

                            "Life's Too Short To Dance With Ugly People"
                            Jim Hallock - 1995

                            1 Reply Last reply Reply Quote 0
                            • Mykle1M Offline
                              Mykle1 Project Sponsor Module Developer @maxs
                              last edited by

                              @maxs

                              https://forum.magicmirror.builders/topic/5619/how-to-find-and-use-key-commands-in-mm-for-absolute-beginners

                              Create a working config
                              How to add modules

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

                                @justjim1220 said in MMM-TracCar:

                                zoom: 75;

                                Sorry to tel, but that’s not what I meen. I just want to zoom out the traccar map window. I can’t find any think in the traccar.js file. I just don’t know. I’m absolute beginner.:smiling_face_with_halo:
                                @Mykle1 Thanks for sharing the link.

                                I 1 Reply Last reply Reply Quote 1
                                • I Offline
                                  iwaldrum @maxs
                                  last edited by

                                  @maxs @justjim1220 I was looking for the samething… zoom level in the map… any luck or options for this?

                                  1 Reply Last reply Reply Quote 0
                                  • J Offline
                                    JamesFargus
                                    last edited by

                                    @iwaldrum hey I know this is really old, but if you comment out the lines in the .js file:

                                    self.map.fitBounds(self.bounds);
                                    self.map.panToBounds(self.bounds);
                                    

                                    the map will not change zoom based on the object locations anymore. Hope this helps!

                                    1 Reply Last reply Reply Quote 2
                                    • B Offline
                                      bl4ck4dd3r
                                      last edited by

                                      This is a great plugin but for me it would be better if it didn’t rely on Google maps but instead used something like Leaflet

                                      I may have a go at converting the map element of MMM-TracCar myself but my js coding is primative at best

                                      :smirking_face:

                                      1 Reply Last reply Reply Quote 0
                                      • T Offline
                                        tangougou
                                        last edited by

                                        hey i want to know how to change the time to refresh the map ,the marks ont the map was static,i want it change faster.
                                        by the way ,i want to know your googlemapapi load type was synchronizing load or async loading.i was a Chinese,My English is not well ,So sorry about this . Thanks for your object.

                                        1 Reply Last reply Reply Quote 0
                                        • JerryPJ Offline
                                          JerryP
                                          last edited by

                                          Hulp gevraagd…
                                          Goodmorning,

                                          I’m Jerry from Holland.
                                          First I like to say: great module!
                                          I woul’d like to use the module on my magic mirror to track and show my Carbagrun roadtrip at Home on my mirror.

                                          View questions I would like to ask
                                          *can you use openstreetmaps?
                                          *or maybe Google satelliet
                                          *google keeps showing errors (see pictures)
                                          *Is it possible to show the track line (route of the car)
                                          *the zoom level settings in the config does not work.

                                          Please help?!?!!

                                          -![0_1605953189378_4C8EE9DD-6B4D-4719-BB34-74C7243035D2.jpeg](Uploading 4%)

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

                                            i hat also a lot of thinks I din’t like. So my solution is to run MMM-SmartWebDisplay, a internet page in your mirror and configure it to browse your traccar website. This is for me perfect working. So what you do on your traccar webpage is also possible on your mirror.

                                            JerryPJ 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
                                            • 2 / 2
                                            • 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