Skoda Connect

So I updated the debug as requested and this now shows the requested info.

Don’t want to post the full string as it contains vehicle specific data but will PM it to you if it helps.

‘milCarCaptured’: 3052, ‘milCarSent’: 3052

If this is the total mileage of the car then this is in Km

1 Like

Yes please do send me some data over PM. The most interesting part I think could be one of theese lines:

[skodaconnect] Received [200] response: {'carportData': {'country': 'CZ', 'systemId': 'unknown', 'color': 'LW5Q', 'mmi': '7UF', 'modelYear': '2020', 'modelName': 'SUP.COM iVL&K TS115/1.4A6F', 'transmission': 'TRS', 'engine': 'DGE', 'requestId': '----', 'modelCode': '3V55XC', 'countryCode': 'SE', 'vin': '----', 'brand': 'Skoda'}}

and also some data from vsr for instance.

I have peeked at the audi connect component and it’s converting in the code so no secret parameter to set when requesting data.
I will fix conversion in next commit, should be easy enough to fix in both testing and main.

hey @Farfar 2 questions…

  1. I don’t understand the 2 heating options ( electric and aux ) for PHEV cars? In the skoda connect app I only see one ( the climate ).
  2. Can you share your car dashboard yaml, looks great :slight_smile:

What an amazing job @Farfar @lendy007 :raised_hands:. Ever since I saw the Carnet integration, I thought it could be leveraged to support Skoda Connnect – I even investigated but quickly got caught back by my lack of skills :slight_smile: –.

Edit: Now when I re-read your post I understand. If you only have the electric option in the app then your car isn’t equipped with auxiliary heater (parking heater)? See text below:
The climate entity is somewhat broken, haven’t fixed it since it doesn’t really map well to how the current library handles data. If you change temp in climate entity for instance, there will be a call to the API to set the temperature. And when you activate heating another call… All of theese calls counts toward your maximum ammount (15) of requests until no further request can be made until the car has been started.
I am only using the switches for electric/aux heating.

You need the test branch of the library and integration to use the aux heater for PHEV. In short there’s two different API functions: rs and climater.
rs is legacy(?) function for cars with parking heater, petrol/diesel only afaik.
climater is newer and is used for EV/PHEV cars. Some PHEVs also have a parking heater, I named this auxiliary so it isn’t mistaken for the parking heater in non PHEV cars.
I’m not sure though how to tell if a car is equipped with aux heater since mine is and I can’t compare. So all EV/PHEVs should show the aux heater atm.

It’s 4 cards stack vertically, you will need some custom lovelace plugins and get the car image from skoda connect portal. The charger cable etc is ugly .pngs I have manually created in GIMP. Positions aren’t 100% accurate but looks good enough:

type: picture-elements
image: /local/skoda.png
elements:
  - type: image
    entity: binary_sensor.superb_charging_cable_connected
    tap_action:
      action: none
    style:
      top: 50%
      left: 50%
      width: 100%
    image: /local/blank.png
    state_image:
      'on': /local/skoda_charger_connected.png
  - type: image
    entity: binary_sensor.superb_energy_flow
    tap_action:
      action: none
    style:
      top: 50%
      left: 50%
      width: 100%
    image: /local/blank.png
    state_image:
      'on': /local/skoda_charger_charging.png
  - type: image
    entity: switch.superb_window_heater
    tap_action:
      action: none
    style:
      top: 50%
      left: 50%
      width: 100%
    image: /local/blank.png
    state_image:
      'on': /local/skoda_window_heating.png
  - type: image
    entity: switch.superb_electric_climatisation
    tap_action:
      action: none
    style:
      top: 50%
      left: 50%
      width: 100%
    image: /local/blank.png
    state_image:
      'on': /local/skoda_heating.png
  - type: image
    entity: binary_sensor.superb_doors_locked
    tap_action:
      action: none
    style:
      top: 34%
      left: 55%
      width: 3%
    image: /local/blank.png
    state_image:
      'off': /local/blink.gif
  - type: state-icon
    entity: sensor.superb_combustion_range
    style:
      top: 4%
      left: 5%
  - type: state-label
    entity: sensor.superb_combustion_range
    style:
      top: 5%
      left: 15%
  - type: state-icon
    entity: sensor.superb_electric_range
    style:
      top: 15.5%
      left: 5%
  - type: state-label
    entity: sensor.superb_electric_range
    style:
      top: 15%
      left: 15%
  - type: state-icon
    entity: lock.superb_door_locked
    style:
      bottom: 0%
      right: 5%
  - type: state-icon
    entity: binary_sensor.superb_windows_closed
    style:
      bottom: 0%
      right: 15%
type: horizontal-stack
cards:
  - type: button
    tap_action:
      action: more-info
    entity: switch.superb_charging
    name: Charge
    show_state: false
    hold_action:
      action: toggle
    icon_height: 48px
  - type: button
    tap_action:
      action: more-info
    entity: switch.superb_electric_climatisation
    name: Electric heater
    hold_action:
      action: toggle
    icon_height: 48px
  - type: button
    tap_action:
      action: more-info
    entity: switch.superb_auxiliary_climatisation
    name: Aux heater
    hold_action:
      action: toggle
  - type: button
    entity: switch.superb_window_heater
    name: Defrost
    tap_action:
      action: more-info
    hold_action:
      action: toggle
    icon_height: 48px
type: entities
entities:
  - entity: binary_sensor.superb_charging_cable_connected
    type: 'custom:multiple-entity-row'
    name: Charger
    secondary_info: last-changed
    state_header: Connector
    entities:
      - entity: binary_sensor.superb_external_power
        name: Power
      - entity: binary_sensor.superb_energy_flow
        name: Flow
      - entity: binary_sensor.superb_charging_cable_locked
        name: Plug
  - entity: sensor.superb_battery_level
    type: 'custom:multiple-entity-row'
    name: Battery
    secondary_info: last-changed
    state_header: Level
    entities:
      - entity: sensor.superb_charger_max_ampere
        name: Amps
        unit: ' '
      - entity: sensor.superb_charging_time_left
        name: To full
show_header_toggle: false
state_color: true
type: entities
entities:
  - entity: switch.superb_climatisation_from_battery
    type: 'custom:multiple-entity-row'
    name: Climatisation settings
    state_header: From battery
    toggle: true
    secondary_info: last-updated
    entities:
      - entity: sensor.superb_outside_temperature
        name: Outside
      - entity: sensor.superb_climatisation_target_temperature
        name: Target
  - entity: binary_sensor.superb_vehicle_moving
    type: 'custom:multiple-entity-row'
    name: Vehicle Parked
    state_header: Moving
    secondary_info:
      entity: sensor.superb_parking_time
      name: 'Parked:'
    entities:
      - entity: device_tracker.superb
        name: Location
  - entity: sensor.superb_requests_remaining
    type: 'custom:multiple-entity-row'
    name: Requests
    state_header: Remaining
    secondary_info: last-updated
    entities:
      - entity: sensor.superb_request_result
        name: Last result
  - entity: switch.superb_request_in_progress
    name: Data
    type: 'custom:multiple-entity-row'
    state_header: Force refresh
    toggle: true
    secondary_info:
      entity: sensor.superb_last_connected
      name: 'Latest data:'
  - entity: sensor.superb_last_trip_average_electric_consumption
    type: 'custom:multiple-entity-row'
    name: Last Trip
    unit: kWh
    icon: 'mdi:map-marker-distance'
    state_header: Electric
    entities:
      - entity: sensor.superb_last_trip_average_speed
        name: Speed
      - entity: sensor.superb_last_trip_duration
        name: Time
      - entity: sensor.superb_last_trip_length
        name: Length
      - entity: sensor.superb_last_trip_average_fuel_consumption
        name: Fuel
        unit: l
show_header_toggle: false
state_color: true
2 Likes

Just tried to update to 1.0.21

All entities are unavailable and log shows this error

Logger: homeassistant.util.package
Source: util/package.py:95
First occurred: 17:49:49 (1 occurrences)
Last logged: 17:49:49

Unable to install package skodaconnect==1.0.21: ERROR: Could not find a version that satisfies the requirement skodaconnect==1.0.21 (from versions: 1.0.7.dev2, 1.0.8.dev1, 1.0.9.dev1, 1.0.10, 1.0.11, 1.0.13, 1.0.14, 1.0.16, 1.0.17, 1.0.18) ERROR: No matching distribution found for skodaconnect==1.0.21 WARNING: You are using pip version 20.2.4; however, version 20.3.3 is available. You should consider upgrading via the '/usr/local/bin/python3 -m pip install --upgrade pip' command.

I had to publish @Farfar changes to pip which I had done right now. Unfortunately wasn’t able to publish as version 1.0.21, so now it is 1.0.23. Plugin repository also updated, should be working fine now.

1 Like

Legend! I must learn pypi so you don’t have to step in for every release :slight_smile:

All works now and initial figures look ok. Will have a better check tomorrow for any thing odd.

1 Like

I did the 1.0.23 release and have some sensor now unavailable… like the climate set temperature.
Also the last trip duration.

Logs show

File “/usr/local/lib/python3.8/site-packages/dashboardskoda.py”, line 126, in state
if val and self.unit and “mi” in self.unit and self.convert == True:
AttributeError: ‘Sensor’ object has no attribute ‘convert’

I have the same error since the 1.0.23:
2020-12-20 15:58:02 ERROR (MainThread) [homeassistant.components.sensor] Error adding entities for domain sensor with platform skodaconnect
Traceback (most recent call last):
File “/root/homeassistant/lib64/python3.8/site-packages/homeassistant/helpers/entity_platform.py”, line 316, in async_add_entities
await asyncio.gather(*tasks)
File “/root/homeassistant/lib64/python3.8/site-packages/homeassistant/helpers/entity_platform.py”, line 507, in _async_add_entity
await entity.add_to_platform_finish()
File “/root/homeassistant/lib64/python3.8/site-packages/homeassistant/helpers/entity.py”, line 531, in add_to_platform_finish
self.async_write_ha_state()
File “/root/homeassistant/lib64/python3.8/site-packages/homeassistant/helpers/entity.py”, line 296, in async_write_ha_state
self._async_write_ha_state()
File “/root/homeassistant/lib64/python3.8/site-packages/homeassistant/helpers/entity.py”, line 320, in _async_write_ha_state
sstate = self.state
File “/root/.homeassistant/custom_components/skodaconnect/sensor.py”, line 27, in state
return self.instrument.state
File “/root/homeassistant/lib64/python3.8/site-packages/dashboardskoda.py”, line 134, in state
elif val and self.unit and “°C” in self.unit and self.convert == True:
AttributeError: ‘Sensor’ object has no attribute ‘convert’

It’s a miss in the code when I imported changes from test to main.

For a manual fix, insert:

        self.convert = False

on line 75 in dashboardskoda.py or wait for fixed release.

Any pointers as to where to find this file. Doesn’t seem to be in the custom components folder.

Sorry, you cannot modify it as it is part of Pypi package which is invisible for you. But I saw @Farfar is already working on fixed version so stay tuned, will be fixed very soon

Good news, this plugin became available via official HACS today!

4 Likes

And version 1.0.24 is now published.
Please use github issue tracker if you have account there, tracing changes etc is easier then :slight_smile:

Thanks for sharing your config. I’m wondering about the switch.superb_request_in_progress. I don’t have that entity and I was wondering what it does and whether it’s linked to the fact you have a PHEV (mine isn’t).

The request_in_progress is only implemented in the test branch so far. It’s an indication if there’s a API call in progress when the sensors are updated. Since a call can be done in ~10-15s it’s not that useful since HA states are updated once every minute at the most.
But it can also be used to manually trigger a status refresh, it will try to wake up the car so it sends latest data to the servers.

I am working on implementing all of the features to main branch, that you can install via HACS etc, but it keeps popping upp small changes that take precedence :slight_smile:

1 Like

Thanks for the clarification and for your work!