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

There is another approach. See the writeup here for detail. I recommend approach 3 or 4. HA has just implemented approach 3.

And yes, setting use_cache to False is a real killer. :slight_smile:

Thanks i think . Ill try number 4 with a variation. Let you set the time at which if the timestamp exceeds at which point it will check if unreachable or asleep and if so note it in an attributte and state and change to that method of polling till awake.

You're welcome :slight_smile:

Just installed this version of the app and it works great. I appreciate that you included the code I created to display Google map and to set the seat heaters based on seat name and enhanced it further to include new seat coolers and steering wheel heater.

So far my 2018 Model 3 is still working with the native Tesla APi so I'm able to run both your original Tesla Connect 3.0 and this new version side by side while I update dashboards and rules to now use this new verison.

Still sad that Tesla is dropping free access to their native API nor making a paid version available to consumers. Hopefully, Tessie will stay around for a long time.

Chris

1 Like

Didnt use any of your code that i know of. I already had the google maps in the old version
And tessie already had the api with seat heater names . But thanks.

I did get the initial code for the iframe for a map from someone else in the old app. was that u? Someone posted an iframe map device driver.

Larry,

Yes, that was me who created the iframe driver.

As for seat heaters I sent you a private message on 12/23/23 with a link to the code but no worries if you didn't use it as the Tessie API for seats and steering wheel has more functions/features than what I sent you.

Again, thanks so much for converting your original App/Driver to Tessie as this hopefully will be a long-term solution assuming Tessie stays in business and Tesla continues to offer an API at least for approved developers/partners to use.

1 Like

Thanks so much for doing this. I'm having a strange issue setting it up though. Tessie site seems fine, and configuring the app works fine and lets me select my vehicle.

Debug logs for the app show all the expected data being returned from queries, but the vehicle device has no attributes being set (beyond vin and update info).

The vehicle device log has an error of "No data found for XXXXX" despite the app apparently retrieving data.

There's also one error in the app log each time after the various data maps are displayed, an attempt to multiply a null object (I think in the fahrenheit to celcius routine, line 547) presumably because the data is missing.

I've tried deleting everything and re-adding both app and device but there's no change. Package was installed via HPM.

Thanks for any advice. Still assessing whether Tessie will be worthwhile for me so hoping to get this sorted during the free trial period.

I'd done the authorisation that the Tessie site directed me to, didn't see any link in the logs to do anything further.

But don't worry, it's come good of its own accord somehow or other, no idea why as I hadn't changed anything!

Thanks for the quick reply nonetheless, much appreciated.

Actually spoke too soon. The attributes are now populated on the device, but checking the logs it appears it succeeded once then went back to the 'no data' error:

dev:1062024-01-24 11:51:57.352 AMerrorNo data found for xxx

dev:1062024-01-24 11:51:56.022 AMinfoExecuting 'refresh'

dev:1062024-01-24 11:44:37.315 AMinfoTurning off Logging!

dev:1062024-01-24 11:36:57.104 AMerrorNo data found for xxx

dev:1062024-01-24 11:36:56.028 AMinfoExecuting 'refresh'

dev:1062024-01-24 11:21:57.265 AMdebugVehicleConfig = [has_third_row_seats:None, has_seat_cooling:false, car_type:models, sunroof_installed:null]

dev:1062024-01-24 11:21:57.257 AMdebugclimateState = [temperature:82, outside_temperature:77, thermostatSetpoint:71, passengerSetpoint:71, seat_heater_left:0, seat_heater_right:0, seat_heater_rear_left:null, seat_heater_rear_right:null, seat_heater_rear_center:null]

dev:1062024-01-24 11:21:57.234 AMdebugvehicle state = [presence:not present, lock:locked, odometer:66681.321169, 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.15, tire_pressure_front_right:3.15, tire_pressure_rear_left:3.05, tire_pressure_rear_right:3.05, front_drivers_door:Closed, rear_drivers_door:Closed, front_pass_door:Closed, rear_pass_door:Closed, frunk:Closed, trunk:Closed, user_present:false]

dev:1062024-01-24 11:21:57.227 AMdebugDriveState = [latitude:-xx, longitude:xx, method:wgs, heading:113, lastUpdateTime:Wed Jan 24 11:21:51 AEDT 2024]

dev:1062024-01-24 11:21:57.218 AMdebugchargeState = [battery:74, usableBattery:74, batteryRange:164.29, chargingState:Charging, chargeLimit:90, chargeAmps:8, minutes_to_full_charge:370]

dev:1062024-01-24 11:21:57.206 AMinfoprocessData: [state:online, vin:xxx, speed:0, motion:inactive, thermostatMode:off, vehicleConfig:[has_third_row_seats:None, has_seat_cooling:false, car_type:models, sunroof_installed:null], chargeState:[battery:74, usableBattery:74, batteryRange:164.29, chargingState:Charging, chargeLimit:90, chargeAmps:8, minutes_to_full_charge:370], driveState:[latitude:-xx, longitude:xx, method:wgs, heading:113, lastUpdateTime:Wed Jan 24 11:21:51 AEDT 2024], vehicleState:[presence:not present, lock:locked, odometer:66681.321169, 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.15, tire_pressure_front_right:3.15, tire_pressure_rear_left:3.05, tire_pressure_rear_right:3.05, 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:82, outside_temperature:77, thermostatSetpoint:71, passengerSetpoint:71, seat_heater_left:0, seat_heater_right:0, seat_heater_rear_left:null, seat_heater_rear_right:null, seat_heater_rear_center:null]]

dev:1062024-01-24 11:21:56.025 AMinfoExecuting 'refresh'

dev:1062024-01-24 11:06:57.286 AMerrorNo data found for xxx

dev:1062024-01-24 11:06:56.026 AMinfoExecuting 'refresh'

Also in case it helps, before the one successful device update the only event it was showing under event details (other than update times) was supportedThermostatModes, which seems to tie in with the null exception in the temperature unit routine during refresh. The device now shows the expected attribute events from the successful 11:21 update.

Could this be a symptom of poor connectivity? It seemed to succeed intermittently and although the Tesla app seemed to show the car was online my wifi signal had become very weak and may have been having issues with packet loss but not enough to force the car to LTE. I've turned off wifi for now to monitor if it behaves consistently on LTE.

i dont see any debug here from the app .. i would need to see the url to see if it is correct. if it is. then could be dropped packets between the hub and tessie..

Since I switched to LTE it seems to be reliably updating on each refresh cycle, so I guess poor connectivity to the car must have had something to do with it.

The only error in the app log was the one below, which prior to switching to LTE happened on every refresh. Since the switch it has only happened that once, when I did a manual refresh from the device page (which seems to not have worked).

app:1732024-01-24 01:07:08.181 PMinfoin refresh child

app:1732024-01-24 01:03:54.014 PMerrorjava.lang.NullPointerException: Cannot invoke method multiply() on null object on line 547 (method refresh)

app:1732024-01-24 01:03:53.996 PMdebugclimate state = [allow_cabin_overheat_protection:true, battery_heater:false, battery_heater_no_power:false, cabin_overheat_protection:On, climate_keeper_mode:off, cop_activation_temperature:High, defrost_mode:0, driver_temp_setting:22, fan_status:0, hvac_auto_request:On, inside_temp:29.4, is_auto_conditioning_on:null, is_climate_on:false, is_front_defroster_on:false, is_preconditioning:false, is_rear_defroster_on:false, left_temp_direction:null, max_avail_temp:28, min_avail_temp:15, outside_temp:null, passenger_temp_setting:22, remote_heater_control_enabled:false, right_temp_direction:null, seat_heater_left:0, seat_heater_right:0, side_mirror_heaters:false, supports_fan_only_cabin_overheat_protection:false, timestamp:1706061824419, wiper_blade_heater:false]

So I'm assuming there's probably no issue with the app, it's just an issue of whether or not the car is reliably contactable (which isn't that obvious from the Tesla or Tessie apps and has probably been happening for a while with the old app but I hadn't noticed).

Don't think there's any problem with the URL given it never failed consistently:

app:1732024-01-24 01:40:22.728 PMdebugrequest parms = [uri:https://api.tessie.com/xxx/state, timeout:20, headers:[User-Agent:lgkahn, Authorization:Bearer xxx]]

app:1732024-01-24 01:40:22.726 PMdebugmethod = GET

app:1732024-01-24 01:40:22.725 PMdebugpath = /xxx/state

app:1732024-01-24 01:40:22.724 PMdebugserver url = https://api.tessie.com

app:1732024-01-24 01:40:22.723 PMdebugtoken = xxx

app:1732024-01-24 01:40:22.721 PMinfoauthorizedHttpRequest GET /xxx/state

app:1732024-01-24 01:40:22.721 PMdebugin authorize http req

  • v 1.8 check difference of current time vs last response time for car.. if greater than user inputed time in seconds.
  • then do a status command instead of state.. and see if car is asleep .
  • if it is asleep change schedule refresh to do a status until it is awake. then change back to the normal state.
  • Relating to this is a new attribute currentVehicleState that can be checked..

Screenshot 2024-01-23 233543

1 Like

Still seeing strange behaviour. Generally it all works fine, but I get random periods with the 'No data' device error (and corresponding multiply error in the app). There was a 2 hour period early this morning and it's now started doing it again for the last few refreshes. There is no corresponding offline/asleep indication on the Tessie website, it shows the car as online during all the periods that the hubitat integration is failing. Not sure what to make of that!

Thay means your car is offline. Post your error... it should still handle that. Have you updated. I added code to avoid the temp error

Should the offline status not be reflected in Tessie in that case though? I did upgrade soon after you posted it. Initially had forgotten to update the preferences but since I did that I still had a short period of errors. I'll continue to monitor and see what happens. Let me know if there's anything specific I can do to assist if this is a problem you're trying to rectify rather than just intermittent issues with my connectivity.

yes but it sounds like our hub is what is offline as well maybe your entire internet.. try going to the tessie website api.tessie.com when this occurs and running the status command.

also try to ping it from the hub network diagnostics.. it could be erroring out when this occurs as well and you will get no data. that is why i need to see both debug logs.

Ok, 99.9% sure it's not internet connectivity, I have multiple things that would be immediately obvious if that was happening and in general my internet is very reliable. Notice you've just updated the app so I'll install that and monitor and if I see further errors I'll try to capture relevant debug logs.

I also see a lot of Tesla Connect Tessie - java.net.sockettimeoutexception: read timed out on line 285 (method sleepstatus) since the last update.

Well timeout is 20 secs. Can you post req to error on debug logs. But if it timing out not
much i can do except maybe code a retry.