[RELEASE] Multi-Place - Powered by Google Traffic

found it, looks like my api is wonky

Yup, I'd check to make sure you've properly enabled the geocode API.

1 Like

Hi @JustinL

Trying to setup this app and I get this error but I am from South Africa and I am not sure how to setup the "address" correctly? What format should I be using? I have setup these 2 places in Life 360, I even changed one via the app and it changed in the Hubitat Life360

Looks like you're having the same issue as the previous poster. Seems you've enabled Life360 but there's a problem with Google Geocoding API. Did you enable Google Geocoding API in accordance with Step 1 in the setup instructions? Look in the log for "geocode response = " and see what it says.

Hi, I have done that correctly I think but mine shows errors

Ok, interesting. Can you find the geocode response = in the log? Need to see if the geocode response has an error.

Did you connect the API key to both APIs? I don't think I mentioned that part in the instructions. Don't remember if Google does that for you or if you have to do that yourself....

Okay, mine had "Don't restrict key", but I have setup mine to match yours, it says it may take up to 5 min for the changes, Below is the log file after I turned on debugging for places

Guessing that's fine then. Somewhere else in the log will be the 'geocode response = ' part that will tell me if there's an error in the app or if the error is in the google API setup.

I think it might be working now, it may have been the application restriction. See the log below

It is now showing as London, so I need to sort out the address correctly what format do I use?

Street address, suburb, City, postal code?

Great! I'll make sure to add that last step to the instructions then.

I am in the US, and use: street address, city, state, postal code
Not sure about international. I suspect that whatever format works in Google Maps will work.

1 Like

Thanks for the help, I may be back for more :slight_smile:

@JustinL
Is it possible to stop the app doing API calls between 2 times, so I am basically using this for my son's school trip in the morning and fetching in the afternoon. So basically I don't need this to do API calls after 15h00 local time, until 6:30 the next morning? I did setup the modes but that does not seem to stop the API checks.

Which API are you referring to? Google Directions, Geocode, or both?

I think I've just programmed the app to stop the Google Directions calls, not the geocode API since the geocode is used for location, not for directions ....

But the app should already avoid google direction API calls as you desire. The geocode API calls are what you would be seeing, not the google directions API calls.

Was thinking for both, as you only get 20 000 API calls per month for free. If you are doing the default which is 1 request every 2 minutes that works out to 30 per hour, 720 per day and 22 320 per 31 day month. Is this correct? That is why I thought you could have an option that says "Don't check anything between these time xxhxx and xxhxx, the person can turn this on or leave it off?

Sorry just asking questions, otherwise I need to extend the checking time interval

The geocode API costs $5 USD every 1000 API calls, so you actually get 40,000 geocode API calls for free. The directions (with traffic) API costs $10 every 1000 API calls, so you get 20,000 directions API calls for free.

I'll have to think about if it makes sense to not make the geocode calls. But I've never been charged with the default settings, as you'll generate far fewer than 20,000 directions API calls per month, leaving more than enough for the geocode API calls. If you want to be safe, you can increase the time between calls.

1 Like

That does give me an idea, though. I think I should build in an option to avoid going over the free limit. If you hit the limit, the app would spit out an error and just not update. Whatcha think?

1 Like

That is also a good idea.

Ok, just updated to include that feature. Just need to hit "Done" in the app to make sure it is configured (it's 'on' by default')

1 Like

@JustinL After todays update I get the error shown below if I try to edit an existing trip:

Now it works, nit sure what went wrong before