I'm trying to change the code to have 'unlock' unlock the charge port instead. The previous post from @diondp has a mod, but for the life of me in the code I can't find that section and don't know what to change. Any help would be greatly appreciated.
Presence works fine for me. I am trying to create a tesla dashboard panel.. I cannot get the button presses to work reliably, even adding an extra wake command. i think when the car is in deep sleep nothing works. There must be yet another api call as the app itself can wake up the car..
Anyway I made the following changes to the tesla driver..
lgk kahn@lgk.com 10/13/20 Added user selectable refresh update schedule instead of default 15 minutes.
also add custom lastupdate time attribute and refreshTime so that info is displayable on dashboards.
also round mileage off to whole number so again it appears better on dashboard.
same for temp, round off so that we can do custom colors on dashbaord based on temp.
Same for temp setpoint. showing non integer makes no sens.
@kahn-hubitat ... Help I've installed the App and Driver and the App activated correctly after I enter in my Tesla Account user-id/PW it then asked me to select my car (M3) which all worked without error. I then added a Virtual Driver with "Tesla" as drier type and it is not able to return any status. Checking the logs shows the following:
dev:4422020-11-23 03:23:08.286 pm errorjava.lang.NullPointerException: Cannot invoke method lock() on null object on line 213 (lock)
@kahn-hubitat thanks so much for creating this app/driver. It is really nice to be able to walk-up to my tablet on the wall and quickly look at status of my Tesla and issue some commands. Do you have any plans to add more attributes & commands to the driver that are available in the API Commands - Tesla JSON API (Unofficial) as it would be great to also know if a Software Update is available, turn Sentry Mode on/off, Outside Air temp, set seat heaters on/off, etc. With the Hubitat rule engine there are a lot of cool automation that could be created based on more Tesla API attributes and commands being available to reference.
@kahn-hubitat Can you please provide screen shots how you created your Button Actions (1-8) e.g. what did you select for "Action Type" and then the drop box that comes down to the right after you picked an Action Type. I was able to create a button actions to lock and unlock by selecting "Control HSM, Garage Doors, Locks or Valves" but I can't figure out how you created your other buttons actions. BTW I don't know if this is related but I created virtual device called "Tesla Button" with Device Type = Virtual Button and then entered 8 for the "number of physical buttons" in the Preferences section for that device.
@kahn-hubitat thanks so much for the help and support. What you have done to get this driver to work in Hubitat and the examples of how to use it is great. I'm having a lot of fun creating a Tesla specific dashboard and Alexa automation rules with this driver.
lgk add misssing parameter to sethermostatsetpoint.. note it is in fahrenheit so be aware of that.. in the future i can look at supporting both
with option to convert.
I see there is a preference switch to enable debug logging, but the app and driver code dont honor it. Could this be implemented? I get a lot of debug lines in my logs Id prefer not to see.