Same problem here. Tesla binding (bridge) gives configuration error since 22 March. I upgraded to Openhab 3.3.0.M2, re-installed the binding, created a new Tesla account with new refresh token (Auth for Tesla), but still ‘Configuration_Error’.
Anyone having an idea how to go forward?
Thank you. If I understand it correctly, one file (TeslaSSOHandler.java) needs to be updated. Since I am a beginner, how can I do that with my current installation (openHAB 3.2 with openHABian)?
Unfortunately car goes offline (ERROR:COMM) regularly. Have to disable and enable Tesla account in openHAB, then car goes online again until - after some time - it becomes offline.
I managed to get around this issue with a rule that triggers when the car thing (not the bridge thing!) changes from ONLINE to OFFLINE or from ONLINE to UNKNOWN. You need to enable basic auth and the JSScripting addon. This is required because things can only be enabled/disabled by REST API or external commands, not from within OH3.
And of course you need to adjust to your environment - the REST URLs are easily copied from the API explorer.
var AccountUID, CarVIN, AccountThing, CarThing, RestUserPW, RestBaseURL, BridgeState, BridgeStateDetail, CarState, CarStateDetail, things, logger, BridgeUrl, CarUrl, putHeaders, putResponse;
things = Java.type('org.openhab.core.model.script.actions.Things')
logger = Java.type('org.slf4j.LoggerFactory').getLogger('org.openhab.rule.' + ctx.ruleUID);
AccountUID = '**********'; // take from bridge thing definition
CarVIN = '5YJSA7E26GF******'; // take from car thing definition
AccountThing = 'tesla:account:'+AccountUID;
CarThing = 'tesla:models:'+AccountUID+':'+CarVIN;
RestUserPW = '********:*********'; // user:password for REST API access
RestBaseURL = 'http://'+RestUserPW+'@openhab:8080/rest'; // obvious...
BridgeUrl = RestBaseURL+'/things/tesla%3Aaccount%3A'+AccountUID+'/enable';
CarUrl = RestBaseURL+'/things/tesla%3Amodels%3A'+AccountUID+'%3A'+CarVIN+'/enable';
let { actions } = require('openhab');
BridgeState = String( things.getThingStatusInfo(AccountThing).getStatus());
BridgeStateDetail = String( things.getThingStatusInfo(AccountThing).getStatusDetail());
CarState = String( things.getThingStatusInfo(CarThing).getStatus());
CarStateDetail = String( things.getThingStatusInfo(CarThing).getStatusDetail());
logger.info('[Trigger] - Tesla bridge state: '+BridgeState+' - Detail: '+BridgeStateDetail);
logger.info('[Trigger] - Tesla car state: '+CarState+' - Detail: '+CarStateDetail );
if ((BridgeState == 'ONLINE' || BridgeState == 'DISABLED')&& CarState != 'ONLINE' && CarState != 'DISABLED') {
// try to disable/enable both bridge and car, hopefully it will recover...
logger.error('[Trigger] - Bridge is online, but car ist not.');
logger.info('[Trigger] - Trying to disable Tesla bridge...');
putResponse = actions.HTTP.sendHttpPutRequest(BridgeUrl, "text/plain", "false", 5000);
logger.info('[Trigger] - ' + putResponse);
java.lang.Thread.sleep(2000)
logger.info('[Trigger] - Trying to enable tesla bridge...');
putResponse = actions.HTTP.sendHttpPutRequest(BridgeUrl, "text/plain", "true", 5000);
logger.info('[Trigger] - ' + putResponse);
java.lang.Thread.sleep(2000);
logger.info('[Trigger] - Trying to disable tesla car...');
putResponse = actions.HTTP.sendHttpPutRequest( CarUrl, "text/plain", "false", 5000);
logger.info('[Trigger] - ' + putResponse);
java.lang.Thread.sleep(2000);
logger.info('[Trigger] - Trying to enable tesla car...');
putResponse = actions.HTTP.sendHttpPutRequest( CarUrl, "text/plain", "true", 5000);
logger.info('[Trigger] - ' + putResponse);
} else if (BridgeState != 'ONLINE' || CarState != 'ONLINE') {
// log info if either bridge or car are not online, but combination does not allow automatic repair
logger.warn('[Trigger] - No action taken, no sense to restart bridge if BridgeState != ONLINE.');
} else {
logger.info('[Trigger] - Nothing to do, both Tesla bridge and car are online.')
}
BTW: Please be graceful - this was my first javascript ever…