Deprecated Binding - Volkswagen We Connect

thanks a lot for the great work so far. I’m currently driving a passat GTE, so a hybrid and some of the e-manager API’s should work.

Thanks :slight_smile:
I would love to see DEBUG log with emanager/get-emanager API call!

What I’m missing is the current overall mileage of the car. Is this expected to be returned by the API? I see it in the VW mobile app.

You should get the overall milage from the channel:
odometer#totalTripDistance Number:Length Total trip distance

I should probably rename that channel to odometer#totalDistance since the name trip is missleading.

I’ve tried to start to climate the car, which was not working.
I’ve plugged it in charging. This state is also not reflected.
I’ve tried to start to climate the car again, which was again not working, even it is plugged in.

Since I do not own an electrical/hybrid car this is anticipated, super that you can PM me your debug logs! :slight_smile:

This just returns the longtime statistics which are being reset after some time. In my case this currently displays 2.770 km. Whereas the overall mileage returned so far is 56.013 km.

I’ll also send you some request and response from the browser and some corresponding screenshots.

This just returns the longtime statistics which are being reset after some time. In my case this currently displays 2.770 km. Whereas the overall mileage returned so far is 56.013 km.

Your totally correct, I will add a new channel named odometer#totalDistance that will display the total milage.

Regarding the last trip information, the mobile app and the web portal allows to “travel back” through all the previous trips.

Would it be possible to keep track of the last trip when enabling the binding and then use the api to read all the trip date from the last imported one till the actual time to allow them to be persisted in open hab for further analysis?

Due to some reason I’m not allowed to PM you via the openhab community. I’ve send you an email directly.

I tried to start charging (received Error Code 2, but charging starts es expected), while stop charging does not work and charging continues. Please find below the related part of the log:


2020-04-29 22:40:41.172 [ome.event.ItemCommandEvent] - Item 'emanagerCharge' received command ON

2020-04-29 22:40:41.175 [nt.ItemStatePredictedEvent] - emanagerCharge predicted to become ON

==> /var/log/openhab2/openhab.log <==

2020-04-29 22:40:41.180 [DEBUG] [econnect.internal.VWWeConnectSession] - Sending command: https://www.portal.volkswagen-we.com//portal/delegate/dashboard/WVWZZZXXXXXXXXXXXX/-/emanager/charge-battery

2020-04-29 22:40:41.184 [DEBUG] [econnect.internal.VWWeConnectSession] - postJSONVWWeConnectAPI URL: https://www.portal.volkswagen-we.com//portal/delegate/dashboard/WVWZZZXXXXXXXXXXXX/-/emanager/charge-battery Data: {"triggerAction":"True", "batteryPercent":"100"} Referer: https://www.portal.volkswagen-we.com/portal/delegate/dashboard/WVWZZZXXXXXXXXXXXX XCSRF:SjcZM5xx

==> /var/log/openhab2/events.log <==

2020-04-29 22:40:41.188 [vent.ItemStateChangedEvent] - emanagerCharge changed from UNDEF to ON

==> /var/log/openhab2/openhab.log <==

2020-04-29 22:40:41.189 [DEBUG] [econnect.internal.VWWeConnectSession] - HTTP POST Request HttpRequest[POST //portal/delegate/dashboard/WVWZZZXXXXXXXXXXXX/-/emanager/charge-battery HTTP/1.1]@1064d1d.

==> /var/log/openhab2/openhab.log <==

2020-04-29 22:40:42.455 [TRACE] [econnect.internal.VWWeConnectSession] - HTTP Response (200) Body:{"errorCode":"0","actionNotification":{"actionState":"QUEUED","actionType":"START","serviceType":"RBC","errorTitle":null,"errorMessage":null}}

2020-04-29 22:40:42.459 [DEBUG] [.internal.handler.VWWeConnectHandler] -  VIN: WVWZZZXXXXXXXXXXXX JSON response: {"errorCode":"0","actionNotification":{"actionState":"QUEUED","actionType":"START","serviceType":"RBC","errorTitle":null,"errorMessage":null}}

2020-04-29 22:40:42.464 [DEBUG] [econnect.internal.VWWeConnectSession] - ErrorCode: 0

2020-04-29 22:40:42.467 [DEBUG] [.internal.handler.VWWeConnectHandler] - Command https://www.portal.volkswagen-we.com//portal/delegate/dashboard/WVWZZZXXXXXXXXXXXX/-/emanager/charge-battery successfully sent to vehicle!

2020-04-29 22:40:47.481 [DEBUG] [econnect.internal.VWWeConnectSession] - Sending command: https://www.portal.volkswagen-we.com//portal/delegate/dashboard/WVWZZZXXXXXXXXXXXX/-/vsr/get-request-status

2020-04-29 22:40:49.490 [DEBUG] [econnect.internal.VWWeConnectSession] - postJSONVWWeConnectAPI URL: https://www.portal.volkswagen-we.com//portal/delegate/dashboard/WVWZZZXXXXXXXXXXXX/-/vsr/get-request-status Fields: null Referer: https://www.portal.volkswagen-we.com/portal/delegate/dashboard/WVWZZZXXXXXXXXXXXX XCSRF:SjcZM5xx

2020-04-29 22:40:49.494 [DEBUG] [econnect.internal.VWWeConnectSession] - HTTP POST Request HttpRequest[POST //portal/delegate/dashboard/WVWZZZXXXXXXXXXXXX/-/vsr/get-request-status HTTP/1.1]@165e92c.

2020-04-29 22:40:49.695 [TRACE] [econnect.internal.VWWeConnectSession] - HTTP Response (200) Body:{"errorCode":"2"}

2020-04-29 22:40:49.698 [DEBUG] [.internal.handler.VWWeConnectHandler] - Content: {"errorCode":"2"}

2020-04-29 22:40:49.702 [DEBUG] [econnect.internal.VWWeConnectSession] - ErrorCode: 2

2020-04-29 22:40:49.706 [WARN ] [.internal.handler.VWWeConnectHandler] - Failed to request status for vehicle WVWZZZXXXXXXXXXXXX! HTTP response: 200 Response: {"errorCode":"2"}

2020-04-29 22:40:49.709 [WARN ] [.internal.handler.VWWeConnectHandler] - The vehicle WVWZZZXXXXXXXXXXXX failed to handle command https://www.portal.volkswagen-we.com//portal/delegate/dashboard/WVWZZZXXXXXXXXXXXX/-/emanager/charge-battery true

==> /var/log/openhab2/events.log <==

2020-04-29 22:40:57.131 [vent.ItemStateChangedEvent] - KebaState changed from 1970-01-01T00:00:03.000+0000 to 1970-01-01T00:00:02.000+0000

2020-04-29 22:40:59.233 [vent.ItemStateChangedEvent] - KebaState changed from 1970-01-01T00:00:02.000+0000 to 1970-01-01T00:00:03.000+0000

2020-04-29 22:41:07.564 [vent.ItemStateChangedEvent] - KebaSessionEnergy changed from 165.0 Wh to 175.0 Wh

2020-04-29 22:41:13.926 [vent.ItemStateChangedEvent] - KebaSessionEnergy changed from 175.0 Wh to 185.0 Wh

2020-04-29 22:41:20.090 [vent.ItemStateChangedEvent] - KebaSessionEnergy changed from 185.0 Wh to 195.0 Wh

2020-04-29 22:41:26.409 [vent.ItemStateChangedEvent] - KebaSessionEnergy changed from 195.0 Wh to 205.0 Wh

2020-04-29 22:41:29.138 [ome.event.ItemCommandEvent] - Item 'emanagerCharge' received command OFF

2020-04-29 22:41:29.145 [nt.ItemStatePredictedEvent] - emanagerCharge predicted to become OFF

2020-04-29 22:41:29.171 [vent.ItemStateChangedEvent] - emanagerCharge changed from ON to OFF

2020-04-29 22:41:32.434 [vent.ItemStateChangedEvent] - KebaSessionEnergy changed from 205.0 Wh to 215.0 Wh

2020-04-29 22:41:38.745 [vent.ItemStateChangedEvent] - KebaSessionEnergy changed from 215.0 Wh to 225.0 Wh

2020-04-29 22:41:42.462 [vent.ItemStateChangedEvent] - Temp_Wohnzimmer_EG changed from 23.8 to 23.82

2020-04-29 22:41:44.952 [vent.ItemStateChangedEvent] - KebaSessionEnergy changed from 225.0 Wh to 235.0 Wh

2020-04-29 22:41:51.068 [vent.ItemStateChangedEvent] - KebaSessionEnergy changed from 235.0 Wh to 245.0 Wh

Hi,
this binding looks promising to me, I already thought about developing something similiar for We Connect, We Connect Go, Skoda Connect and Audi Connect for all of them seems to be more or less identical API. But I didn’t have the time to start this project yet. May I ask you to have a look.at this IOBroker addon:

For me it looks like only small differences mainly in login process to the “API”/Website and some small differences in calling data. But I’m not to deep inside this things like you. Maybe it is possible to adapt your binding for Go, Skoda and Audi. I can offer to test it with my Skoda Kodiaq diesel.

Thanks in advantage
Johannes

Hi @AJ1979!

Thanks for testing the binding. As I’ve mentioned i do not own an electrical or hybrid VW so I have not been able to tests those parts myself. However currently I’m debugging this together with @thokroll and hopefully I will be able to publish a new jar-file with tested support, so please hang on! :slight_smile:

For me it looks like only small differences mainly in login process to the “API”/Website and some small differences in calling data

This looks to be based on the mobile app API and not the webbased API that my bindings uses. I’ve spent a lot of time getting this to work for my VW Tiguan and for the moment I would like to get this to work for other types of VW vehicles as well.

I fully understand the interest in having support for Audi and Skoda as well, but in my opinion it is better if someone who owns an Audi/Skoda developed a binding supporting them, since a very big part of getting everything to work properly is being able to test easily and that is my biggest challenge for the moment to support VW vehicles that have other engine types than my Tiguan, e.g. support for electric cars.

Maybe in the future we could have one binding to rule them all, but for now I will continue to improve support for VW vehicles in the VW We Connect binding.

One silly question on the pax logging config in the first post - i cannot make it split the logs to the new file - they still go into openhab.log - should the custom loggers come first in the config maybe? (i put them last)

when i do a openhab-cli showlogs - i do however see that it tails the vwweconnect.log file, but nothing goes into it :slight_smile:

/Chris

should the custom loggers come first in the config maybe? (i put them last)

Custom loggers first as in the example.

thanks, screwed up - didnt notice there was a entry further up with a different shortname for the binding :slight_smile:

Thanks to @Chris_Thomsen and @thokroll I’ve managed to improve support for hybrid/electrical cars. :slight_smile:

Original post is updated with new binding jar-file. Binding jar is now based on upcoming OH2.5.5 so if you have an old version of the binding jar-file in /usr/share/openhab2/addons folder you need to remove it before copying this new jar-file there.
Make sure to check in Karaf-console that you are running the correct binding version:

[18:04:24] openhabian@openhab:/usr/share/openhab2/addons$ openhab-cli console

Logging in as openhab
Password:  

                          __  _____    ____      
  ____  ____  ___  ____  / / / /   |  / __ )     
 / __ \/ __ \/ _ \/ __ \/ /_/ / /| | / __  | 
/ /_/ / /_/ /  __/ / / / __  / ___ |/ /_/ /      
\____/ .___/\___/_/ /_/_/ /_/_/  |_/_____/     
    /_/                        2.5.1
                               Release Build   

Hit '<tab>' for a list of available commands
and '[cmd] --help' for help on a specific command.
Hit '<ctrl-d>' or type 'system:shutdown' or 'logout' to shutdown openHAB.


openhab> bundle:list |grep -i vw                                                                                                                                                                            
398 │ Active    │  80 │ 2.5.5.202005051912      │ openHAB Add-ons :: Bundles :: VW We Connect Binding

I’ve added a number of new channels so you will need delete and re-discover your vehicle in PaperUI. If you can’t see all the channels in PaperUI, press the SHOW MORE button.

README is updated.

1 Like

Fixed a bug when vehicle image URL is null from API, original post updated with new binding jar-file.

Hello. Would refresh this topic: Is there anybody out there, who can make a binding for Skoda?
(Skoda connect). Maybe i can help a bit (i am not a good programer, but i have a Skoda :smile: )
Thanks

Hi out there,
the README is not accessible any more (HTTP404). As I’m very interested in this binding, would be very helpful to get the README for installation and configuration hints.

Thx in advance for any help.

Kind regards
Christian

Hi Christian!

I’ve now updated the URL to the README.
I’ve also opened up a PR for it, let’s hope I get some time to try to add it as an official binding in openHAB.

1 Like

This project sounds really interesting to me, but I’m kind of lost - where do I find the binding currently?
(Running OH 2.5.9 - 1)

Regards
Dirk

Hi! Dirk!

Nice that you find it interesting! :slight_smile:
You can find a link to the latest built jar-file in the first post in this thread!

BR,

/Janne

Hi Janne,

thank you, now I‘ve found it.

If anyone else runs in the same problem - the jar is located on google drive, currently the third last link in the popular links section of the first post.
(currently https://drive.google.com/file/d/1-mpdjqkkHoXgBK1Y4L3zu-pWs1Q5NCAR/view?usp=sharing, but this might change)

Regards
Dirk