In the documentation:
Bridge tesla:account:myaccount "My Tesla Account" [ refreshToken="xxxx" ] {
model3 mycar "My favorite car" [ vin="5YJSA7H25FFP53736"]
}
The refreshToken is used to get an authtoken for the API, but that also invalidates the prior authtoken and refreshtoken. When not defining the Bridge in a file, it works because the code writes the new refreshtoken to the config, however when using file based things, the value is always what was set in the file, so the updated refresh token will not be written, and when the binding is re-instantiated it will fail.
Thus it seems that the only way to use the Tesla binding from a thing file is by specifying the username and password of the account in plaintext? Is this correct?
I’m wondering if I should add a configuration for the access token itself, which doesn’t get invalidated very often (I’ve used the same one for almost a year in my shell scripts). That way the binding will work and I don’t have to expose the password.