DistanceFromHomeKM

mat
Posts: 770
Joined: Thu Nov 25, 2010 10:48 am
Location: Cambridgeshire - UK

DistanceFromHomeKM

Post by mat »

New to the plugin so just getting to grips.

Looks great.

Just setting up alarms to remind me if I don't plug in - which is common when arriving home thinking of food.

I notice two fields DistanceFromHomeKm and same for work. Both of mine are currently set at over 8,000km away, and presumably are the Tesla and Apple HQ's from reading other threads. How do I zero these for home and work? Home and work are set correctly in the car.

thanks


Mat
Late 2018 mini 10.14
howartp
Posts: 4559
Joined: Thu Jan 09, 2014 4:43 pm
Location: West Yorkshire, UK

Re: DistanceFromHomeKM

Post by howartp »

Hi Mat

They’re either in the device or plugin config - I can’t remember which!

Peter


Sent from my iPhone using Tapatalk Pro
mat
Posts: 770
Joined: Thu Nov 25, 2010 10:48 am
Location: Cambridgeshire - UK

Re: DistanceFromHomeKM

Post by mat »

Perfect. Thanks Peter will look
Late 2018 mini 10.14
User avatar
rbdubz3
Posts: 232
Joined: Sun Sep 18, 2016 9:33 am
Location: San Diego, CA

Re: DistanceFromHomeKM

Post by rbdubz3 »

I have the same issue with the distanceFromHomeKM - though I am in Southern California so not quite as far off.. However - the car has Home/Work setup properly and seems to recognize these. The API always seems to be providing some distance that looks like TeslaHQ.. I did try to Get commands on VehicleConfig and also GUISettings without much luck. Any ideas?

One other strange thing I noticed.. Doing the VehicleConfig and GUISettings Get commands seemed to mess up the states available to the main Device Details in Indigo.. For example, the state 'speed' was no longer available. However, once I did a 'Refresh all Vehicle States' the 'speed' attribute came back
I automate because I am lazy :D - My Plugins: viewforum.php?f=309
howartp
Posts: 4559
Joined: Thu Jan 09, 2014 4:43 pm
Location: West Yorkshire, UK

Re: DistanceFromHomeKM

Post by howartp »

Home and Work are both set in the Device in Indigo.

They default to Tesla and Apple one way or the other - I can't rememember which.

If you update those to be your home and work coordinates then the DistanceFromHome/Work states will be populated correctly whenever you refresh the Drive state (or "All").

If you have two or more Teslas, each one can have different Home/Work locations on the assumption your spouse works at a different place to you and therefore needs different "Work" coordinates.

Now that Tesla offers a "Refresh all" endpoint within their API, it might be worth just using the refresh-all option all the time. Previously when you ran refresh-all I just called each of the others in turn but that's not no longer necessary so the last update I changed it to use their own endpoint.

Peter
User avatar
rbdubz3
Posts: 232
Joined: Sun Sep 18, 2016 9:33 am
Location: San Diego, CA

Re: DistanceFromHomeKM

Post by rbdubz3 »

ah - my bad :? - I was trying the different actions 'get vehicle config' and 'get gui settings' rather than going into the actual Device Configuration..

all good now - thanks howartp
I automate because I am lazy :D - My Plugins: viewforum.php?f=309
Post Reply

Return to “Tesla EV Control”