Skip to content

Commit

Permalink
Updates to support scheduled charging
Browse files Browse the repository at this point in the history
  • Loading branch information
themonomers committed Sep 22, 2024
1 parent 53ebbb3 commit ebb4fda
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
17 changes: 17 additions & 0 deletions pkg/vehicle/state.go
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
}
5 changes: 5 additions & 0 deletions run_tesla_command_proxy.sh
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 &

0 comments on commit ebb4fda

Please sign in to comment.