DistanceFromHomeKM

Posted on
Thu Apr 30, 2020 11:16 am
mat offline
Posts: 769
Joined: Nov 25, 2010
Location: Cambridgeshire - UK

DistanceFromHomeKM

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

Posted on
Thu Apr 30, 2020 12:27 pm
howartp offline
Posts: 4559
Joined: Jan 09, 2014
Location: West Yorkshire, UK

Re: DistanceFromHomeKM

Hi Mat

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

Peter


Sent from my iPhone using Tapatalk Pro

Posted on
Thu Apr 30, 2020 12:41 pm
mat offline
Posts: 769
Joined: Nov 25, 2010
Location: Cambridgeshire - UK

Re: DistanceFromHomeKM

Perfect. Thanks Peter will look

Late 2018 mini 10.14

Posted on
Sat May 16, 2020 10:07 am
rbdubz3 offline
User avatar
Posts: 224
Joined: Sep 18, 2016
Location: San Diego, CA

Re: DistanceFromHomeKM

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: https://forums.indigodomo.com/viewforum.php?f=309

Posted on
Sat May 16, 2020 10:48 am
howartp offline
Posts: 4559
Joined: Jan 09, 2014
Location: West Yorkshire, UK

Re: DistanceFromHomeKM

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

Posted on
Sat May 16, 2020 11:40 am
rbdubz3 offline
User avatar
Posts: 224
Joined: Sep 18, 2016
Location: San Diego, CA

Re: DistanceFromHomeKM

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: https://forums.indigodomo.com/viewforum.php?f=309

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 1 guest