wimaha / TeslaBleHttpProxy

TeslaBleHttpProxy is a program written in Go that receives HTTP requests and forwards them via Bluetooth to a Tesla vehicle. The program can, for example, be easily used together with evcc.
Apache License 2.0
32 stars 8 forks source link

Add support for "charge_port_door_open" and "charge_port_door_close" #41

Closed protree closed 3 months ago

protree commented 3 months ago

Allow opening and closing of the charge port. Command "charge_port_door_open" stops charging and unlocks charge port so you can plug out the charging cable. "charge_port_door_close" simply closes the charge port if no cable is plugged in.

I tested it locally and it worked.

wimaha commented 3 months ago

Thank you. Looks good. Are there any error messages when the charge port is already opened or closed? So we can stop retrying in this cases?

protree commented 3 months ago

No errors in the Logs. The command succeeds anyway (e.g. Charge Port Open -> "charge_port_door_open" -> the command is executed once, no errors, no repeats even though no movement happend)

Jabe commented 1 month ago

Hi everybody,

I can't get it to work in with the latest docker image strangely. (1.2.5)

curl -X POST http://teslabridge:8080/api/1/vehicles/VIN/command/charge_port_door_open
{"response":{"result":false,"reason":"The command \"charge_port_door_open\" is not supported.","vin":"VIN","command":"charge_port_door_open"}}

and logs with successful wake_up

2024/10/17 14:49:20 INFO TeslaBleHttpProxy 1.2.5 is loading ...
2024/10/17 14:49:20 INFO BleControl initialized
2024/10/17 14:49:20 INFO TeslaBleHttpProxy is running!
2024/10/17 14:49:26 INFO received command=wake_up body=map[]
2024/10/17 14:49:26 INFO connecting to Vehicle ...
2024/10/17 14:49:41 WARN failed to perform handshake with vehicle (B): context deadline exceeded
2024/10/17 14:49:41 INFO retrying in 3 seconds
2024/10/17 14:49:46 can't accept: listner timed out
2024/10/17 14:49:46 INFO connection established
2024/10/17 14:49:48 INFO received command=wake_up body=map[]
2024/10/17 14:49:48 INFO sending command=wake_up body=map[]
2024/10/17 14:49:48 INFO successfully executed command=wake_up body=map[]
2024/10/17 14:49:59 INFO received command=charge_port_door_open body=map[]
2024/10/17 14:49:59 ERRO not supported command=charge_port_door_open

All other commands work too. Since it was deployed in 1.2.2 and looking at the code - it should work, right? I'm really confused honestly.

oakedcornhacs commented 3 weeks ago

Hi everybody,

I can't get it to work in with the latest docker image strangely. (1.2.5)

curl -X POST http://teslabridge:8080/api/1/vehicles/VIN/command/charge_port_door_open
{"response":{"result":false,"reason":"The command \"charge_port_door_open\" is not supported.","vin":"VIN","command":"charge_port_door_open"}}

and logs with successful wake_up

2024/10/17 14:49:20 INFO TeslaBleHttpProxy 1.2.5 is loading ...
2024/10/17 14:49:20 INFO BleControl initialized
2024/10/17 14:49:20 INFO TeslaBleHttpProxy is running!
2024/10/17 14:49:26 INFO received command=wake_up body=map[]
2024/10/17 14:49:26 INFO connecting to Vehicle ...
2024/10/17 14:49:41 WARN failed to perform handshake with vehicle (B): context deadline exceeded
2024/10/17 14:49:41 INFO retrying in 3 seconds
2024/10/17 14:49:46 can't accept: listner timed out
2024/10/17 14:49:46 INFO connection established
2024/10/17 14:49:48 INFO received command=wake_up body=map[]
2024/10/17 14:49:48 INFO sending command=wake_up body=map[]
2024/10/17 14:49:48 INFO successfully executed command=wake_up body=map[]
2024/10/17 14:49:59 INFO received command=charge_port_door_open body=map[]
2024/10/17 14:49:59 ERRO not supported command=charge_port_door_open

All other commands work too. Since it was deployed in 1.2.2 and looking at the code - it should work, right? I'm really confused honestly.

Same issue here, only "charge_port_door_open" and "charge_port_door_close" are not working. I'm running a docker based on wimaha/tesla-ble-http-proxy:dev on armv7l Raspbian GNU/Linux 11 (bullseye).

wimaha commented 3 weeks ago

See: https://github.com/wimaha/TeslaBleHttpProxy/issues/56