Tesla Fleet API/Rule Machine

Good day,

Full disclosure: I am a recent owner of a Hubitat hub and out of my depth regarding its capabilities (and limitations) and the technological landscape inherent in it. But, I'm willing to learn. If I may, I'd like to describe my goal with the hub - and hope someone out there can point me in a direction to pursue in implementing a solution.

Situation: We have solar panels, but we do not have storage batteries/Powerwall. However, the generation from the panels during sun up generating time is just about enough to cover the electrical demand of running one of our three biggest consumers: two air conditioners and level-2 EV charging (Tesla). My hope is to prioritize the running of these appliances such that only one is running at a given time during solar generating time - thereby minimizing the purchase of electricity off the grid...but maximizing our use of generated electricity if 'demand' (car needs charging) is present.

I monitor/manipulate the air conditioners in Hubitat via the Google Nest Thermostat API/driver and use Rule Machine rules to control their respective runnings. I'd like to add the vehicle charging into the mix.

Goal: for all intents and purposes, have the vehicle be a device that can be queried and updated by Rule Machine rules. Query the status of the vehicle...is the charging cord plugged in?; what is the battery's max charge percent?; what is the battery's current charge percent? Update the vehicle: start charging; stop charging. (My Tesla account has the requisite client id/secret)

Assumptions/understandings/dumb questions:

  • manipulation of the EV charger may be an approach (turning it on/off), but I think you'd still need to update the car to start charging
  • pre-2023 Hubitat/Tesla 'integration' (Kahn?) has been invalidated by Tesla's release of Fleet API/driver. There has been no update to Fleet API.
  • the app 'Tessie' may be a means to an end, but I have trouble justifying the subscription cost given my limited use/need...besides I'm a cheap bastard.
    - an aside...have any Tesla-types looked at 'Teslemetry (https://teslemetry.com)'? In my under-informed mind, it plays in the same space as Tessie, but the subscription price is quite a bit less
  • HTTP POSTs/GETs/el al. can be done within Rule Machine...but the JSON/text packaging/parsing is a mystery
  • Can what I want to do be done within the confines of Rule Machine?; or will it require development of Groovy driver/app code?
  • Is there a 'Hubitat for Dummies' resource to be found? I find that much of the documentation I've found assumes a base of knowledge that I don't have.

It's a big ask, I know. Please know any suggestions/directions /instructions/guidance you're willing to share will be appreciated.

Thanks

An update...

It would seem the Tesla Fleet API reuires a domain (and assorted certs) and end to end encryption in a 'partner' - so my hopes/dreams are dashed.

You are going to need to work through an entity like Tessie. No real choice there.

FWIW, I have fully automated two vehicle charging, but it runs in Home Assistant rather than Hubitat. It uses Tessie for Tesla vehicle access, Local HTTP for Tesla wall chargers, and Sense for power solar production/consumption information.

I appreciate your feedback and confirmation.

A little late to the party, but Teslamate still works (for the moment, at least!) and I do have a Teslamate driver for Hubitat. (I also have a utility that helps you maintain a Fleet API account, if it comes to that, but Teslamate doesn't need it yet.)

1 Like

I appreciate your feedback.

In the end, I happened upon the organization Smartcar that provides an API that enables all the things that I outlined in the original posting - with multiple auto manufacturers, including Tesla. As a hobbyist, the API is free to use. I wrote a driver to get done what I needed done via various HTTP Gets/Posts in conjunction with Rule Machine.

Thanks