ConnectedCar Binding myAudi, Volkswagen, VW ID, Skoda, Enyaq, Seat, Ford, WeCharge

Updated my config with your new build!

Some remarks:

  • distanceAdBlue: reports 32767, but my adBlue tank is not that big, I neeed to refill it after 13000km.
  • tempOutside: reports 2941
  • oilAmount: reports 1, what does this mean?

Door & window status are correct. Windows position is also ok (0=closed, 96=open :slight_smile:)

is the high range of an integer, you can suspect it means 100%

I suppose this -1
search the lig for the first occurrence of AdBlue after binding initialization and post the line here

that‘s dk = 20,95C
which unit do you see for the channel in PaperUI

good question, the APi says litre, but I think this is a status code

I learned in between
1=open
2=locked
3=closed

maybe it‘s better to use a strong channel with 3 options. What do you think?

I see these lines all over the logs:

[DEBUG] [nternal.handler.CarNetVehicleHandler] - Q3: MAINTENANCE_INTERVAL_AD_BLUE_RANGE=32767km (channel general#distanceAdBlue)
[DEBUG] [nternal.handler.CarNetVehicleHandler] - Channel general#distanceAdBlue not found
Line 57749: 2020-07-10 10:07:23.190 [DEBUG] [nternal.handler.CarNetVehicleHandler] - VIN: MAINTENANCE_INTERVAL_AD_BLUE_RANGE=32767km (channel general#distanceAdBlue)
[DEBUG] [nternal.handler.CarNetVehicleHandler] - Updading channel carnet:vehicle:myAudi:VIN:general#distanceAdBlue with value 32767
[DEBUG] [nternal.handler.CarNetVehicleHandler] - VIN: Updating channel general#distanceAdBlue with 32767.0 km

in the events log I saw these logs from the last few days:

Line 92641: 2020-07-01 15:07:14.441 [vent.ItemStateChangedEvent] - myAudi_distanceAdBlue changed from 1300 to 1200
Line 98511: 2020-07-02 17:31:56.226 [vent.ItemStateChangedEvent] - myAudi_distanceAdBlue changed from 1200 to 1100
Line 106959: 2020-07-04 17:13:32.493 [vent.ItemStateChangedEvent] - myAudi_distanceAdBlue changed from 1100 to 850
Line 123301: 2020-07-07 18:37:32.897 [vent.ItemStateChangedEvent] - myAudi_distanceAdBlue changed from 850 to 32767
Line 132046: 2020-07-09 13:45:53.659 [vent.ItemStateChangedEvent] - myAudi_distanceAdBlue changed from NULL to 32767
Line 132215: 2020-07-09 13:53:37.141 [vent.ItemStateChangedEvent] - myAudi_distanceAdBlue changed from NULL to 32767.0 km
Line 1152: 2020-07-10 15:51:00.785 [vent.ItemStateChangedEvent] - myAudi_distanceAdBlue changed from NULL to 32767.0 km
Line 3175: 2020-07-10 16:44:09.920 [vent.ItemStateChangedEvent] - myAudi_distanceAdBlue changed from NULL to 32767.0 km

The values before 32767 are correct, and I refilled my adBlue that day (07/07). In the myAudi app, I only see that adBlue is good for > 2400km. I’ll keep an eye on when the value changes. (the lowest value I can find in my logs is 2100)

You mean this ? Number:Temperature
image

A door can be 1, 2 or 3? When it’s locked, it’s also closed, so for me it’s fine to give a door one of these 3 values.

No, what‘s show in PaperUI:Control?

does it show xxx dK or xxx C?

Maybe 32767 means „full, need some time to predict consumption“

No dK or C, just the numbers.

edit: my fault, I added everything with text files and added [%s] instead of [%.1f °C] in the label. Is working fine now!

yep, my App displays „> 2.400 km“ that means the number becomes valid only when < 2.400 km

Did someone tested having imperial units (miles, F, gal)?

new build

  • a good bunch of channels is now advanced and not visible by default
  • new channels vehicleLocked, maintenanceRequired, doorsClosed and tiresOk aggregate the sub channels

vehicleLocked: All doors and trunk have to be locked, OFF=at least one door is unlocked
maintenanceRequired: ON=inspection or oil alarm, or ad blue < 1000 km -> some kind of maintenance is required
doorsClosed: Alle doors are closed
tiresOk: Tire pressure for all tires is ok

please delete and re-discover the vehicle things

any feedback on channel layout and advanced yes/no?

Here is the log from the new build

2020-07-13 11:16:14.973 [vent.ItemStateChangedEvent] - AudiQ7_RangePrimaryRange changed from NULL to 35157480.31496062992125984251968504 in

2020-07-13 11:16:14.974 [vent.ItemStateChangedEvent] - AudiQ7_RangePrimaryFueType changed from NULL to 6

2020-07-13 11:16:14.975 [vent.ItemStateChangedEvent] - AudiQ7_RangeSecondaryRange changed from NULL to UNDEF

2020-07-13 11:16:14.976 [vent.ItemStateChangedEvent] - AudiQ7_RangeSecondaryFuelType changed from NULL to 0

2020-07-13 11:16:14.978 [vent.ItemStateChangedEvent] - AudiQ7_GeneralFuelPercentage changed from NULL to 100.0 %

2020-07-13 11:16:14.986 [vent.ItemStateChangedEvent] - AudiQ7_DoorsDoorFrontLeftLocked changed from NULL to OFF

2020-07-13 11:16:14.992 [vent.ItemStateChangedEvent] - AudiQ7_DoorsDoorFrontLeftState changed from NULL to ON

2020-07-13 11:16:14.995 [vent.ItemStateChangedEvent] - AudiQ7_DoorsDoorFrontLeftSafety changed from NULL to 1

2020-07-13 11:16:14.997 [vent.ItemStateChangedEvent] - AudiQ7_DoorsDoorRearLeftLocked changed from NULL to OFF

2020-07-13 11:16:14.998 [vent.ItemStateChangedEvent] - AudiQ7_DoorsDoorRearLeftState changed from NULL to ON

2020-07-13 11:16:14.999 [vent.ItemStateChangedEvent] - AudiQ7_DoorsDoorRearLeftSafety changed from NULL to 1

2020-07-13 11:16:15.001 [vent.ItemStateChangedEvent] - AudiQ7_DoorsDoorFrontRightLocked changed from NULL to OFF

2020-07-13 11:16:15.002 [vent.ItemStateChangedEvent] - AudiQ7_DoorsDoorFrontRightState changed from NULL to ON

2020-07-13 11:16:15.004 [vent.ItemStateChangedEvent] - AudiQ7_DoorsDoorFrontRightSafety changed from NULL to 1

2020-07-13 11:16:15.005 [vent.ItemStateChangedEvent] - AudiQ7_DoorsDoorRearRightLocked changed from NULL to OFF

2020-07-13 11:16:15.006 [vent.ItemStateChangedEvent] - AudiQ7_DoorsDoorRearRightState changed from NULL to ON

2020-07-13 11:16:15.014 [vent.ItemStateChangedEvent] - AudiQ7_DoorsDoorRearRightSafety changed from NULL to 1

2020-07-13 11:16:15.015 [vent.ItemStateChangedEvent] - AudiQ7_DoorsTrunkLidLocked changed from NULL to OFF

2020-07-13 11:16:15.016 [vent.ItemStateChangedEvent] - AudiQ7_DoorsTrunkLidState changed from NULL to ON

2020-07-13 11:16:15.017 [vent.ItemStateChangedEvent] - AudiQ7_StatusTrunkLidState changed from NULL to 1

2020-07-13 11:16:15.018 [vent.ItemStateChangedEvent] - AudiQ7_DoorsHoodLocked changed from NULL to ON

2020-07-13 11:16:15.020 [vent.ItemStateChangedEvent] - AudiQ7_DoorsHoodState changed from NULL to ON

2020-07-13 11:16:15.021 [vent.ItemStateChangedEvent] - AudiQ7_StatusHoodState changed from NULL to 1

2020-07-13 11:16:15.022 [vent.ItemStateChangedEvent] - AudiQ7_WindowsWindowFrontLeftState changed from NULL to 0

2020-07-13 11:16:15.023 [vent.ItemStateChangedEvent] - AudiQ7_WindowsWindowFrontLeftPos changed from NULL to 97.0

2020-07-13 11:16:15.024 [vent.ItemStateChangedEvent] - AudiQ7_WindowsWindowRearLeftState changed from NULL to 1

2020-07-13 11:16:15.025 [vent.ItemStateChangedEvent] - AudiQ7_WindowsWindowRearLeftPos changed from NULL to 0.0

2020-07-13 11:16:15.026 [vent.ItemStateChangedEvent] - AudiQ7_WindowsWindowFrontRightState changed from NULL to 0

2020-07-13 11:16:15.028 [vent.ItemStateChangedEvent] - AudiQ7_WindowsWindowFrontRightPos changed from NULL to 97.0

2020-07-13 11:16:15.029 [vent.ItemStateChangedEvent] - AudiQ7_WindowsWindowRearRightState changed from NULL to 1

2020-07-13 11:16:15.030 [vent.ItemStateChangedEvent] - AudiQ7_WindowsWindowRearRightPos changed from NULL to 0.0

2020-07-13 11:16:15.031 [vent.ItemStateChangedEvent] - AudiQ7_DoorsCovertableTopState changed from NULL to 0

2020-07-13 11:16:15.032 [vent.ItemStateChangedEvent] - AudiQ7_StatusRoofMotorCoverState changed from NULL to 0

2020-07-13 11:16:15.042 [vent.ItemStateChangedEvent] - AudiQ7_StatusRoofMotorCoverPos changed from NULL to 85.0

2020-07-13 11:16:15.043 [vent.ItemStateChangedEvent] - AudiQ7_StatusRoofRearMotorCoverState changed from NULL to 1

2020-07-13 11:16:15.044 [vent.ItemStateChangedEvent] - AudiQ7_StatusRoofRearMotorCoverPos changed from NULL to 0.0

2020-07-13 11:16:15.045 [vent.ItemStateChangedEvent] - AudiQ7_TiresTirePresFrontLeft changed from NULL to 1

2020-07-13 11:16:15.046 [vent.ItemStateChangedEvent] - AudiQ7_TiresTireDesiredFrontLeft changed from NULL to 1

2020-07-13 11:16:15.048 [vent.ItemStateChangedEvent] - AudiQ7_TiresTirePresRearLeft changed from NULL to 1

2020-07-13 11:16:15.049 [vent.ItemStateChangedEvent] - AudiQ7_TiresTirePresFrontRight changed from NULL to 1

2020-07-13 11:16:15.050 [vent.ItemStateChangedEvent] - AudiQ7_TiresTirePresRearRight changed from NULL to 1

obviously the range in inch is a little bit strange, please provide the following log extract
when the binding starts it initially shows all metrics received by the API with the unit
should look similar to this:

2020-07-12 10:23:09.342 [DEBUG] org.openhab.binding.carnet.internal.handler.CarNetVehicleHandler:370   | XXXXXXXXXXXX: UTC_TIME_STATUS=echo (channel status#)
2020-07-12 10:23:09.342 [DEBUG] org.openhab.binding.carnet.internal.handler.CarNetVehicleHandler:370   | XXXXXXXXXXXX: KILOMETER_STATUS=8260 (channel status#kilometerStatus)
2020-07-12 10:23:09.342 [DEBUG] org.openhab.binding.carnet.internal.handler.CarNetVehicleHandler:375   | Updading channel carnet:vehicle:d842e8b3:XXXXXXXXXXXX:status#kilometerStatus with value 8260
2020-07-12 10:23:09.348 [DEBUG] org.openhab.binding.carnet.internal.handler.CarNetVehicleHandler:426   | XXXXXXXXXXXX: Updating channel status#kilometerStatus with 8260.0 km
2020-07-12 10:23:09.351 [DEBUG] org.openhab.binding.carnet.internal.handler.CarNetVehicleHandler:370   | XXXXXXXXXXXX: MAINTINT_DISTANCE_TO_OIL_CHANGE=-21800km (channel maintenance#distanceOilChange)
2020-07-12 10:23:09.351 [DEBUG] org.openhab.binding.carnet.internal.handler.CarNetVehicleHandler:375   | Updading channel carnet:vehicle:d842e8b3:XXXXXXXXXXXX:maintenance#distanceOilChange with value -21800
2020-07-12 10:23:09.351 [DEBUG] org.openhab.binding.carnet.internal.handler.CarNetVehicleHandler:426   | XXXXXXXXXXXX: Updating channel maintenance#distanceOilChange with -21800.0 km
2020-07-12 10:23:09.353 [DEBUG] org.openhab.binding.carnet.internal.handler.CarNetVehicleHandler:370   | XXXXXXXXXXXX: MAINTINT_TIME_TO_OIL_CHANGE=-511d (channel maintenance#intervalOilChange)
2020-07-12 10:23:09.353 [DEBUG] org.openhab.binding.carnet.internal.handler.CarNetVehicleHandler:375   | Updading channel carnet:vehicle:d842e8b3:XXXXXXXXXXXX:maintenance#intervalOilChange with value -511
2020-07-12 10:23:09.353 [DEBUG] org.openhab.binding.carnet.internal.handler.CarNetVehicleHandler:426   | XXXXXXXXXXXX: Updating channel maintenance#intervalOilChange with -511.0 day
2020-07-12 10:23:09.355 [DEBUG] org.openhab.binding.carnet.internal.handler.CarNetVehicleHandler:370   | XXXXXXXXXXXX: MAINTINT_DIST_TO_INSPECTION=-21800km (channel general#distanceToInspection)
2020-07-12 10:23:09.355 [DEBUG] org.openhab.binding.carnet.internal.handler.CarNetVehicleHandler:375   | Updading channel carnet:vehicle:d842e8b3:XXXXXXXXXXXX:general#distanceToInspection with value -21800
2020-07-12 10:23:09.355 [DEBUG] org.openhab.binding.carnet.internal.handler.CarNetVehicleHandler:426   | XXXXXXXXXXXX: Updating channel general#distanceToInspection with -21800.0 km
2020-07-12 10:23:09.356 [DEBUG] org.openhab.binding.carnet.internal.handler.CarNetVehicleHandler:370   | XXXXXXXXXXXX: MAINTINT_TIME_TO_INSPECTION=-511d (channel maintenance#timeToInspection)
2020-07-12 10:23:09.357 [DEBUG] org.openhab.binding.carnet.internal.handler.CarNetVehicleHandler:375   | Updading channel carnet:vehicle:d842e8b3:XXXXXXXXXXXX:maintenance#timeToInspection with value -511
2020-07-12 10:23:09.357 [DEBUG] org.openhab.binding.carnet.internal.handler.CarNetVehicleHandler:426   | XXXXXXXXXXXX: Updating channel maintenance#timeToInspection with -511.0 day
2020-07-12 10:23:09.358 [DEBUG] org.openhab.binding.carnet.internal.handler.CarNetVehicleHandler:370   | XXXXXXXXXXXX: WARNING_OIL_CHANGE=0 (channel maintenance#oilWarning)

...

it’s a long sequence, please extract that information and post it here (as a text file)

carnet.log (33.2 KB)

Logs attached

HI,

thanks for this great binding! I have an Audi E-Tron and and tried the latest jar version. For the moment it seems working despite there are some items I cannot display.

In my Logs I see:
2020-07-20 11:36:25.564 [INFO ] [nternal.handler.CarNetVehicleHandler] - Updating XXXXXXXXXX: STATE_OF_CHARGE=65% (channel gas#chargingState)

I’m trying in my audi.items file:
Number AudiGasRangeProzentString "Ladung Gas Stage [%s]" <qualityofservice> (gAudi) {channel="carnet:vehicle:XXXXXX:XXXXXXXXXX:gas#chargingState"}

Unfortunately it doesn’t show any value! I also tried, %d etc
 does anybody has any idea or can share some ideas how to display the value in Basic UI?

Paper-UI shows me the type would be “Switch”. Even this type doesn’t work 


In general:
It would be great getting some examples for files.items how you display all those values i.e in a Sitemap.

Cheers,
Alex

you are right, obviously it’s not a switch. I changed the channel type to Number:Dimensionless (percent). Check the new build, you need to delete and re-discover the thing. I renamed the channel to chargingLevel. Then check PaperUI. Please note: the “%” ist not part of the number. OH adds that dynamically, in a rule you should use Number.

When the bindings starts you should see lines in the log like

2020-07-12 10:19:45.899 [DEBUG] org.openhab.binding.carnet.internal.handler.CarNetVehicleHandler:370   | XXXXXXXX: UTC_TIME_STATUS=echo (channel status#)
2020-07-12 10:19:45.899 [DEBUG] org.openhab.binding.carnet.internal.handler.CarNetVehicleHandler:370   | XXXXXXXXXXXXX: KILOMETER_STATUS=8260 (channel status#kilometerStatus)
2020-07-12 10:19:45.900 [DEBUG] org.openhab.binding.carnet.internal.handler.CarNetVehicleHandler:375   | Updading channel carnet:vehicle:d842e8b3:XXXXXXXXXXXXX:status#kilometerStatus with value 8260
2020-07-12 10:19:45.904 [DEBUG] org.openhab.binding.carnet.internal.handler.CarNetVehicleHandler:426   | XXXXXXXXXXXXX: Updating channel status#kilometerStatus with 8260.0 km
2020-07-12 10:19:45.906 [DEBUG] org.openhab.binding.carnet.internal.handler.CarNetVehicleHandler:370   | XXXXXXXXXXXXX: MAINTINT_DISTANCE_TO_OIL_CHANGE=-21800km (channel maintenance#distanceOilChange)

Could you please provide me the extract from your log. Then I could check which other values a provided for the E-Tron and check if we are missing channels.

Please keep in mind: We still ned to understand more what’s coming from the API (no documentation). I made assumptions based on names, but I have no electrical car, so I cannot test myself.

Today my oil warning went on, which
a) indicates that the logic works in the binding and
b) the “maintenance required” indicator went ON, so this also works

OH also reminded me that my car is not locked (using the carLocked = OFF channel) :slight_smile:

Please help to verify all channels and let me know when you find unsupported ones or could help to decode those IDs:

Unknown data field  0x0204FFFFFF.0x0204040004, value=1 null
Unknown data field  0x0204FFFFFF.0x02040C0002, value=null null
Unknown data field  0x030103FFFF.0x0301030003, value=0 %
Unknown data field  0x030103FFFF.0x0301030004, value=22 km/h
Unknown data field  0x030103FFFF.0x030103000B, value=0 null

Check the log for more of those messages.

@markus7017 Thanks for your reply!
I tried and unfortunately it’s still not working. In the event.log I see:

10:06:01.535 [INFO ] [internal.handler.CarNetVehicleHandler] - XXXXXXX: CHARGING_LEVEL_PERCENT=59% (channel range#chargingLevel)

There is no exception in the log at all. In my audi.items I filled:

Number:Dimensionless AudiGasRangeProzent              "Ladung Gas Percentage [%d]"               <qualityofservice> (gAudi) {channel="carnet:vehicle:XXXXX:XXXXX:range#gasPercentage"}  
Number:Dimensionless AudiGasRangeProzentString        "Ladung Charging Level [%d]"              <qualityofservice> (gAudi) {channel="carnet:vehicle:XXXXX:XXXXX:range#chargingLevel"}  

here is the response from API:

{"id":"0x0301030002","tsCarSentUtc":"2020-07-20T12:36:59Z","tsCarSent":"2000-01-01T00:00:00","tsCarCaptured":"2000-01-01T00:00:00","tsTssReceivedUtc":"2020-07-20T12:37:02Z","milCarCaptured":0,"milCarSent":0,"value":"59","unit":"%","textId":"soc_ok"}

Any idea what I can do?

The result is showing “only”:

@markus7017

It seems the distanceAdBlue shows up an error. Could you check what’s going wrong there? Seems like an parsing error:

10:18:25.088 [DEBUG] [internal.handler.CarNetVehicleHandler] - Updading channel carnet:vehicle:XXXXXX:maintenance#distanceAdBlue with value 

10:18:25.090 [DEBUG] [internal.handler.CarNetVehicleHandler] - XXXXX: Updating channel maintenance#distanceAdBlue with UNDEF

10:18:25.093 [WARN ] [internal.handler.CarNetVehicleHandler] - XXXXXXX: General Error: null

java.lang.NumberFormatException: null

at java.lang.Integer.parseInt(Integer.java:542) ~[?:1.8.0_252]

at java.lang.Integer.parseInt(Integer.java:615) ~[?:1.8.0_252]

at org.openhab.binding.carnet.internal.handler.CarNetVehicleHandler.checkMaintenance(CarNetVehicleHandler.java:424) ~[?:?]

at org.openhab.binding.carnet.internal.handler.CarNetVehicleHandler.updateVehicleStatus(CarNetVehicleHandler.java:397) ~[?:?]

at org.openhab.binding.carnet.internal.handler.CarNetVehicleHandler.lambda$1(CarNetVehicleHandler.java:548) ~[?:?]

at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_252]

at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) [?:1.8.0_252]

at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) [?:1.8.0_252]

at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) [?: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]

first: don’t use .things/.items file in this situation, it adds unnecessary complexity and various sources of faults,

ich glaube, wir können Deutsch sprechen :wink:

Bitte erst mal alles nur ĂŒber PaperUI

  • Fahrzeug discovern, hinzufĂŒgen
  • PaperUI:Control sollte nun die korrekten Were anzeigen

10:06:01.535 [INFO ] [internal.handler.CarNetVehicleHandler] - XXXXXXX: CHARGING_LEVEL_PERCENT=59% (channel range#chargingLevel)

ist keine Zeile aus event.log, die kommt aus dem Binding. Das ist das, was die API zurĂŒck liefert und vom Binding in ein Channel Update umgesetzt werden muss. In openhab.log muss es dann eine Zeile analog zu

Updading channel carnet:vehicle:XXXXXX:maintenance#distanceAdBlue with value 

geben-

Ic habe den Build aktualisiert, prĂŒft, ob der Variablenstring leer ist, bitte prĂŒfen.

Bitte keine Log-Schnipsel, damit kann ich nicht wirklich was anfangen. Wenn Du ein Problem siehst immer +/- 20 Zeilen pasten, damit ich sehen kann, was vorher passier ist.

Hello Markus,
this week Audi did an update in myAudi. Since then, CarNet Account cannot connect anymore.
(I am in Germany)
Are you aware of that? The App and the portal is working again.

hmm, you are eight. A short test outlined a http header auth problem. I’ll need to check that in detail, which takes time.

fyi: @openhabbe and me started to look into the issue. Def. they change the authentication to create the various tokens. We’ll update on progress

2 Likes