From 6cc1c7df86b8b6ee976579bac30c4e19266d02af Mon Sep 17 00:00:00 2001 From: Ernie Costa Date: Sun, 31 Mar 2019 21:09:59 -0400 Subject: [PATCH 1/5] Update Tesla.psm1 Added some newer non-parameterized commands to the validation sets. --- Tesla.psm1 | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/Tesla.psm1 b/Tesla.psm1 index 489f419..74eebd7 100644 --- a/Tesla.psm1 +++ b/Tesla.psm1 @@ -315,6 +315,8 @@ Set-Tesla 'climate_state', 'drive_state', 'gui_settings', + 'mobile_enabled', + 'nearby_charging_sites', 'vehicle_state', 'vehicle_config', 'vehicles' @@ -364,15 +366,18 @@ Get-Tesla [parameter(Mandatory=$true,Position=0)] [ValidateSet('auto_conditioning_start', 'auto_conditioning_stop', - 'door_lock', - 'door_unlock', - 'charge_port_door_open', 'charge_max_range', + 'charge_port_door_open', + 'charge_port_door_close', 'charge_standard', 'charge_start', 'charge_stop', + 'door_lock', + 'door_unlock', 'flash_lights', 'honk_horn', + 'reset_valet_pin', + 'upcoming_calendar_entries', 'wake_up' )] [string]$Command From 724a46cf32bc7d3c401b9e7656a1f335f6f4441d Mon Sep 17 00:00:00 2001 From: Ernie Costa Date: Sun, 31 Mar 2019 21:10:15 -0400 Subject: [PATCH 2/5] Revert "Update Tesla.psm1" This reverts commit 6cc1c7df86b8b6ee976579bac30c4e19266d02af. --- Tesla.psm1 | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/Tesla.psm1 b/Tesla.psm1 index 74eebd7..489f419 100644 --- a/Tesla.psm1 +++ b/Tesla.psm1 @@ -315,8 +315,6 @@ Set-Tesla 'climate_state', 'drive_state', 'gui_settings', - 'mobile_enabled', - 'nearby_charging_sites', 'vehicle_state', 'vehicle_config', 'vehicles' @@ -366,18 +364,15 @@ Get-Tesla [parameter(Mandatory=$true,Position=0)] [ValidateSet('auto_conditioning_start', 'auto_conditioning_stop', - 'charge_max_range', + 'door_lock', + 'door_unlock', 'charge_port_door_open', - 'charge_port_door_close', + 'charge_max_range', 'charge_standard', 'charge_start', 'charge_stop', - 'door_lock', - 'door_unlock', 'flash_lights', 'honk_horn', - 'reset_valet_pin', - 'upcoming_calendar_entries', 'wake_up' )] [string]$Command From f5c9ce8cfee4c4eeda7a465775c748aaf7e527a5 Mon Sep 17 00:00:00 2001 From: Ernie Costa Date: Sun, 31 Mar 2019 21:10:29 -0400 Subject: [PATCH 3/5] Revert "Revert "Update Tesla.psm1"" This reverts commit 724a46cf32bc7d3c401b9e7656a1f335f6f4441d. --- Tesla.psm1 | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/Tesla.psm1 b/Tesla.psm1 index 489f419..74eebd7 100644 --- a/Tesla.psm1 +++ b/Tesla.psm1 @@ -315,6 +315,8 @@ Set-Tesla 'climate_state', 'drive_state', 'gui_settings', + 'mobile_enabled', + 'nearby_charging_sites', 'vehicle_state', 'vehicle_config', 'vehicles' @@ -364,15 +366,18 @@ Get-Tesla [parameter(Mandatory=$true,Position=0)] [ValidateSet('auto_conditioning_start', 'auto_conditioning_stop', - 'door_lock', - 'door_unlock', - 'charge_port_door_open', 'charge_max_range', + 'charge_port_door_open', + 'charge_port_door_close', 'charge_standard', 'charge_start', 'charge_stop', + 'door_lock', + 'door_unlock', 'flash_lights', 'honk_horn', + 'reset_valet_pin', + 'upcoming_calendar_entries', 'wake_up' )] [string]$Command From 4d0da95fbb0eb10132068c8dface794c46683342 Mon Sep 17 00:00:00 2001 From: Ernie Costa Date: Sun, 31 Mar 2019 21:11:31 -0400 Subject: [PATCH 4/5] Support for newer commands Added some newer non-parameterized commands to the validation sets and cleaned up some white space. --- Tesla.psm1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tesla.psm1 b/Tesla.psm1 index 74eebd7..83c3d2e 100644 --- a/Tesla.psm1 +++ b/Tesla.psm1 @@ -390,4 +390,4 @@ Get-Tesla Write-Progress -Activity $activity -Status 'Completed' -Completed } -Export-ModuleMember Connect-Tesla,Get-Tesla,Set-Tesla +Export-ModuleMember Connect-Tesla,Get-Tesla,Set-Tesla \ No newline at end of file From 4749dfffcd9aa12ad0261f86f72c51edacab8072 Mon Sep 17 00:00:00 2001 From: Ernie Costa Date: Sun, 31 Mar 2019 21:24:39 -0400 Subject: [PATCH 5/5] Update ReadMe.md Added and removed "supported commands" --- ReadMe.md | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/ReadMe.md b/ReadMe.md index c4ce4c3..843c7c3 100644 --- a/ReadMe.md +++ b/ReadMe.md @@ -32,22 +32,29 @@ Currently supported commands are: - `Get-Tesla` commands: - `climate_state` - `charge_state` - - `gui_settings` - `drive_state` + - `gui_settings` + - `mobile_enabled` + - `nearby_charging_sites` - `vehicle_state` - `vehicle_config` - `vehicles` -- `Set-Tesla` commands: - - `mobile_enabled` +- `Set-Tesla` commands: - `auto_conditioning_start` - `auto_conditioning_stop` + - `charge_max_range` + - `charge_port_door_open` + - `charge_port_door_close` + - `charge_standard` + - `charge_start` + - `charge_stop` - `door_lock` - `door_unlock` - - `sun_roof_control?state=close` - - `sun_roof_control?state=comfort` - - `sun_roof_control?state=vent` - - `charge_stop` - - `charge_start` + - `flash_lights` + - `honk_horn` + - `reset_valet_pin` + - `upcoming_calendar_entries` + - `wake_up` ## Example Usage @@ -78,5 +85,7 @@ PS> `Set-Tesla -Command auto_conditioning_start` The syntax for specific commands could be improved a bit, and this should eventually have proper installer / package manager package. +Support for parameterized commands is currently under work. This would be stuff like `set_charge_limit?percent=:limit_value` or `set_valet_mode?on=:on&password=:password`. + Fixes, suggestions, improvements etc. are all welcome via the GitHub repository. [https://github.com/JonnMsft/TeslaPSModule](https://github.com/JonnMsft/TeslaPSModule)