tillsteinbach / WeConnect-python

Python API for the Volkswagen WeConnect Services
MIT License
108 stars 30 forks source link

Send destinations to car #8

Open tillsteinbach opened 3 years ago

tillsteinbach commented 3 years ago

The API allows to send destinations to the car. The necessary communication is already analyzed. This just needs a good user interface to put in the address.

Will add after thinking about it for some days.

mitch-dc commented 2 years ago

Really like this idea, how does it work in the API? By Coordinates or address?

tillsteinbach commented 2 years ago

I‘m not sure yet. The app sends both, but I don’t know what the car is using.

hovant commented 2 years ago

I wouldn't put high hopes on this. At least with my ID.4, when I send destination to the car with the app, it typically comes there very slow, typically I'm already in the destaination before it comes. Sometimes it has come on the following day. On the other hand, I've not tried it lately, could have been fixed.

tillsteinbach commented 2 years ago

I think it is still a problem, but keep the fingers crossed for ID Software 3.0

mitch-dc commented 2 years ago

I wouldn't put high hopes on this. At least with my ID.4, when I send destination to the car with the app, it typically comes there very slow, typically I'm already in the destaination before it comes. Sometimes it has come on the following day. On the other hand, I've not tried it lately, could have been fixed.

Yea the app is pretty bad at this. But it's also bad with the climate control settings so maby talking to the api directly works better.

DarkFox commented 1 year ago

I think it is still a problem, but keep the fingers crossed for ID Software 3.0

It seems to be fixed in 3.0. I've used it a couple of times now, and it seems to be received in the car right away (or at least as quickly as other commands, instead of days later).

SamuelBrucksch commented 1 year ago

Hey, could you point me to where it is documented how this works? As this was not added so far, it will probably also not be added in the near future, but I want to use this to try to send routes from ABRP to the car. So if you could provide the endpoints and what to send I could play around a bit with it.

tillsteinbach commented 1 year ago

I need to find my old notes. I might be able to implement that quickly next week or the week after to try it out. What is your plan to add this to ABRP

SamuelBrucksch commented 1 year ago

Not 100% sure yet how to add it to be used with ABRP. Probably something like a bridge app, that talks to VW API, where you can share to from ABRP and then it uploads the route. So i will probably not reuse the python interface in that case, but use the information provided on the endpoints. the python interface is still good to use it from my smart home and for testing the destinations before writing an android app though.

BMWfan commented 10 months ago

Is there any progress?

tillsteinbach commented 10 months ago

No sorry, I‘m currently very busy with other things.

DarkFox commented 9 months ago

I've started looking at making a PR to add this, but it's quite a struggle to figure out how to connect it to the rest of the code. https://github.com/DarkFox/WeConnect-python/commit/f9e85bf01a5fe9233d94867ccbd2d35192fb5aa4

I used these implementations as reference: https://github.com/adhyh/homebridge-vwconnectid/blob/master/src/routeSwitchAccessory.ts#L32-L63 https://github.com/adhyh/npm-vwconnectidapi/blob/main/index.js#L389-L405 https://github.com/adhyh/npm-vwconnectidapi/blob/main/index.js#L1924-L1926

It looks like there's also an API to get the history of destinations sent, but I haven't looked that closely into it yet: https://github.com/adhyh/npm-vwconnectidapi/blob/main/index.js#L151-L155

DarkFox commented 1 week ago

I finally had some time and energy to sit down and take a look at this. I've got a working prototype, but the code definitely needs some cleanup. The existing code is definitely not made to handle a domain that doesn't have any values published by the API. Edit: I was clearly not thinking clearly when I concluded this. I literally just had to move it outside the domain section.

https://github.com/DarkFox/WeConnect-python/pull/2

DarkFox commented 3 days ago

I've gotten coordinates working. Addresses are still being a bit wonky. They show up in the car, but seemingly invalid, so pressing the start navigation button just opens the navigation screen and then does nothing.

I'll try sending it some different values and see if anything works.

DarkFox commented 3 days ago

It's obvious in hindsight, but addresses are purely for display purposes. Coordinates are required.