forked from lotharbach/tesla-command-proxy
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updates to support scheduled charging
- Loading branch information
1 parent
53ebbb3
commit ebb4fda
Showing
2 changed files
with
22 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package vehicle | ||
|
||
import ( | ||
"context" | ||
|
||
"github.com/teslamotors/vehicle-command/pkg/protocol/protobuf/vcsec" | ||
) | ||
|
||
// BodyControllerState returns information about closures, locks, and infotainment sleep status. | ||
// This method works over BLE even when infotainment is asleep. | ||
func (v *Vehicle) BodyControllerState(ctx context.Context) (*vcsec.VehicleStatus, error) { | ||
reply, err := v.getVCSECInfo(ctx, vcsec.InformationRequestType_INFORMATION_REQUEST_TYPE_GET_STATUS, slotNone) | ||
if err != nil { | ||
return nil, err | ||
} | ||
return reply.GetVehicleStatus(), nil | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/bin/bash | ||
|
||
cd /home/pi/tesla-command-proxy | ||
|
||
/usr/local/go/bin/go run /home/pi/tesla-command-proxy/cmd/tesla-http-proxy -tls-key /home/pi/tesla/python/key.pem -cert /home/pi/tesla/python/cert.pem -port 4443 -key-file /home/pi/tesla/python/tesla_private_key.pem -mode owner $1 > tesla-command-proxy.log 2>&1 & |