Traveltime with Google Maps

Morning,

Does anyone have a good flow for: at 06:00 hours a push notification about the travel time to work with Google Maps?

Would you like to share it then? Do you use a free API key here?

Tx!

not too sure but i remember seeing some stringify flows (not related to homey flow). You could use that to push that info to u based on time or triggered via a flow to ifttt to stringify… could probably send a post request if its possible although i havenr git a good look at stringify yet…

The google maps app seems to be able of doing that https://apps.athom.com/app/com.google.maps.directions

1 Like

Hello, I tired the google maps app. If I create a flow like this

Homey speaks at 06:00 and I get a 0 as a push message.

Why does homey speak?

thanks xooops

Because the Google Maps app is telling it to. Doesn’t look like you can turn that off.

thanks, where?

Ah OK, I’m not a developer so I guess I’m struggling on that task. :slight_smile:
I’m juster wondering… I installed just the app from the app store. How can I edit the app.js on homey?

thanks a lot, xooops

You can’t edit the file on Homey, but you can “clone” the Github repository (copying it to your local computer), edit the file, and use the Athom command line interface tool to install the (modified) app on your Homey.

I tried the same flow and also get a 0 as a push message.
Created an API key according to the instructions (incl. billing) but can’t see where it goed wrong. Any ideas?

The app is coded to speakup when using this function. if the work adress is set in the settings menu you can use the other cards (with tags) and then those tags will be filled.

ive made an feature request on github for this scenario.

Hi Guys @xooops, @Gertjan_Hendriks, @Jolink

i solved this by using the https://apps.athom.com/app/com.internet app and the get JSONpath Better logic card (also using the betterlogic app).
image
First collum: https://maps.googleapis.com/maps/api/directions/json?origin=CURRENTLOCATION&destination=DESTINATION&key=YOURAPIKEY
Second collum JSON PATH: routes[0].legs[0].distance.value (or duration: routes[0].legs[0].duration.value)
thrid collum: bettelogic variable

the same api key from the google maps app can be used (created on: https://cloud.google.com/maps-platform/?apis=maps)

then i use the betterlogic app card “execute mathjs expression” to round the output (because you’ll get the kilometers in meters and minutes in seconds) with the “round(VARIABLE / 1000)” and store it in another beterlogic variable named KM2
image

the KM2 variable is then used in a push message to an mobile phone and / or in homey speech.

4 Likes

thnx…
Tried creating the columns, think they work, but can’t seem to install the app Http app:
image
better logic app was already installed and I am on 1.5.13

Strange, im also on 1.5.13