Skoda Connect

Okay, and is this something Skoda can activate? It’s a very recent car (6 months), so this should be possible I would think. Or is this only active in some countries ? (I live in Belgium btw)

I’m getting the same error.
I think that the problem is that my subscription isn’t activated anymore.
But strange thing is, that the error is same as SpeedMaxX got, but he probably had active Skoda subscription going.

Proposed solution is that, the add-on could still start, but it should clearly state that the subscription to Skoda connect is needed for it to work properly?

Logger: homeassistant.setup
Source: custom_components/skodaconnect/__init__.py:167
First occurred: 28. detsember 2020 23:46:55 (1 occurrences)
Last logged: 28. detsember 2020 23:46:55

Error during setup of component skodaconnect
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/setup.py", line 213, in _async_setup_component
    result = await task
  File "/config/custom_components/skodaconnect/__init__.py", line 227, in async_setup
    return await update(utcnow())
  File "/config/custom_components/skodaconnect/__init__.py", line 218, in update
    discover_vehicle(vehicle)
  File "/config/custom_components/skodaconnect/__init__.py", line 167, in discover_vehicle
    dashboard = vehicle.dashboard(
  File "/usr/local/lib/python3.8/site-packages/skodaconnect/vehicle.py", line 171, in dashboard
    return Dashboard(self, **config)
  File "/usr/local/lib/python3.8/site-packages/skodaconnect/dashboard.py", line 803, in __init__
    self.instruments = [
  File "/usr/local/lib/python3.8/site-packages/skodaconnect/dashboard.py", line 806, in <listcomp>
    if instrument.setup(vehicle, **config)
  File "/usr/local/lib/python3.8/site-packages/skodaconnect/dashboard.py", line 30, in setup
    if not self.is_supported:
  File "/usr/local/lib/python3.8/site-packages/skodaconnect/dashboard.py", line 67, in is_supported
    if hasattr(self.vehicle, supported):
  File "/usr/local/lib/python3.8/site-packages/skodaconnect/vehicle.py", line 195, in is_last_connected_supported
    if self.attrs.get('StoredVehicleDataResponse', {}).get('vehicleData', {}).get('data', {})[0].get('field', {})[0].get('tsCarSentUtc', []):
KeyError: 0

I would think that it’s available for all countries but I’m not sure.
You could try and login to the web app for skoda connect and explore if there’s anything you can activate there. For me everything was activated from day one.

I got plans for making this happen but not implemented yet. There’s a few api endpoints I haven’t explored yet that might tell what functions are available.
In test branch I have the activated/deactivated property of the subscription but haven’t decided how to organize the checks.

Hey Yves, je moet dat idd eerst laten activeren bij de Skoda dealer. Ik ben daar terug voor moeten langsgaan…

1 Like

I noticed this ERROR in the logs today:

Logger: homeassistant.util.logging
Source: util/logging.py:108
First occurred: 4:48:04 PM (1 occurrences)
Last logged: 4:48:04 PM

Exception in see_vehicle when dispatching 'skodaconnect.updated': () Traceback (most recent call last): File "/config/custom_components/skodaconnect/device_tracker.py", line 35, in see_vehicle gps=instrument.state, File "/usr/local/lib/python3.8/site-packages/skodaconnect/dashboard.py", line 291, in state state = super().state or {} File "/usr/local/lib/python3.8/site-packages/skodaconnect/dashboard.py", line 58, in state return self.vehicle.get_attr(self.attr) File "/usr/local/lib/python3.8/site-packages/skodaconnect/vehicle.py", line 166, in get_attr return find_path(self.attrs, attr) File "/usr/local/lib/python3.8/site-packages/skodaconnect/utilities.py", line 86, in find_path return find_path(src[path[0]], path[1:]) KeyError: 'position'

Additionally, I’m seen a number of new log entries for many endpoints, although the integration has worked well so far.

Logger: skodaconnect.api
Source: /usr/local/lib/python3.8/site-packages/skodaconnect/api.py:382
First occurred: 8:46:22 PM (15 occurrences)
Last logged: 8:46:29 PM

Logger: skodaconnect.api
Source: /usr/local/lib/python3.8/site-packages/skodaconnect/api.py:382
First occurred: 8:46:22 PM (15 occurrences)
Last logged: 8:46:29 PM
Could not fetch carportData, error: 401, message="Unauthorized", url=URL("https://msg.volkswagen.de/fs-car/promoter/portfolio/v1/skoda/CZ/vehicle/TMBJR9XXXX/carportdata")

Is that something you have seen before @Farfar @lendy007?

Hard to say, could be as simple as the VW Group servers not working fully. If you get an unauthorized then the integration should log you out and back in (if I got it right :grimacing:) but also you should get an error for all api endpoints if the tokens are invalid/expired.
So my guess is temporary issues with the server if you didn’t have any issues with any other endpoint.

Thanks @Farfar. As you can see in the attached image, it happens for a lot of endpoints.

The weird thing tough is that the integration appears to function well : updates the states correctly (range, position, etc) and trigger my automations.

If you look in the logfile, the complete one. Does this happen very often or perhaps once every hour or so?

Hi,

I configured the integration for my Superb IV with skoda connect and it shows the states for many sensors, thanks to the devs.
Unfortunately the device_tracker sensor (position?!?) is missing. I also can´t active the resources “vehicleMoving” and “parkingTime”. Do i have to activate something somewhere?

Thanks @farfar. It does happen every 60/90 minutes or so. For each of these periods, I do see hundreds of failed requests. This is odd as integration seems to be functioning well and triggering automations.

I added a more important part of the log file for your review on pastebin : https://pastebin.com/RBiNqCxk

Hi @lendy007 , I would also be interested if it’s fully working for Skoda Superb iV (plug-in hybrid).

I just tested your add-on:

  1. installed add-on using HACS
  2. defined entries in configuration.yaml (except resources)
  3. restarted HA

Finally I could see all (supported?) entities in HA. Interestingly no device has been created in HA.

When listing all available entities, it looks like this:

Unfortunately a few entities are missing (like device tracker, location information). But the logs show that it tries to get more (e.g. “Getting location of Superb iV”).

DEBUG (MainThread) [custom_components.skodaconnect] Updating data from skoda connect
DEBUG (MainThread) [custom_components.skodaconnect.lock] Getting state of door_locked
DEBUG (MainThread) [custom_components.skodaconnect.lock] Getting state of trunk_locked
DEBUG (MainThread) [custom_components.skodaconnect.switch] Getting state of electric_climatisation
DEBUG (MainThread) [custom_components.skodaconnect.switch] Getting state of charging
DEBUG (MainThread) [custom_components.skodaconnect.switch] Getting state of window_heater
DEBUG (MainThread) [custom_components.skodaconnect.sensor] Getting state of distance
DEBUG (MainThread) [custom_components.skodaconnect.sensor] Getting state of battery_level
DEBUG (MainThread) [custom_components.skodaconnect.sensor] Getting state of fuel_level
DEBUG (MainThread) [custom_components.skodaconnect.sensor] Getting state of service_inspection
DEBUG (MainThread) [custom_components.skodaconnect.sensor] Getting state of service_inspection_distance
DEBUG (MainThread) [custom_components.skodaconnect.sensor] Getting state of oil_inspection
DEBUG (MainThread) [custom_components.skodaconnect.sensor] Getting state of oil_inspection_distance
DEBUG (MainThread) [custom_components.skodaconnect.sensor] Getting state of last_connected
DEBUG (MainThread) [custom_components.skodaconnect.sensor] Getting state of parkingTime
DEBUG (MainThread) [custom_components.skodaconnect.sensor] Getting state of charging_time_left
DEBUG (MainThread) [custom_components.skodaconnect.sensor] Getting state of electric_range
DEBUG (MainThread) [custom_components.skodaconnect.sensor] Getting state of combustion_range
DEBUG (MainThread) [custom_components.skodaconnect.sensor] Getting state of combined_range
DEBUG (MainThread) [custom_components.skodaconnect.sensor] Getting state of charge_max_ampere
DEBUG (MainThread) [custom_components.skodaconnect.sensor] Getting state of climatisation_target_temperature
DEBUG (MainThread) [custom_components.skodaconnect.sensor] Getting state of trip_last_average_speed
DEBUG (MainThread) [custom_components.skodaconnect.sensor] Getting state of trip_last_average_electric_consumption
DEBUG (MainThread) [custom_components.skodaconnect.sensor] Getting state of trip_last_average_fuel_consumption
DEBUG (MainThread) [custom_components.skodaconnect.sensor] Getting state of trip_last_duration
DEBUG (MainThread) [custom_components.skodaconnect.sensor] Getting state of trip_last_length
DEBUG (MainThread) [custom_components.skodaconnect.sensor] Getting state of outside_temperature
DEBUG (MainThread) [custom_components.skodaconnect.sensor] Getting state of requests_remaining
DEBUG (MainThread) [custom_components.skodaconnect.binary_sensor] Getting state of external_power
DEBUG (MainThread) [custom_components.skodaconnect.binary_sensor] Getting state of energy_flow
DEBUG (MainThread) [custom_components.skodaconnect.binary_sensor] Getting state of parking_light
DEBUG (MainThread) [custom_components.skodaconnect.binary_sensor] Getting state of climatisation_without_external_power
DEBUG (MainThread) [custom_components.skodaconnect.binary_sensor] Getting state of door_locked
DEBUG (MainThread) [custom_components.skodaconnect.binary_sensor] Getting state of door_closed_left_front
DEBUG (MainThread) [custom_components.skodaconnect.binary_sensor] Getting state of door_closed_right_front
DEBUG (MainThread) [custom_components.skodaconnect.binary_sensor] Getting state of door_closed_left_back
DEBUG (MainThread) [custom_components.skodaconnect.binary_sensor] Getting state of door_closed_right_back
DEBUG (MainThread) [custom_components.skodaconnect.binary_sensor] Getting state of trunk_locked
DEBUG (MainThread) [custom_components.skodaconnect.binary_sensor] Getting state of trunk_closed
DEBUG (MainThread) [custom_components.skodaconnect.binary_sensor] Getting state of hood_closed
DEBUG (MainThread) [custom_components.skodaconnect.binary_sensor] Getting state of charging_cable_connected
DEBUG (MainThread) [custom_components.skodaconnect.binary_sensor] Getting state of charging_cable_locked
DEBUG (MainThread) [custom_components.skodaconnect.binary_sensor] Getting state of sunroof_closed
DEBUG (MainThread) [custom_components.skodaconnect.binary_sensor] Getting state of windows_closed
DEBUG (MainThread) [custom_components.skodaconnect.binary_sensor] Getting state of window_closed_left_front
DEBUG (MainThread) [custom_components.skodaconnect.binary_sensor] Getting state of window_closed_left_back
DEBUG (MainThread) [custom_components.skodaconnect.binary_sensor] Getting state of window_closed_right_front
DEBUG (MainThread) [custom_components.skodaconnect.binary_sensor] Getting state of window_closed_right_back
DEBUG (MainThread) [custom_components.skodaconnect.binary_sensor] Getting state of vehicleMoving
DEBUG (MainThread) [custom_components.skodaconnect.device_tracker] Getting location of Superb iV

Does this help for further analysis? Do you need more testing?

Anyway, great job !!

You need to edit known_devices.yaml iirc and set the car to tracked. You shouldn’t need to do anything if your car supports position. It might not get setup though if data couldn’t be collected when integration was initialized. Try to restart ha when car is parked.

What have you set as update interval? It looks as if it gets stuck in an update loop when tokens have expired.
How long is it between two working fetches of the same endpoint?

Check known_devices.yaml.
Also there’s no device yet since the integration isn’t using config flow. It will be fixed in a later release but it’s quite a lot to change to make it happen and not break anything.

Thanks for the answer @Farfar. The integration is set with a scan interval of 5 minutes.

And if you check the log. How long is it between two lines fetching carport data for example? 5 minutes or less?
Edit: two lines without error.

@Farfar: known_devices.yaml does not show me any Skoda entry. How should an entry look like? When should the entry be created? Does it automatically happen?

BTW: I have also an issue with the device_tracker … no position retrieved. Shall I open an issue in github? here the logs:

2021-01-06 18:45:37 ERROR (MainThread) [homeassistant.util.logging] Exception in see_vehicle when dispatching 'skodaconnect.updated': ()
Traceback (most recent call last):
  File "/config/custom_components/skodaconnect/device_tracker.py", line 35, in see_vehicle
    gps=instrument.state,
  File "/usr/local/lib/python3.8/site-packages/skodaconnect/dashboard.py", line 291, in state
    state = super().state or {}
  File "/usr/local/lib/python3.8/site-packages/skodaconnect/dashboard.py", line 58, in state
    return self.vehicle.get_attr(self.attr)
  File "/usr/local/lib/python3.8/site-packages/skodaconnect/vehicle.py", line 166, in get_attr
    return find_path(self.attrs, attr)
  File "/usr/local/lib/python3.8/site-packages/skodaconnect/utilities.py", line 86, in find_path
    return find_path(src[path[0]], path[1:])
KeyError: 'position'

It depends on wether or not you have configured a nickname in the portal or a VIN-to-name mapping in the configuration.
For me the entry looks like this:

superb:
  name: SuperB
  mac:
  icon: mdi:car
  picture:
  track: true

The ‘superb’ and ‘SuperB’ might be the VIN number if no name is configured.

All of this should be detectee automatically. The car needs to be stationary when the integration (HA) is initialized or it might not corectly detect that position i supported.
You can check this in the logs if debug logging is enabled for skodaconnect.api. You should see successful entries when the integration fetches position data.
With skodaconnect.dashboard debug enabled you can see which sensors are detected as supported when HA starts.

Oh nooo…:man_facepalming:
I´ve changed the configuration a couple of weeks ago that new device won´t be tracked. After setting it to true for the superb it works perfectly.
Thank you very much

1 Like

Hey @Farfar and @lendy007 not sure how to go about this ( not wanted to post an issue on github yet ), but the plugin is no longer working for me.
Bit of a back history, the Skoda connect app here in Belgium has been horrible for the past half year, almost daily we needed to login again and sensor data was most of the time stale/old.
When it worked, the home assistant plugin would also work perfectly.

After several complaints ( and seeing the iOS reviews of the app I was not alone ), I got a message last week that they changed the backend code and there was an app update. Since then I only needed to login once and the Connect app works perfectly.
BUT also since then, the Home Assistant plugin does no longer work and will no longer connect…
Anything on your radar already?

Only thing in the logs:

Logger: homeassistant.bootstrap
Source: util/package.py:54
First occurred: 7:54:25 AM (1 occurrences)
Last logged: 7:54:25 AM

Error setting up integration skodaconnect - received exception
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/setup.py", line 64, in async_setup_component
    return await task  # type: ignore
  File "/usr/src/homeassistant/homeassistant/setup.py", line 158, in _async_setup_component
    await async_process_deps_reqs(hass, config, integration)
  File "/usr/src/homeassistant/homeassistant/setup.py", line 343, in async_process_deps_reqs
    await requirements.async_get_integration_with_requirements(
  File "/usr/src/homeassistant/homeassistant/requirements.py", line 76, in async_get_integration_with_requirements
    await async_process_requirements(
  File "/usr/src/homeassistant/homeassistant/requirements.py", line 123, in async_process_requirements
    if pkg_util.is_installed(req):
  File "/usr/src/homeassistant/homeassistant/util/package.py", line 54, in is_installed
    return version(req.project_name) in req
  File "/usr/local/lib/python3.8/site-packages/pkg_resources/__init__.py", line 3125, in __contains__
    return self.specifier.contains(item, prereleases=True)
  File "/usr/local/lib/python3.8/site-packages/pkg_resources/_vendor/packaging/specifiers.py", line 789, in contains
    item = parse(item)
  File "/usr/local/lib/python3.8/site-packages/pkg_resources/_vendor/packaging/version.py", line 56, in parse
    return Version(version)
  File "/usr/local/lib/python3.8/site-packages/pkg_resources/_vendor/packaging/version.py", line 275, in __init__
    match = self._regex.search(version)
TypeError: expected string or bytes-like object

Sorry, I don’t have much time for this hobby right now. Not sure if @Farfar is better on time, but we don’t have anyone else working on this project.

1 Like

Unfortunately that info doesn’t really tell us that much.
Could you specify:

logger:
  logs:
    skodaconnect: debug
    custom_components.skodaconnect: debug

In your configuration.yaml and restart home-assistant? Then you should receive debug logs for the skodaconnect component and library, then maybe we can figure out what goes wrong.

1 Like