Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Service to start preheating manually #14

Closed
esbenr opened this issue Dec 4, 2021 · 8 comments
Closed

Service to start preheating manually #14

esbenr opened this issue Dec 4, 2021 · 8 comments

Comments

@esbenr
Copy link

esbenr commented Dec 4, 2021

It could be awesome of it was possible to call a service and start preheating.
I would like to contribute with this, if you can help me out with some basic info on the the API.

@skagmo
Copy link
Owner

skagmo commented Dec 4, 2021

It would be a nice feature and it's on my to-do list, however I haven't had the time to do it. Would be great if you could give it a try.

Unfortunately I don't have any more info on the We Connect API. It's not documented anywhere, and the only thing I can recommend is to collect snippets of information from various forums or look at source code for other projects using the API. To be honest the lack of API documentation is the biggest blocker for me to get features like this done.

@esbenr
Copy link
Author

esbenr commented Dec 5, 2021

That's all fine.
My approach will be to hook my phone up though Charles proxy and record the API call when the preheating is started.
In that way I can possibly expand the pyton library to perform the same call.
At least that's how I found out how to pull data from the MyVolkswagen app into HA. So I will try that and let you know of my progress.

@clabbo
Copy link

clabbo commented Dec 7, 2021

Is this relevant? https://pypi.org/project/weconnect/#files
Unpack and check \weconnect-0.25.1\weconnect\elements
I don't know if this is helpful but I am also interested to get some more features, the WeConnectID app isn't very impressing (the previous WeConnect app [for non-ID cars] was a lot better).

@jonasbkarlsson
Copy link

jonasbkarlsson commented Dec 14, 2021

A service that can set any settable attribute would be great. In a similar way as mqtt.publish.

service: ha_vwid.set_value
data:
  attribute: /vehicles/WVWABCE1ZSD057394/controls/climatization
  value: start

Till Steinbach's Github should be a good source of inspiration, especially WeConnect-python and WeConnect-cli.

Edit: Maybe /vehicles/WVWABCE1ZSD057394 is not needed, since that information is available to the integration already.

Edit2: The following attributes seems settable for me:

/status/chargingSettings/maxChargeCurrentAC
/status/chargingSettings/autoUnlockPlugWhenCharged
/status/chargingSettings/targetSOC_pct
/status/climatisationSettings/targetTemperature_K
/status/climatisationSettings/targetTemperature_C
/status/climatisationSettings/targetTemperature_F
/status/climatisationSettings/climatisationWithoutExternalPower
/status/climatisationSettings/climatizationAtUnlock
/status/climatisationSettings/windowHeatingEnabled
/status/climatisationSettings/zoneFrontLeftEnabled
/status/climatisationSettings/zoneFrontRightEnabled
/controls/charging
/controls/climatization

@BugBasher28
Copy link

Shameless kick for a little attention.

Being able to send commands to the car is probably the #1 item on my wishlist, not just for this HASS component but for all of my home automations. I'd love to contribute but I just don't have the skills to do so.

@jonasbkarlsson
Copy link

Totally up to you @skagmo of course, but I think it would be worth while to consider using https://github.com/tillsteinbach/WeConnect-python. It seems to be very actively maintained, and already contains the functionality to send commands. It would "just" be the HA integration needed.

@MichelBarneveld
Copy link

Also take a look at this: https://github.com/mitch-dc/volkswagen_we_connect_id

Mitch-dc already created a HA integration based on the library mentioned by @jonasbkarlsson. And also provides services in HA to start the preheating, change charging speed and target SoC.

@skagmo
Copy link
Owner

skagmo commented Feb 6, 2022

@jonasbkarlsson Thanks for the heads up. I wasn't aware his library supported WeConnect ID (though it was only WeConnect). It would make sense to move over and don't maintain two similar libraries, however 80 % of this project is the WeConnect ID library, so if I ever use his library I think it will be pretty much a new project. I really don't have the time to do that now, and like @MichelBarneveld points out there are already projects that have started using his library, so I'd suggest trying out that instead if you want to enable communication back to your car anytime soon.

@MichelBarneveld That's nice to see. @BugBasher28 I'd suggest trying that out for the features you request.

@skagmo skagmo closed this as completed Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants