MagicMirror Forum

    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • Donate
    • Discord
    1. Home
    2. knubbl
    K
    • Profile
    • Following 0
    • Followers 0
    • Topics 7
    • Posts 22
    • Best 1
    • Controversial 0
    • Groups 0

    knubbl

    @knubbl

    1
    Reputation
    978
    Profile views
    22
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    knubbl Unfollow Follow

    Best posts made by knubbl

    • RE: MMM-GoogleMapsTraffic

      n,o not in the config.
      u need to edit the js file (MMM-GoogleMapsTraffic.js)

      if u want just replace ur js with the code i use

      /* global Module */
      
      /* Magic Mirror
       * Module: MMM-GoogleMapsTraffic
       *
       * By Victor Mora
       * MIT Licensed.
       */
      
      Module.register("MMM-GoogleMapsTraffic", {
      	// Module config defaults
      	defaults : {
      		lat: '',
      		lng: '',
      		height: '300px',
      		width: '300px',
      		zoom: 10,
                      mapTypeId: 'roadmap',
      		disableDefaultUI: true
      	},
      
      	getDom: function() {
              var lat = this.config.lat;
              var lng = this.config.lng;
      
      	var wrapper = document.createElement("div");
              wrapper.setAttribute("id", "map");
      
              wrapper.style.height = this.config.height;
              wrapper.style.width = this.config.width;
      
              var script = document.createElement("script");
              script.type = "text/javascript";
              script.src = "https://maps.googleapis.com/maps/api/js?key=" + this.config.key;
              document.body.appendChild(script);
      
      	var self = this;
              script.onload = function () {
                  var map = new google.maps.Map(document.getElementById("map"), {
                  	zoom: self.config.zoom,
                      mapTypeId: self.config.mapTypeId,
                  	center: {
                  		lat: self.config.lat,
                  		lng: self.config.lng
                  	},
      			//disableDefaultUI: self.config.disableDefaultUI
      			disableDefaultUI: true,
      			styles: [
      			{elementType: 'geometry', stylers: [{color: '#242f3e'}]},
      			{elementType: 'labels.text.stroke', stylers: [{color: '#242f3e'}]},
      			{elementType: 'labels.text.fill', stylers: [{color: '#746855'}]},
      			{
      			    featureType: 'administrative.locality',
      			    elementType: 'labels.text.fill',
      			    stylers: [{color: '#d59563'}]
      			},
      			{
      				featureType: 'poi',
      				elementType: 'labels.text.fill',
      				stylers: [{color: '#d59563'}]
      			},
      			{
      				featureType: 'poi.park',
      			        elementType: 'geometry',
      			        stylers: [{color: '#263c3f'}]
      			},
      			{
      				featureType: 'poi.park',
      				elementType: 'labels.text.fill',
      				stylers: [{color: '#6b9a76'}]
      			},
      			{
      				featureType: 'road',
      				elementType: 'geometry',
      				stylers: [{color: '#38414e'}]
      			},
      			{
      				featureType: 'road',
      				elementType: 'geometry.stroke',
      					  stylers: [{color: '#212a37'}]
      			},
      			{
      				featureType: 'road',
      				elementType: 'labels.text.fill',
      					  stylers: [{color: '#9ca5b3'}]
      			},
      			{
      				featureType: 'road.highway',
      				elementType: 'geometry',
      				stylers: [{color: '#746855'}]
      			},
      			{
      				featureType: 'road.highway',
      				elementType: 'geometry.stroke',
      				stylers: [{color: '#1f2835'}]
      			},
      			{
      				featureType: 'road.highway',
      				elementType: 'labels.text.fill',
      				stylers: [{color: '#f3d19c'}]
      			},
      			{
      				featureType: 'transit',
      				elementType: 'geometry',
      				stylers: [{color: '#2f3948'}]
      			},
      			{
      			        featureType: 'transit.station',
      				elementType: 'labels.text.fill',
      				stylers: [{color: '#d59563'}]
      			},
      			{
      			        featureType: 'water',
      			        elementType: 'geometry',
      				stylers: [{color: '#17263c'}]
      			},
      			{
      				featureType: 'water',
      				elementType: 'labels.text.fill',
      				stylers: [{color: '#515c6d'}]
      			},
      			{
      				featureType: 'water',
      				elementType: 'labels.text.stroke',
      				stylers: [{color: '#17263c'}]
      			}
      		]
                  });
      
                  var trafficLayer = new google.maps.TrafficLayer();
                  trafficLayer.setMap(map);
              };
      
      		return wrapper;
      	}
      
      });
      
      
      posted in Transport
      K
      knubbl

    Latest posts made by knubbl

    • Boot into CLI

      Hi,

      my raspbian installation always boot into CLI although i set up to boot into Dektop with defaul user “pi”. I Think this is more or less a raspbian “problem” and not MagicMirror . I Had this twice now , frist time i complete reinstalled everythin and after a few reboot this occurs again. Im not quite sure if it happens after installing xscreensaver.
      If i give startx command on command line dektop starts.

      maybe anyone give me a hint what i can check on my system to find the reason for the boot behaviour

      posted in Troubleshooting
      K
      knubbl
    • Starting MM ask for git user

      After updating to V 2.13 and restartin MM on startup im asked of git user and password.

      Dont know if its a thing happens after the update but the application is not startin as long as i dont insert the data.

      Anyone can tell me what is causing the promt for input this data?

      posted in Troubleshooting
      K
      knubbl
    • MM crashes without any error message

      HI,
      my MagicMirror crashes at startup without any error message.
      I can see all modules loading on the console then the screen turns black but there is noUI instead i get back to console.

      I already tried to take anoterh config.js but same behaviour.

      Is there any debug file where i might find some hints.

      posted in Troubleshooting
      K
      knubbl
    • RE: MMM-Calendar - Problem with all-day Events

      I already read that. But im quite sure that not solves my problem. The guy at that topic shows his date relative. i want to get a entry whoch is defined as all day event from e-g 01.01.2018 to 03.01.2018 not shown as end on 04.01.2018. If i set showEnd: false i only get the starting date.

      posted in Troubleshooting
      K
      knubbl
    • MMM-Calendar - Problem with all-day Events

      HI,
      after updating MM ti v2.5 i was happy to see calendar modules shows start and end time of an event.
      But ive got an issue with all-day events which are shown like this:
      e.g i have an event on 11th october its shown as 11th.oct-12th.oct.
      same when i have an event from e,g, 11th till 13thoct. its shown 11th.oct - 14.Oct.

      any idea how ro fix this?

      posted in Troubleshooting
      K
      knubbl
    • RE: Issue with White list IP(s) not working :(

      where did u disable it?

      posted in Troubleshooting
      K
      knubbl
    • RE: Electron CPU usage

      Bad issue with electron. When i downgrade to 1.4.15 the default calender module does not work

      ok…calendar works fine

      posted in Troubleshooting
      K
      knubbl
    • RE: MMM-GoogleMapsTraffic

      @cruunnerr

      try mmm-scheduler . this is a modul which gives u the opportunity to schedule all modules to show and hide to a spedific time.

      nice if u have not enough space on ur screen and want to switch between modules by time

      posted in Transport
      K
      knubbl
    • RE: MMM-GoogleMapsTraffic

      n,o not in the config.
      u need to edit the js file (MMM-GoogleMapsTraffic.js)

      if u want just replace ur js with the code i use

      /* global Module */
      
      /* Magic Mirror
       * Module: MMM-GoogleMapsTraffic
       *
       * By Victor Mora
       * MIT Licensed.
       */
      
      Module.register("MMM-GoogleMapsTraffic", {
      	// Module config defaults
      	defaults : {
      		lat: '',
      		lng: '',
      		height: '300px',
      		width: '300px',
      		zoom: 10,
                      mapTypeId: 'roadmap',
      		disableDefaultUI: true
      	},
      
      	getDom: function() {
              var lat = this.config.lat;
              var lng = this.config.lng;
      
      	var wrapper = document.createElement("div");
              wrapper.setAttribute("id", "map");
      
              wrapper.style.height = this.config.height;
              wrapper.style.width = this.config.width;
      
              var script = document.createElement("script");
              script.type = "text/javascript";
              script.src = "https://maps.googleapis.com/maps/api/js?key=" + this.config.key;
              document.body.appendChild(script);
      
      	var self = this;
              script.onload = function () {
                  var map = new google.maps.Map(document.getElementById("map"), {
                  	zoom: self.config.zoom,
                      mapTypeId: self.config.mapTypeId,
                  	center: {
                  		lat: self.config.lat,
                  		lng: self.config.lng
                  	},
      			//disableDefaultUI: self.config.disableDefaultUI
      			disableDefaultUI: true,
      			styles: [
      			{elementType: 'geometry', stylers: [{color: '#242f3e'}]},
      			{elementType: 'labels.text.stroke', stylers: [{color: '#242f3e'}]},
      			{elementType: 'labels.text.fill', stylers: [{color: '#746855'}]},
      			{
      			    featureType: 'administrative.locality',
      			    elementType: 'labels.text.fill',
      			    stylers: [{color: '#d59563'}]
      			},
      			{
      				featureType: 'poi',
      				elementType: 'labels.text.fill',
      				stylers: [{color: '#d59563'}]
      			},
      			{
      				featureType: 'poi.park',
      			        elementType: 'geometry',
      			        stylers: [{color: '#263c3f'}]
      			},
      			{
      				featureType: 'poi.park',
      				elementType: 'labels.text.fill',
      				stylers: [{color: '#6b9a76'}]
      			},
      			{
      				featureType: 'road',
      				elementType: 'geometry',
      				stylers: [{color: '#38414e'}]
      			},
      			{
      				featureType: 'road',
      				elementType: 'geometry.stroke',
      					  stylers: [{color: '#212a37'}]
      			},
      			{
      				featureType: 'road',
      				elementType: 'labels.text.fill',
      					  stylers: [{color: '#9ca5b3'}]
      			},
      			{
      				featureType: 'road.highway',
      				elementType: 'geometry',
      				stylers: [{color: '#746855'}]
      			},
      			{
      				featureType: 'road.highway',
      				elementType: 'geometry.stroke',
      				stylers: [{color: '#1f2835'}]
      			},
      			{
      				featureType: 'road.highway',
      				elementType: 'labels.text.fill',
      				stylers: [{color: '#f3d19c'}]
      			},
      			{
      				featureType: 'transit',
      				elementType: 'geometry',
      				stylers: [{color: '#2f3948'}]
      			},
      			{
      			        featureType: 'transit.station',
      				elementType: 'labels.text.fill',
      				stylers: [{color: '#d59563'}]
      			},
      			{
      			        featureType: 'water',
      			        elementType: 'geometry',
      				stylers: [{color: '#17263c'}]
      			},
      			{
      				featureType: 'water',
      				elementType: 'labels.text.fill',
      				stylers: [{color: '#515c6d'}]
      			},
      			{
      				featureType: 'water',
      				elementType: 'labels.text.stroke',
      				stylers: [{color: '#17263c'}]
      			}
      		]
                  });
      
                  var trafficLayer = new google.maps.TrafficLayer();
                  trafficLayer.setMap(map);
              };
      
      		return wrapper;
      	}
      
      });
      
      
      posted in Transport
      K
      knubbl
    • RE: MMM-GoogleMapsTraffic

      @Osyris said in MMM-GoogleMapsTraffic:

      Hey guys, I figured it’s easy enough to style the map by editing the JS file. So in order to get the night mode as shown in pflodo’s post (and to disable the UI buttons) I added the following to the JS code:

      //original code
              script.onload = function () {
                  var map = new google.maps.Map(document.getElementById("map"), {
                  	zoom: 10,
                  	center: {
                  		lat: lat,
                  		lng: lng
                  	},
      //add a comma after the } above
      //new code:
      		disableDefaultUI: true,
      		styles: [
      			{elementType: 'geometry', stylers: [{color: '#242f3e'}]},
      			{elementType: 'labels.text.stroke', stylers: [{color: '#242f3e'}]},
      			{elementType: 'labels.text.fill', stylers: [{color: '#746855'}]},
      			{
      			    featureType: 'administrative.locality',
      			    elementType: 'labels.text.fill',
      			    stylers: [{color: '#d59563'}]
      			},
      			{
      				featureType: 'poi',
      				elementType: 'labels.text.fill',
      				stylers: [{color: '#d59563'}]
      			},
      			{
      				featureType: 'poi.park',
      			        elementType: 'geometry',
      			        stylers: [{color: '#263c3f'}]
      			},
      			{
      				featureType: 'poi.park',
      				elementType: 'labels.text.fill',
      				stylers: [{color: '#6b9a76'}]
      			},
      			{
      				featureType: 'road',
      				elementType: 'geometry',
      				stylers: [{color: '#38414e'}]
      			},
      			{
      				featureType: 'road',
      				elementType: 'geometry.stroke',
      					  stylers: [{color: '#212a37'}]
      			},
      			{
      				featureType: 'road',
      				elementType: 'labels.text.fill',
      					  stylers: [{color: '#9ca5b3'}]
      			},
      			{
      				featureType: 'road.highway',
      				elementType: 'geometry',
      				stylers: [{color: '#746855'}]
      			},
      			{
      				featureType: 'road.highway',
      				elementType: 'geometry.stroke',
      				stylers: [{color: '#1f2835'}]
      			},
      			{
      				featureType: 'road.highway',
      				elementType: 'labels.text.fill',
      				stylers: [{color: '#f3d19c'}]
      			},
      			{
      				featureType: 'transit',
      				elementType: 'geometry',
      				stylers: [{color: '#2f3948'}]
      			},
      			{
      			        featureType: 'transit.station',
      				elementType: 'labels.text.fill',
      				stylers: [{color: '#d59563'}]
      			},
      			{
      			        featureType: 'water',
      			        elementType: 'geometry',
      				stylers: [{color: '#17263c'}]
      			},
      			{
      				featureType: 'water',
      				elementType: 'labels.text.fill',
      				stylers: [{color: '#515c6d'}]
      			},
      			{
      				featureType: 'water',
      				elementType: 'labels.text.stroke',
      				stylers: [{color: '#17263c'}]
      			}
      		]
      //old code again
                  });
      

      Have fun!

      Also, if you want to make the background black (so it looks cool on the mirror), set the first attribute ‘geometry’ to ‘#000000’.

      Try this…works 4 me

      posted in Transport
      K
      knubbl