Read the statement by Michael Teeuw here.
MMM-MyCommute - API Calls and Quota
-
Hi i have a question, I’m using the MMM-MyCommute module but have to set to only be shown between 5:45 AM and 6:25 AM using startTime and endTime in my config (also not showing on weekends).
During this time when the module is not shown on the screen does it still run and make an API call adding to my Quota on Google? I just want to make sure that i do not end up getting charged for not showing the module. I have all of the default values set as well:
Here’s my config, can someone let me know if I will be OK with the daily/monthly free API pulls?
{ module: 'MMM-MyCommute', position: 'bottom_left', config: { apikey: 'myAPIKey', origin: 'Garden City, NY', startTime: '05:45', endTime: '06:20', hideDays: [0,6], destinations: [ { destination: 'Ozone Park, NY', label: 'My Commute', mode: 'Driving' } ] } },
-
@ooom416354 said in MMM-MyCommute - API Calls and Quota:
MMM-MyCommute
seems the code says it does NOT poll if not in the time window
-
@sdetweil that is great, thank you. by chance just for my learning, where is it in the code? thanks again !
-
@ooom416354 Look into line 173 of the MMM-MyCommute.js
getData: function() { //only poll if in window if ( this.isInWindow( this.config.startTime, this.config.endTime, this.config.hideDays ) ) { //build URLs
Above that you can find the
isInWindow()
-function that checks if current time is between start and end time. -
@lavolp3 Thanks so much for the details!
-
I’m the author of this plugin and I can confirm that the module will not poll for data outside the window you set. I designed it this way specifically to deal with Google’s quota.
-
@j-e-f-f
Hi, that want I am trying, to reduce the API calls. but I have problem with it.
My mirror stop showing MMM-Commute in the evening but doesn’t start in the morning… See my config.js:Thanks,
Herman
module: ‘MMM-MyCommute’,
position: ‘top_left’,
header: ‘Verkeer’,
classes: ‘default everyone’,
config: {
apikey: ‘xxx’,
origin: ‘87 Verisstraat, Hoofddorp, 2132 PC’,
startTime: ‘05:45’,
endTime: ‘23:00’,
// showSummary: true,
// hideDays: [0,6],
destinations: [
{
destination: ‘116 La Guardiaweg, Amsterdam, 1043 DL’,
label: ‘UWV’, -
@hermlam I haven’t looked at this code for a long time and it’s quite possible this module no longer works properly. I believe there are newer forks you can try that are currently under active development.
Try here:
https://github.com/jclarke0000/MMM-MyCommute/network/members -
@hermlam I am having this same issue, at least since the most recent MM update. Have you found a solution yet?