Skoda Connect

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!

I was also wondering this.

I also note that my requests remaining is always “-1”

Because you didn’t perform any active operation. This information is coming only with replies to active operations and until you perform any (lock/unlock, start heating, etc.) you won’t see how many requests are remaining.

As lendy007 said, since the component can’t know how many requests are remaining after it’s been initialised, it’s set to -1.

For my car, and most I guess, the ammount of requests one can send until the servers deny any further actions is 15. After this ammount you have to start the car until this number gets reset.
The component will set the value to -1 until the first time you drive the car after the component has been initialised. When the car is moving (the component request a status update and get 204 back from position) it will set remaining requests to 15.

After a API call has been made (start heater, charging, window heating, data refresh, etc) the server will respond back with a header stating how many requests are left. This value is then stored in requests_remaining.
If you use the app for such an action, naturally the component won’t know that the ammoung has decreased until your next call through the HA component.

Hi,
I tried adding this component (with HACS).

This is my config

skodaconnect:
    username: x
    password: x
    combustion_engine_heating_duration: 10
    combustion_engine_climatisation_duration: 10
    scandinavian_miles: false
    imperial_units: false
    scan_interval:
        minutes: 1
    name:
        tmbjg7ne0l9999999: 'Octavia'

And I get these errors

Could not fetch StoredVehicleDataResponse, error: 502, message='Bad Gateway', url=URL('https://msg.volkswagen.de/fs-car/bs/vsr/v1/skoda/CZ/vehicles/TMBJG7NE0L9999999/status')
20:14:56 – /usr/local/lib/python3.8/site-packages/skodaconnect/api.py (WARNING) - bericht kwam voor het eerst om 18:37:01 en verschijnt 1660 keer
Could not fetch position (ClientResponseError), error: 502, message='Bad Gateway', url=URL('https://msg.volkswagen.de/fs-car/bs/cf/v1/skoda/CZ/vehicles/TMBJG7NE0L9999999/position')
20:14:55 – /usr/local/lib/python3.8/site-packages/skodaconnect/api.py (WARNING) - bericht kwam voor het eerst om 18:37:01 en verschijnt 1660 keer
Could not fetch tripstatistics, error: 403, message='Forbidden', url=URL('https://msg.volkswagen.de/fs-car/bs/tripstatistics/v1/skoda/CZ/vehicles/TMBJG7NE0L9999999/tripdata/shortTerm?newest')
20:14:55 – /usr/local/lib/python3.8/site-packages/skodaconnect/api.py (WARNING) - bericht kwam voor het eerst om 18:37:01 en verschijnt 1659 keer

What can be wrong ?
Thank you very much.

Is your car activated for the online services? Can you use the MySkoda app and get data?

I can see my car and my service partner. I didn’t know there was anything else I could see in the app.
It shows:
Routeplanner
Servicepartner

  • add a 3rd shortcut

That’s it.

Ok, then there’s no info really that this integration can get for your car. If there’s support for it, this integration can fetch data for gps location, car status, trip statistics, start heating and more. But ut won’t show anything that the app can’t show.