Control and Query your Tesla vehicles (via Tessie.com)

@kahn-hubitat on your next code turn can you add:

attribute "softwareUpdateAlert", "enum", ["On","Off"]

and at line ~1764 update 'SoftwareUpdateVersion" to:

"SoftwareUpdateVersion": { it -> sendEventX(name: "softwareUpdateAlert", value: (it.value?.stringValue?.trim() ? "On" : "Off")) },

I use it to enable/disable my iPhone hotspot via iOS shortcuts and homekit to when new software is available.

1 Like

@kahn-hubitat

I'm currently using the thermostat tile and would like to be able to change it to colour red when it's on or auto.

image


image (2)

Is it possible to add the thermostatOperatingState attribute?

TIA

I'm trialing Tessie with my Cybertruck, but presence isn't working. I've enabled everything and set long/lat correctly. What might I be missing?

you cannot use both fleet api and alternate legacy api one or the other i assume you can just use fleet.. need to turn on debugging and post logs as you drive home.. also cadnnot see what your distance is set to.. also double check your long lat. are not reversed

Oh I clicked both on just a second before posting, legacy was off before. I double checked lat/long as I'd read previous posts! Will it only change status when driving into/out of the zone? I haven't moved since setting it up. I'll test that out tomorrow, thank you!

make sureis debugging on before driving to get the logs.

Here's the logs. My Teslamate connection shows present, but not the tessie one.

dev:42572025-10-05 02:00:22.440 PMinfoprocessData: [state:online, vin:7G2CEHED8RA006534, speed:0, motion:inactive, thermostatMode:off, active_route_destination:none, active_route_minutes_to_arrival:0, active_route_energy_at_arrival:0, active_route_miles_to_arrival:0, vehicleConfig:[has_third_row_seats:ThirdRowSeatTypeNone, has_seat_cooling:true, car_type:cybertruck, sunroof_installed:null], chargeState:[battery:34, usableBattery:34, batteryRange:108.32, chargingState:Charging, chargeLimit:80, chargeAmps:12, minutes_to_full_charge:1500], driveState:[latitude:xx, longitude:xx, method:wgs, heading:53, lastUpdateTime:Sun Oct 05 14:00:16 MDT 2025], vehicleState:[presence:not present, lock:locked, odometer:13219.224113, sentry_mode:Off, front_drivers_window:Closed, front_pass_window:Closed, rear_drivers_window:Closed, rear_pass_window:Closed, valet_mode:Off, tire_pressure_front_left:3.2, tire_pressure_front_right:3.25, tire_pressure_rear_left:3.25, tire_pressure_rear_right:3.175, front_drivers_door:Closed, rear_drivers_door:Closed, front_pass_door:Closed, rear_pass_door:Closed, frunk:Closed, trunk:Closed, user_present:false], climateState:[temperature:69, outside_temperature:46, thermostatSetpoint:69, passengerSetpoint:69, seat_heater_left:0, seat_heater_right:0, seat_heater_rear_left:0, seat_heater_rear_right:0, seat_heater_rear_center:null]]
dev:42572025-10-05 02:00:22.057 PMinfoExecuting 'refresh'
dev:42572025-10-05 02:00:20.069 PMinfoScheduling refresh from Websocket API
dev:42572025-10-05 01:58:48.918 PMinfoCalculated distance from home: 0.0
dev:42572025-10-05 01:58:18.935 PMinfoCalculated distance from home: 0.059978439762705726
dev:42572025-10-05 01:57:48.957 PMinfoCalculated distance from home: 0.13360465216976358
dev:42572025-10-05 01:57:18.919 PMinfoCalculated distance from home: 0.2530669749725412
dev:42572025-10-05 01:56:48.988 PMinfoCalculated distance from home: 0.32172740232759567
dev:42572025-10-05 01:56:25.358 PMinfoprocessData: [state:online, vin:7G2CEHED8RA006534, speed:46, motion:active, thermostatMode:auto, active_route_destination:none, active_route_minutes_to_arrival:0, active_route_energy_at_arrival:0, active_route_miles_to_arrival:0, vehicleConfig:[has_third_row_seats:ThirdRowSeatTypeNone, has_seat_cooling:true, car_type:cybertruck, sunroof_installed:null], chargeState:[battery:35, usableBattery:35, batteryRange:109.03, chargingState:Disconnected, chargeLimit:80, chargeAmps:48, minutes_to_full_charge:0], driveState:[latitude:xx, longitude:xx, method:wgs, heading:350, lastUpdateTime:Sun Oct 05 13:56:21 MDT 2025], vehicleState:[presence:not present, lock:locked, odometer:13218.232404, sentry_mode:Off, front_drivers_window:Closed, front_pass_window:Closed, rear_drivers_window:Closed, rear_pass_window:Closed, valet_mode:Off, tire_pressure_front_left:3.2, tire_pressure_front_right:3.25, tire_pressure_rear_left:3.25, tire_pressure_rear_right:3.175, front_drivers_door:Closed, rear_drivers_door:Closed, front_pass_door:Closed, rear_pass_door:Closed, frunk:Closed, trunk:Closed, user_present:true], climateState:[temperature:69, outside_temperature:46, thermostatSetpoint:69, passengerSetpoint:69, seat_heater_left:3, seat_heater_right:3, seat_heater_rear_left:0, seat_heater_rear_right:0, seat_heater_rear_center:null]]
dev:42572025-10-05 01:56:25.017 PMinfoExecuting 'refresh'
dev:42572025-10-05 01:56:18.908 PMinfoCalculated distance from home: 0.4253377232017745
dev:42572025-10-05 01:55:48.925 PMinfoCalculated distance from home: 0.6479645411642249
dev:42572025-10-05 01:55:18.974 PMinfoCalculated distance from home: 0.7675471444723121
dev:42572025-10-05 01:54:48.940 PMinfoCalculated distance from home: 0.8041172854625992
dev:42572025-10-05 01:54:43.466 PMwarnGot a firmware alert from WebSocket API: [TAS_a230_notifyGeofence, 10/05/2025 1:54:30 PM]!
dev:42572025-10-05 01:54:18.937 PMinfoCalculated distance from home: 0.7794322587917324
dev:42572025-10-05 01:53:48.968 PMinfoCalculated distance from home: 0.9059403312736608
dev:42572025-10-05 01:53:18.900 PMinfoCalculated distance from home: 1.2080941608919271
dev:42572025-10-05 01:52:48.998 PMinfoCalculated distance from home: 1.5307815649203453
dev:42572025-10-05 01:52:18.920 PMinfoCalculated distance from home: 1.573233478703404
dev:42572025-10-05 01:51:48.990 PMinfoCalculated distance from home: 1.8539297201900646
dev:42572025-10-05 01:51:25.393 PMinfoprocessData: [state:online, vin:7G2CEHED8RA006534, speed:26, motion:active, thermostatMode:auto, active_route_destination:none, active_route_minutes_to_arrival:0, active_route_energy_at_arrival:0, active_route_miles_to_arrival:0, vehicleConfig:[has_third_row_seats:ThirdRowSeatTypeNone, has_seat_cooling:true, car_type:cybertruck, sunroof_installed:null], chargeState:[battery:35, usableBattery:35, batteryRange:110.66, chargingState:Disconnected, chargeLimit:80, chargeAmps:48, minutes_to_full_charge:0], driveState:[latitude:xx, longitude:xx, method:wgs, heading:3, lastUpdateTime:Sun Oct 05 13:51:21 MDT 2025], vehicleState:[presence:not present, lock:locked, odometer:13216.235939, sentry_mode:Off, front_drivers_window:Closed, front_pass_window:Closed, rear_drivers_window:Closed, rear_pass_window:Closed, valet_mode:Off, tire_pressure_front_left:3.2, tire_pressure_front_right:3.25, tire_pressure_rear_left:3.25, tire_pressure_rear_right:3.175, front_drivers_door:Closed, rear_drivers_door:Closed, front_pass_door:Closed, rear_pass_door:Closed, frunk:Closed, trunk:Closed, user_present:true], climateState:[temperature:66, outside_temperature:48, thermostatSetpoint:69, passengerSetpoint:69, seat_heater_left:3, seat_heater_right:3, seat_heater_rear_left:0, seat_heater_rear_right:0, seat_heater_rear_center:null]]
dev:42572025-10-05 01:51:25.055 PMinfoExecuting 'refresh'
dev:42572025-10-05 01:51:18.965 PMinfoCalculated distance from home: 2.068660676130009
dev:42572025-10-05 01:50:48.911 PMinfoCalculated distance from home: 2.1502144757001087
dev:42572025-10-05 01:50:18.934 PMinfoCalculated distance from home: 2.1907942733831485
dev:42572025-10-05 01:46:25.388 PMinfoprocessData: [state:online, vin:7G2CEHED8RA006534, speed:0, motion:inactive, thermostatMode:off, active_route_destination:none, active_route_minutes_to_arrival:0, active_route_energy_at_arrival:0, active_route_miles_to_arrival:0, vehicleConfig:[has_third_row_seats:ThirdRowSeatTypeNone, has_seat_cooling:true, car_type:cybertruck, sunroof_installed:null], chargeState:[battery:35, usableBattery:35, batteryRange:111.1, chargingState:Disconnected, chargeLimit:80, chargeAmps:48, minutes_to_full_charge:0], driveState:[latitude:xx, longitude:xx, method:wgs, heading:332, lastUpdateTime:Sun Oct 05 13:45:45 MDT 2025], vehicleState:[presence:not present, lock:locked, odometer:13216.026536, sentry_mode:On, front_drivers_window:Closed, front_pass_window:Closed, rear_drivers_window:Closed, rear_pass_window:Closed, valet_mode:Off, tire_pressure_front_left:3.2, tire_pressure_front_right:3.25, tire_pressure_rear_left:3.25, tire_pressure_rear_right:3.175, front_drivers_door:Closed, rear_drivers_door:Closed, front_pass_door:Closed, rear_pass_door:Closed, frunk:Closed, trunk:Closed, user_present:false], climateState:[temperature:66, outside_temperature:48, thermostatSetpoint:69, passengerSetpoint:69, seat_heater_left:0, seat_heater_right:0, seat_heater_rear_left:0, seat_heater_rear_right:0, seat_heater_rear_center:null]]
dev:42572025-10-05 01:46:25.054 PMinfoExecuting 'refresh'
dev:42572025-10-05 01:41:25.408 PMinfoprocessData: [state:online, vin:7G2CEHED8RA006534, speed:0, motion:inactive, thermostatMode:off, active_route_destination:none, active_route_minutes_to_arrival:0, active_route_energy_at_arrival:0, active_route_miles_to_arrival:0, vehicleConfig:[has_third_row_seats:ThirdRowSeatTypeNone, has_seat_cooling:true, car_type:cybertruck, sunroof_installed:null], chargeState:[battery:35, usableBattery:35, batteryRange:111.2, chargingState:Disconnected, chargeLimit:80, chargeAmps:48, minutes_to_full_charge:0], driveState:[latitude:xx, longitude:xx, method:wgs, heading:332, lastUpdateTime:Sun Oct 05 13:39:25 MDT 2025], vehicleState:[presence:not present, lock:locked, odometer:13216.026536, sentry_mode:On, front_drivers_window:Closed, front_pass_window:Closed, rear_drivers_window:Closed, rear_pass_window:Closed, valet_mode:Off, tire_pressure_front_left:3.2, tire_pressure_front_right:3.25, tire_pressure_rear_left:3.25, tire_pressure_rear_right:3.175, front_drivers_door:Closed, rear_drivers_door:Closed, front_pass_door:Closed, rear_pass_door:Closed, frunk:Closed, trunk:Closed, user_present:false], climateState:[temperature:66, outside_temperature:48, thermostatSetpoint:69, passengerSetpoint:69, seat_heater_left:0, seat_heater_right:0, seat_heater_rear_left:0, seat_heater_rear_right:0, seat_heater_rear_center:null]]
dev:42572025-10-05 01:41:25.022 PMinfoExecuting 'refresh'
dev:42572025-10-05 01:36:25.360 PMinfoprocessData: [state:online, vin:7G2CEHED8RA006534, speed:0, motion:inactive, thermostatMode:off, active_route_destination:none, active_route_minutes_to_arrival:0, active_route_energy_at_arrival:0, active_route_miles_to_arrival:0, vehicleConfig:[has_third_row_seats:ThirdRowSeatTypeNone, has_seat_cooling:true, car_type:cybertruck, sunroof_installed:null], chargeState:[battery:35, usableBattery:35, batteryRange:111.31, chargingState:Disconnected, chargeLimit:80, chargeAmps:48, minutes_to_full_charge:0], driveState:[latitude:xx, longitude:xx, method:wgs, heading:332, lastUpdateTime:Sun Oct 05 13:36:12 MDT 2025], vehicleState:[presence:not present, lock:locked, odometer:13216.026536, sentry_mode:On, front_drivers_window:Closed, front_pass_window:Closed, rear_drivers_window:Closed, rear_pass_window:Closed, valet_mode:Off, tire_pressure_front_left:3.2, tire_pressure_front_right:3.25, tire_pressure_rear_left:3.25, tire_pressure_rear_right:3.175, front_drivers_door:Closed, rear_drivers_door:Closed, front_pass_door:Closed, rear_pass_door:Closed, frunk:Closed, trunk:Closed, user_present:false], climateState:[temperature:68, outside_temperature:48, thermostatSetpoint:69, passengerSetpoint:69, seat_heater_left:0, seat_heater_right:0, seat_heater_rear_left:0, seat_heater_rear_right:0, seat_heater_rear_center:null]]
dev:42572025-10-05 01:36:25.026 PMinfoExecuting 'refresh'
dev:42572025-10-05 01:33:55.932 PMinfoCalculated distance from home: 2.193452159004005
dev:42572025-10-05 01:33:25.929 PMinfoCalculated distance from home: 2.1412291068666707
dev:42572025-10-05 01:32:55.992 PMinfoCalculated distance from home: 2.081404247681242
dev:42572025-10-05 01:32:25.918 PMinfoCalculated distance from home: 1.6576975985399791
dev:42572025-10-05 01:31:55.945 PMinfoCalculated distance from home: 1.3021104048235912
dev:42572025-10-05 01:31:25.926 PMinfoCalculated distance from home: 1.1488642706409693
dev:42572025-10-05 01:31:25.399 PMinfoprocessData: [state:online, vin:7G2CEHED8RA006534, speed:20, motion:active, thermostatMode:auto, active_route_destination:Safeway, active_route_minutes_to_arrival:3.27, active_route_energy_at_arrival:35, active_route_miles_to_arrival:0.97, vehicleConfig:[has_third_row_seats:ThirdRowSeatTypeNone, has_seat_cooling:true, car_type:cybertruck, sunroof_installed:null], chargeState:[battery:35, usableBattery:35, batteryRange:111.64, chargingState:Disconnected, chargeLimit:80, chargeAmps:48, minutes_to_full_charge:0], driveState:[latitude:xx, longitude:xx, method:wgs, heading:196, lastUpdateTime:Sun Oct 05 13:31:11 MDT 2025], vehicleState:[presence:not present, lock:locked, odometer:13215.045391, sentry_mode:Off, front_drivers_window:Closed, front_pass_window:Closed, rear_drivers_window:Closed, rear_pass_window:Closed, valet_mode:Off, tire_pressure_front_left:3.2, tire_pressure_front_right:3.25, tire_pressure_rear_left:3.25, tire_pressure_rear_right:3.175, front_drivers_door:Closed, rear_drivers_door:Closed, front_pass_door:Closed, rear_pass_door:Closed, frunk:Closed, trunk:Closed, user_present:true], climateState:[temperature:69, outside_temperature:48, thermostatSetpoint:69, passengerSetpoint:69, seat_heater_left:3, seat_heater_right:3, seat_heater_rear_left:0, seat_heater_rear_right:0, seat_heater_rear_center:null]]
dev:42572025-10-05 01:31:25.018 PMinfoExecuting 'refresh'
dev:42572025-10-05 01:30:56.507 PMinfoCalculated distance from home: 1.0800341655848225
dev:42572025-10-05 01:30:25.935 PMinfoCalculated distance from home: 1.0046429019533867
dev:42572025-10-05 01:29:55.922 PMinfoCalculated distance from home: 0.8977605218820939
dev:42572025-10-05 01:29:25.907 PMinfoCalculated distance from home: 0.811825552209375
dev:42572025-10-05 01:28:56.012 PMinfoCalculated distance from home: 0.7417312405713787
dev:42572025-10-05 01:28:25.901 PMinfoCalculated distance from home: 0.5770726506083866
dev:42572025-10-05 01:27:55.939 PMinfoCalculated distance from home: 0.3640369590864644
dev:42572025-10-05 01:27:25.921 PMinfoCalculated distance from home: 0.2765437393050265
dev:42572025-10-05 01:26:55.893 PMinfoCalculated distance from home: 0.24027043222749228

not sure what those logs are there is no pminfo pmwarn ect in my logs.. looks like you re running a modified version
?

also need the settings posted all of them

]and with full debug it should look like those but that is not coming out .. so agaion not sure what that is

              if (debugLevel == "Full")    
                {
                 log.debug "current vehicle longitude,latitude = [ $vehlog, $vehlat ]"                 
                 log.debug "User set home longitude,latitude =   [ $homelog, $homelat ]"
                }
              
              def Double dist = calculateDistanceBetweenTwoLatLongsInKm(vehlog, vehlat, homelog, homelat)
              if (debugLevel != "None") log.debug "Calculated distance from home: $dist"
              
              if (dist <= boundryCircleDistance.toDouble())
               { 
                 if (device.currentValue('altPresent') == 'not present')
                   {
                    if (debugLevel != "None") log.debug "Vehicle in range... setting presence to true"
                    sendEvent(name: "altPresent", value: "present")
                    sendEvent(name: "presence", value: "present")
                   }
               }
              else

turn on debug websocket api as well. that location data is not coming back from the websocket thats the old normal refresh..

my guess is as mentioned previously the websocket telemetry is nt working from tessie..

there is already a thermostatmode attributer that hass off auto you should be able to use that.. i will add thermostat operating state so you can put a therm object on a dashboard

3 Likes

new version 2.42

5 Likes

I came here to check if someone has attempted a Tessie integration for Hubitat and found this thread, which is great!! I will explore this in the coming days, but have an initial question - Does this drive/integration provide some sort of a "presence" attribute to indicate when is the car at "home" ?

Yes, if you don't have the HomeLink module, then you will want to enable the 'fleet Real Time API' and 'Alternate Presence Method" and set your home lat/lon.

Using the real-time API, the car's location will update about once per minute when it is motion.

1 Like

Thanks! Is there a visual way in all those settings which calls outs which of those settings are expensive (will wake the car) vs cheap(will most probably use a recent cached attribute without waking up car)

I'd wait for @kahn-hubitat to chime in (he's the developer of this app), but I don't think anything you do in the preferences/settings will wake the car. I'm pretty sure only issuing commands will do that.

as mentioned only the normal refresh or comands will wake the car.

you need to answer questions about what you have
ie do you have websocket and websocket telemetry (separate settings in tessie) working.
do you have the homelink in the car.

best you can do is get websocket/fleet api working and then set the normal refresh time higher to avoid queries.. also turn off the weather and address queries if you want to cut down activity.

also recommend setting a sleep time for night when you are not using car to avoid extra queries.

I am a new Tessie subscriber, so I am not very sure about what the "web socket telemetry" option is. I am on the lifetime plan of Tessie, and have one Tesla Y car at home. Mostly, at the moment I just need to know when is the car home, its charge level, if it is plugged in. I do have myq in my garage, but that is not what I want to use(if possible), as opening and closing garage is not a guarantee that the car left the garage.

Short answer: Yes, this integration can make garage door opening/closing very reliable.

Medium answer: Yes, can be very reliable, but requires proper configuration, and another local garage door controlling device, like a Zooz relay.

Long answer: From personal experience, after setting up this integration, I have also used Combined Presence to add Wifi. This was in the earlier days, so not sure it's still necessary, but regardless, it's currently bulletproof in combination with a Zooz relay configured as a garage door opener (I also have MyQ from long, long ago, but rarely use it, but also not getting rid of it, because it's nice to use the sharing options for my mom or guests). Setting the distance to 0.04 KM (about 130 feet) from the parked coordinates (entered in the alternate presence method), the garage door opens as I pull up to the short driveway of my townhouse or as I'm reversing into it to park. When leaving, the garage door will close somewhere between that 130 feet and the 0.2 miles to my neighborhood's entrance. Every. Single. Time. The ONLY time this didn't work was after a Tesla update for a three week period where the car thought it wasn't online and wasn't getting GPS signal. Another update from Tesla fixed that.

1 Like