Skip to content

Commit

Permalink
2.0.3
Browse files Browse the repository at this point in the history
Added climate commands: vent, temperature, preconditioning, defrost, overheat protection
  • Loading branch information
RonnyWinkler committed Feb 10, 2025
1 parent 9e68698 commit 357084f
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 21 deletions.
3 changes: 3 additions & 0 deletions .homeychangelog.json
Original file line number Diff line number Diff line change
Expand Up @@ -335,5 +335,8 @@
},
"2.0.2": {
"en": "Addec commands: start/stop chagrging; set charging ampere."
},
"2.0.3": {
"en": "Addec climate commands: vent, temperature, preconditioning, defrost, overheat protection."
}
}
2 changes: 1 addition & 1 deletion .homeycompose/app.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"id": "com.tesla.car",
"version": "2.0.2",
"version": "2.0.3",
"compatibility": ">=12.1.0",
"platforms": ["local"],
"sdk": 3,
Expand Down
2 changes: 1 addition & 1 deletion app.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"_comment": "This file is generated. Please edit .homeycompose/app.json instead.",
"id": "com.tesla.car",
"version": "2.0.2",
"version": "2.0.3",
"compatibility": ">=12.1.0",
"platforms": [
"local"
Expand Down
24 changes: 11 additions & 13 deletions drivers/car/device.js
Original file line number Diff line number Diff line change
Expand Up @@ -1032,14 +1032,12 @@ module.exports = class CarDevice extends TeslaOAuth2Device {

case 'commandDoorLock':
if (params.locked){
result.command = 1;
// result.command = 'RKE_ACTION_LOCK';
result.params = { action: 1};
}
else{
result.command = 0;
// result.command = 'RKE_ACTION_UNLOCK';
result.params = { action: 0};
}
result.params = {};
result.command = 'RKEAction';
result.domain = CONSTANTS.DOMAIN_VEHICLE_SECURITY;
break;

Expand All @@ -1059,18 +1057,18 @@ module.exports = class CarDevice extends TeslaOAuth2Device {
break;

case 'commandWindowPosition': // car and climate
result.command = 'vehicleControlWindowAction';
if (params.position == 'vent'){
result.command = 'vehicleControlWindowActionVent';
result.params = { vent : {}};
}
else{
result.command = 'vehicleControlWindowActionClose';
result.params = { close : {}};
}
result.params = { action : 3};
break;

case 'commandScheduleSoftwareUpdate':
result.command = 'vehicleControlScheduleSoftwareUpdateAction';
result.params = { offset_sec: params.minutes * 60};
result.params = { offsetSec: params.minutes * 60};
break;

// charging actions
Expand Down Expand Up @@ -1164,15 +1162,15 @@ module.exports = class CarDevice extends TeslaOAuth2Device {
case 'commandSetTemperature':
result.command = 'hvacTemperatureAdjustmentAction';
result.params = {
driver_temp_celsius : params.driverTemperature,
passenger_temp_celsius : params.passengerTemperature
driverTempCelsius : params.driverTemperature,
passengerTempCelsius : params.passengerTemperature
};
break;

case 'commandPreconditioning':
result.command = 'hvacAutoAction';
result.params = {
power_on : params.on
powerOn : params.on
// manual_override: true
};
break;
Expand All @@ -1181,7 +1179,7 @@ module.exports = class CarDevice extends TeslaOAuth2Device {
result.command = 'setCabinOverheatProtectionAction';
result.params = {
on: (params.mode != 'off'),
fan_only: (params.mode == 'fan_only')
fanOnly: (params.mode == 'fan_only')
};
break;

Expand Down
4 changes: 2 additions & 2 deletions drivers/climate/device.js
Original file line number Diff line number Diff line change
Expand Up @@ -254,13 +254,13 @@ module.exports = class ClimateDevice extends ChildDevice {
}

if( capabilityValues["climate_overheat_protection_mode"] != undefined){
await this._commandPreconditioningMode(
await this._commandOverheatprotectionMode(
capabilityValues["climate_overheat_protection_mode"]
);
}

if( capabilityValues["climate_overheat_protection_level"] != undefined){
await this._commandPreconditioningLevel(
await this._commandOverheatprotectionLevel(
capabilityValues["climate_overheat_protection_level"]
);
}
Expand Down
8 changes: 4 additions & 4 deletions lib/doc/commands_implemented.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ vehicleControlSetSentryModeAction OK
vehicleControlFlashLightsAction OK
vehicleControlHonkHornAction Not tested
RKE_ACTION_LOCK, RKE_ACTION_UNLOCK MESSAGEFAULT_ERROR_INSUFFICIENT_PRIVILEGES
vehicleControlWindowAction MESSAGEFAULT_ERROR_INSUFFICIENT_PRIVILEGES
vehicleControlWindowAction OK
vehicleControlScheduleSoftwareUpdateAction Not tested

Battery:
Expand All @@ -18,12 +18,12 @@ Location:
API commandNavigateGpsRequest No action found

Climate:
hvacTemperatureAdjustmentAction Action ok, Parameters not working
hvacTemperatureAdjustmentAction OK
hvacClimateKeeperAction: Not in app (dog mode tec.)
setCabinOverheatProtectionAction: OK
setCopTempAction OK
hvacAutoAction (preconditioning): Command ok, Parameters not working
hvacSetPreconditioningMaxAction OK (deaktivieren lässt Klima an)
hvacAutoAction (preconditioning): OK
hvacSetPreconditioningMaxAction OK
hvacSteeringWheelHeaterAction cabin comfort remote settings not enabled, No auto/level, only on/off possible!
autoSeatClimateAction Not implementeed, params unknown
hvacSeatHeaterActions Not implementeed, params unknown
Expand Down

0 comments on commit 357084f

Please sign in to comment.