openHAB Connected Car Binding for Audi, VW, Skoda and SEAT
This binding integrates various connected car services into openHAB and supports different brands. The binding provides a bunch of status data (like milage, maintenance data, error indicators etc.), geo data for car position as well as some control functions. Depending on brand and car model available information and actions differ.
Note that the VW ID. uses a different account thing than other Volkswagen and same for the Skoda Enyaq compared to other Skoda models.
Thing
Description
cnvehicle
CarNet Thing (Audi, VW, Skoda, SEAT
idvehicle
VW ID. vehicle, e.g. ID.3/ID.4
sevehicle
Skoda Enyaq vehicle
fordvehicle
Ford vehicle
wcbox
VW Wallbox with WeCharge service
Some verified vehicle types:
Brand
Model
Year
Type
Market
Doorlock
Clima
Preheat
Ventilation
WinH
HF
Trips
GeoA
SpeedA
Notes
Audi
A6
2020
Diesel
DE/DE
yes
n/a
no
no
no
no
no
no
no
Various services not available even with active license
Audi
Q3 Sportback
2020
Gas
DE/DE
Skoda
Superb
2020
Hybrid
DE/CH
Volkswagen
Arteon
2021
DE/
Volkswagen
eGolf
2020
Electrical
DE/DE
no
yes
n/a
Volkswagen
eGolf
2020
Electrical
DE/DE
yes
yes
n/a
n/a
yes*
*Flash only, no honk
Volkswagen
eUp
Electrical
DE/DE
Volkswagen
Passat GTE
2016
Hybrid
DE/NL
n/a
n/a
n/a
Volkswagen
Passat Va
2016
Diesel
DE/NL
yes
n/a
n/a
Volkswagen
Tiguan
2021
Diesel
DE/DE
yes
n/a
yes
Volkswagen
Tiguan
2020
Gas
DE/SE
yes
n/a
yes
yes
n/a
yes
yes
Volkswagen
T-Roc Cabrio
2020
DE/
WinH = Window Heat, HF=Honk and Flash; GeoA = Geo Alerts|SpedA = Speed Alerts
blank=unknown/untested, yes=feature available and verified, no=feature available, but not supported/doesnât work; n/a=feature not available
Feedback and ideas are always welcome Please help to harden the binding by validating channel data and control functions. Let me know if you find out more brands supporting CarNet.
but âof courseâ the VW We Connect API is not the same as the myAudi one. Nevertheless there might be overlaps (e.g. channel definitions, general stuff) so makes sense to check the code. So thx.
Could everyone else contribute knowing details on the myAudi API? I found some stuff on GitHub, some is out-dated, some does HTML parsing. I seems also Setze Differenz between US and EU APIs, which makes it even more intransparent.
ok, great. Which type of Audi or VW do you have? Electrical or gas?
Currently Iâm focusing on Audi/myAudi. VW seems to have the same API on different URLs(donât mix with We-Connect, tatâs something completely different and not compatible to the myAudi API) with some minor inconsistencies, which could be handled dynamically.
Iâm already reading 25 status values and working on creating the channels dynamically. That works, but due to the high number of channels (even not mapping all values) I want to group the, and that doesnât work so far. Once I managed this I could provide a first build.
Something Iâve struggled with this knowing what data/features are available for what model year with Audi Connect. I bought this used a year ago and had been using my phone as a hot spot to connect my Audi to the internet while I was in the car, but now trying to get a SIM set up.
Currently only Audi is supported (mine is a Gas car)
Supported countries are DE, BE (let me know if you want others)
Currently only status values are implemented, no control functions
Maybe not all status values
Installation
enable logging in OH console: log:set TRACE org.openhab.binding.carnet
copy the jar into your addons folder
create a CarNet Account Thing (with + in the Inbox oder Things view), enter credentials
this should bring a new thing getting ONLINE
Run the discovery from the Inbox, this brings in the Vehicle things
enjoy tons of channels, select those you need
Check log for errors and report them here.
fyi: The channel structure might change from build to build, itâs a alpha version!
First step should be to verify if the channels make sense, show proper values, the item type could be changed to be more meaningful (e.g. a Switch rather than 0/1 number).
Same for me. After an obviously successful login (VIN on the console output is the right), the Thing status stays on UNKNOWN and the console output I find looks like this:
==> /var/log/openhab2/openhab.log <==
2020-05-17 11:27:36.876 [WARN ] [mmon.WrappedScheduledExecutorService] - Scheduled runnable ended with an exception:
com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected a string but was BEGIN_OBJECT at line 1 column 11 path $.error
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:224) ~[?:?]
at com.google.gson.Gson.fromJson(Gson.java:888) ~[?:?]
at com.google.gson.Gson.fromJson(Gson.java:853) ~[?:?]
at com.google.gson.Gson.fromJson(Gson.java:802) ~[?:?]
at com.google.gson.Gson.fromJson(Gson.java:774) ~[?:?]
at org.openhab.binding.carnet.internal.api.CarNetApiResult.fillFromResponse(CarNetApiResult.java:86) ~[?:?]
at org.openhab.binding.carnet.internal.api.CarNetApiResult.<init>(CarNetApiResult.java:55) ~[?:?]
at org.openhab.binding.carnet.internal.api.CarNetApi.request(CarNetApi.java:207) ~[?:?]
at org.openhab.binding.carnet.internal.api.CarNetApi.httpGet(CarNetApi.java:164) ~[?:?]
at org.openhab.binding.carnet.internal.api.CarNetApi.getVehicleDetails(CarNetApi.java:106) ~[?:?]
at org.openhab.binding.carnet.internal.handler.CarNetAccountHandler.initializeThing(CarNetAccountHandler.java:118) ~[?:?]
at org.openhab.binding.carnet.internal.handler.CarNetAccountHandler.lambda$0(CarNetAccountHandler.java:96) ~[?:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ~[?:1.8.0_252]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[?:1.8.0_252]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) ~[?:1.8.0_252]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) ~[?:1.8.0_252]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_252]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_252]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_252]
Caused by: java.lang.IllegalStateException: Expected a string but was BEGIN_OBJECT at line 1 column 11 path $.error
at com.google.gson.stream.JsonReader.nextString(JsonReader.java:825) ~[?:?]
at com.google.gson.internal.bind.TypeAdapters$16.read(TypeAdapters.java:401) ~[?:?]
at com.google.gson.internal.bind.TypeAdapters$16.read(TypeAdapters.java:389) ~[?:?]
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.read(ReflectiveTypeAdapterFactory.java:129) ~[?:?]
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:220) ~[?:?]
... 18 more
==> /var/log/openhab2/events.log <==
I quickly replaced the jar via my phone and the thing is online now (i have to look in the logs to see if this new jar solved it, of if it was a matter of time). I was also able to add the vehicle. Iâll have a look later today to all channels.
Quick look to the channels: I need to select a profile, but the drop down is empty. The channel for VIN was working out of the box. I normally use textual config, so maybe Iâm missing something (Will try text config this evening)
New jar seems to be working. CarNet Thing was online, car has been discovered and appeared in the inbox and has 1 channel for VIN. In the Logs I see many more measurements, like tire pressure, window / door lock status etc.
Hi @markus7017,
even after reloading the page several times, there are no additional channels beside VIN. On the log file there is a long list of debug entries, showing fetched information from the car and an obviously unsuccessful attempt to assign to a not existing channel.
2020-05-18 20:32:57.965 [INFO ] [nternal.handler.CarNetVehicleHandler] - Updating WAUZZxxxxxxxxxx: KILOMETER_STATUS=43182 (channel status#kilometerStatus)
2020-05-18 20:32:57.968 [DEBUG] [nternal.handler.CarNetVehicleHandler] - Channel status#kilometerStatus not found
Yesterday I also saw the channels, and after I did some reconfig, they were gone. But now, after saving the config again, all channels appear again.
I already did the textual config for the carNet account Thing carnet:account:myAudi "myAudi Account" @ "Audi" [ user="wxxxxxx@mail.com", password="password", brand="Audi", country="BE"]
The vehicle is configured via paperUI and the items by textual config (canât select profile in paperUI, and in textual config, this is not an issue)