Tesla Connect 3.0 - Integration to Query Car Status - Deprecated, see below for replacment

Yep, that was it. There was no name in the car settings.

1 Like

thanks.. i will look at changing the code so it will use the device driver name if no custom name.

lgk 10/22 v3.1 add code to handle having a vehicle with no name just the "Tesla xxxx" driver name.

1 Like

@kahn-hubitat - A few questions/suggestions on tire pressure.

  1. Now that Tesla is displaying tire pressure in the app at all times, I’ve been monitoring the data and it seems like they push “last known” tire pressure through the API at all times (haven’t been seeing any zeros). So the “last known tire pressure” attributes that you added previously probably aren’t needed. Doesn’t hurt to keep. Just calling it out.
  2. Is there a reason that the “current” tire pressure attributes are set as strings (e.g. attribute "tire_pressure_front_left", "string") instead of decimals? I got a nail and a slow leak and didn’t notice right away because the car only showed a TPM warning below something like 35 PSI, so I’m trying to set up a notification if the pressure drops below a higher number (42 PSI maybe). I can’t use the “<“ operator in RM because these values are strings. I can use last_known_tire_pressure_XXX since these are decimals, which I guess would work fine (unless they get removed per my prior point :face_with_spiral_eyes:). I can change them to decimals in the driver and see what happens, but just thought I would check first.

LMK what you think. Thanks!

1 Like

Too bad your not using WeCoRE as it can convert strings to numbers.

the last_known are not string but decimal, so those are what you should be using in rules anyway as the others can be n/a when they are 0 (hence the string). On the other issue I will do some more digging and see if i dont see zeros they should be removed and changed over to decimal if that is the case. For now behaviour will not be any different if you are using last_known.

all in all i see no reason to change it even if what you say is true as it will break peoples rules (correctly using the last_known attributes) and it wont change anything for people who are as they are always the correct reading anyway.

1 Like

I did when I first moved from DumbThings to Hubitat, but I decided to move fully to RM. Agreed there are occasional things like this that could be handled better in webCoRE… just not worth it since I can do 99% of what I need with RM.

That’s what I thought… looked to me like the “last known” values are updating with each device update so long as pressure values aren’t null, so I’ll use these.

Yep, makes sense

1 Like

the one reason to change it would be memory and overhead ie 4 less attributes in the driver.. may be worth it at some pt..?? hmmm

on the flipside it currently cleanly handles weird cases ie an error if null comes back etc.

Good call out… but I, personally, am less concerned about this since I now have this and all my other Tesla stuff running on my C-7, after having moved all of my devices to my new C-8.

1 Like

Finally got mine set up and reporting data from the car. I see a large number of 'Current State' variables specifically lat and long which I want to use in a Basic Rules to notify when the vehicle arrives at a specific lat/long destination. Does anyone know how to do this? I've clicked through the Rules engine and do see it available in lock and temperature related conditions, but nothing that allows me to reference lat/long.

Same question for "is the vehicle plugged in" to set a reminder to plug in the car as someone else asked. Don't see that listed as a referencing var. Thanks!

Custom attribute on actuator

I don't know about Basic Rules, but those attributes are available though WebCoRE.

Screenshot 2023-04-04 111123

I believe u need to use std rule machine for custom attributes. Not basic rules

Thanks for the help. I found the lat/long under RM as well. On the lat/long example above, is there a way to reference it as a geolocation? For example, I want to get notified with the car is safely at school. I could reference lat + long, but exact location where the car is parked could affect that precise reference vs setting a radius around that location.

There is some rules to show the location of something in an iframe in google maps on the dashboard but nothing i.know of that does what you are asking.

I find you have to round to a certain amount of decimal places to increase the radius of of where it's parked. I'n my case it's to 3 decimal places. So if the car is in the garage or parked in front of the house... it'll catch it.

Currently my "position tracker" is somewhat crude and needs to be perfected when I get some time.

Is you run Teslamate, it has a geofence with radius capability and reports the current geofence via MQTT.

There is also a Teslamate app for Hubitat that brings all the MQTT data into the hub easily. I found that it doesn't change the geofence value when the car is in an area with no named geofence (geofence is null), and I had to work around that.

I use it in Hubitat to detect when one of our cars arrives home. I adjust some lights if it's dark, and have rules to remind me if the car isn't plugged in after it's been home a while.

Teslamate doesn't allow any control of the car, but it updates in real time when the car is awake. So I use this app for control and Teslamate for detecting car states.

Are there any instructions on how to set this up just got my M3 and would love to integrate it into HE. Also does it control charging I would ideally like to move to time of day electricity tariff .

Thanks.

@jon.d.tyler - Welcome to the club! I don’t think there are any formal instructions, but should be fairly easy after you use HPM to install the App and Driver package and then open the App (just some basic info to fill in). I use the “Auth for Tesla” app to generate the tokens, and if you’re using the APIs for anything else (like TeslaFi), create another Tesla driver account using an alternate email and generate fresh keys using that, so the token refreshes don’t conflict.

Yes, you can start/stop charging and set charge level. I have a number of rules to set my charging level based on location, if I have a long drive planned, and other things. I’m happy to share them once you’re set up. I have EV time of use plan too, but I don’t control for that directly as I just have the car scheduled to charge overnight, but you could certainly set up a rule to stop charging when peak electricity time hits, and/or start when peak is over.

I also use mine to do other cool stuff like voice commands on my voice assistants (trunk, frunk, HVAC, etc.) and automatically turn on valet mode when I get to my garage in the city.

2 Likes