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.

    My-Commute flooded google api - 1.73/ sec while it was set to default 10 minutes!

    Scheduled Pinned Locked Moved Solved Troubleshooting
    4 Posts 2 Posters 458 Views 2 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.
    • N Offline
      nakulbende
      last edited by

      Hello - Here is my config file with default poll freq. I got it working, but it kept blinking at refreshing at a very high rate. Not sure why that was happening. I checked the API console, and was thankful for it. The module had posted 18724 queries in a couple of minutes! That is $139 worth of queries! Please help me with debugging this? I am using a RPi3, And following is my config file. I was checking the MM interface through VNC stream, if that has something to do with it.

      Thanks in advance!

      image

      Just the MyCommute section:

      // Commute
      		{
      			module: 'MMM-MyCommute',
      			position: 'bottom_right',
      			header: 'XXXX',
      			classes: 'default everyone',
      			config: {
      				apikey: 'XXXX ',
      				origin: 'XXXX',
      				startTime: '06:00',
      				endTime: '18:00',
      				hideDays: [0,6],
      				pollFrequency: '10 * 60 * 1000',
      				destinations: [
      					{
      						destination: 'XXXX',
      						label: 'XXXX',
      						mode: 'transit',
      						color: '#82E5AA'
      					},
      					{
      						destination: 'XXXX',
      						label: 'XXXX',
      						mode: 'driving'
      					},
      					{
      						destination: 'XXXX',
      						label: 'XXXX',
      						mode: 'transit',
      						color: '#82E5AA'
      					},
      					{
      						destination: 'XXXX',
      						label: 'XXXX',
      						mode: 'driving'
      					}
      				]
      			}
      		},
      
      

      The full config file:

      
      /* Magic Mirror Config Sample
       *
       * By Michael Teeuw http://michaelteeuw.nl
       * MIT Licensed.
       *
       * For more information how you can configurate this file
       * See https://github.com/MichMich/MagicMirror#configuration
       *
       */
      
      var config = {
      	address: "localhost", // Address to listen on, can be:
      	                      // - "localhost", "127.0.0.1", "::1" to listen on loopback interface
      	                      // - another specific IPv4/6 to listen on a specific interface
      	                      // - "", "0.0.0.0", "::" to listen on any interface
      	                      // Default, when address config is left out, is "localhost"
      	port: 8080,
      	ipWhitelist: ["127.0.0.1", "::ffff:127.0.0.1", "::1"], // Set [] to allow all IP addresses
      	                                                       // or add a specific IPv4 of 192.168.1.5 :
      	                                                       // ["127.0.0.1", "::ffff:127.0.0.1", "::1", "::ffff:192.168.1.5"],
      	                                                       // or IPv4 range of 192.168.3.0 --> 192.168.3.15 use CIDR format :
      	                                                       // ["127.0.0.1", "::ffff:127.0.0.1", "::1", "::ffff:192.168.3.0/28"],
      
      	language: "en",
      	timeFormat: 12,
      	units: "metric",
      
      	// Modules //
      
      	modules: [
      		// Alert
      		{
      			module: "alert",
      		},
      		// Notifications
      		{
      			module: "updatenotification",
      			position: "top_bar"
      		},
      		// Clock
      		{
      			module: "clock",
      			position: "top_right",
      			config: {
      				timeFormat: '12',
      				displaySeconds: 'false',
      				showPeriod: 'true',
      				clockBold: 'true',
      				timezone: 'America/New_York' //Karachi
      			}
      		},
      		// calendar
      		{
      			module: "calendar",
      			//header: "Calenar",
      			position: "top_right",
      			config: {
      				calendars: [
      					{
      						symbol: "island-tropical",
      						url: "webcal://www.calendarlabs.com/ical-calendar/ics/76/US_Holidays.ics"
      					},
      					{
      						symbol: "user-friends",
      						url: "webcal://www.calendarlabs.com/ical-calendar/ics/76/US_Holidays.ics"
      					}
      				]
      			}
      		},
      		//Buller - this one will be todo in house
      		{
      			module: 'MMM-Buller',
      			position: 'top_right',
      			header: 'To Do',
      			config: {
      				debug: false,
      				lists: [
      					{
      						type: 'gTasks',
      						name: 'HomeToDo',
      						updateInterval: 1000 * 60 * 1 * 1, //every minutes
      						icon: 'fas tasks',
      					}
      				],
      			}
      		},
      		// dARKYsKY module
      		{
      			module: "MMM-DarkSkyForecast",
      			header: "XXXXX",
      			position: "top_left",
      			classes: "default everyone",
      			config: {
      				apikey: "XXXX",
      				latitude: "XXXX",
      				longitude: "XXXX",
      				iconset: "3c",
      				concise: false,
      				forecastLayout: "table",
      				units: "us",
      				maxHourliesToShow: "4",
      				maxDailiesToShow: "4",
      			}
      		},
      		// XKCD
      		{
      			module: 'DailyXKCD',
      			position: 'bottom_left',
      			config: {
      				invertColors: true,
      				showTitle: true,
      				showAltText: true,
      				randomComic: true
      			}
      		},
      		// Bring shopping list
      		{
      			module: "MMM-Bring",
      			position: "bottom_center",
      			config: {
      				email: "USER@EXAMPLE.COM",
      				password: "SECRET",
      				updateInterval: 15, // in Minutes
      				listName: "Weggies", // optional
      				showListName: true,
      				activeItemColor: "#EE524F",
      				latestItemColor: "#4FABA2",
      				showLatestItems: false,
      				maxItems: 0,
      				maxLatestItems: 0,
      				locale: "de-DE"
      			}
      		},
      		// MBTA - Main x Emerson
      		{
      			module: 'MMM-MBTA',
      			position: 'bottom_left', // This can be any of the regions.
      			header: "XXXXXx",
      			config: {
      				apikey: 'XXXX',
      				updateInterval: 30,
      				stations: 'XXX',
      				formatETA: 'true',
      				showOnly: ["Subway", "Bus"],
      				colorIcons: 'true',
      				direction: 'Inbound',
      				noETAToBack: 'false'
      			}
      		},
      		// MBTA - Davis
      		{
      			module: 'MMM-MBTA',
      			position: 'bottom_left', // This can be any of the regions.
      			header: "XXXX",
      			config: {
      				apikey: 'XXXX',
      				updateInterval: 20,
      				stations: 'XXX": "XXX',
      				formatETA: 'true',
      				showOnly: ["Subway", "Bus"],
      				colorIcons: 'true',
      				flipDirection: 'true',
      				direction: 'Inbound',
      				noETAToBack: 'false'
      			}
      		},
      		// Commute
      		{
      			module: 'MMM-MyCommute',
      			position: 'bottom_right',
      			header: 'XXXX',
      			classes: 'default everyone',
      			config: {
      				apikey: 'XXXX ',
      				origin: 'XXXX',
      				startTime: '06:00',
      				endTime: '18:00',
      				hideDays: [0,6],
      				pollFrequency: '10 * 60 * 1000',
      				destinations: [
      					{
      						destination: 'XXXX',
      						label: 'XXXX',
      						mode: 'transit',
      						color: '#82E5AA'
      					},
      					{
      						destination: 'XXXX',
      						label: 'XXXX',
      						mode: 'driving'
      					},
      					{
      						destination: 'XXXX',
      						label: 'XXXX',
      						mode: 'transit',
      						color: '#82E5AA'
      					},
      					{
      						destination: 'XXXX',
      						label: 'XXXX',
      						mode: 'driving'
      					}
      				]
      			}
      		},
      	]
      };
      
      /*************** DO NOT EDIT THE LINE BELOW ***************/
      if (typeof module !== "undefined") {module.exports = config;}
      
      
      1 Reply Last reply Reply Quote 0
      • N Offline
        nakulbende
        last edited by

        So, this got solved when I commented out the pollFrequency field. Not sure what is going on.

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

          @nakulbende said in My-Commute flooded google api - 1.73/ sec while it was set to default 10 minutes!:

          pollFrequency: ‘10 * 60 * 1000’,

          u need to take the quotes off, the value needs to be a number, with the quotes its a string

          Sam

          How to add modules

          learning how to use browser developers window for css changes

          N 1 Reply Last reply Reply Quote 0
          • N Offline
            nakulbende @sdetweil
            last edited by

            @sdetweil - thanks again! o my!

            1 Reply Last reply Reply Quote 0
            • 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