Skoda Connect

Hi, interesting here, too. Is it all the same logic? @lendy007 can I test your plugin anyhow? I have a Superb PHEV like @Depechie.

To your questions:

  • does somebody have electric engine on Skoda car? => Yes
  • does somebody have electric climatisation where they can set target temperature from Skoda app? => Yes, in combination with charging the battery
  • does somebody have window heater controlled from Skoda app? => yes, possible inside the app

KR - SM

1 Like

Ok, it seems that there is a interest of this so I have put my beta/test version to github from where you can test it… I am still working on things described at “not working” section

You can download from here - https://github.com/lendy007/homeassistant-skodaconnect

It would really help me if you can enable debug logging as described on the Github readme and then send me logs it produces for your car via private message here or via github. I will see what statuses it produces for electric car so I can include them in the code… Debug logs after enabling can be found in Home Assistant->Configuration->Logs

6 Likes

Hi, copied the files to custom_components and added a configuration. When restartig, I get the following error:

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 210, in async_setup
return await update(utcnow())
File “/config/custom_components/skodaconnect/init.py”, line 201, in update
discover_vehicle(vehicle)
File “/config/custom_components/skodaconnect/init.py”, line 155, in discover_vehicle
dashboard = vehicle.dashboard(
File “/config/custom_components/skodaconnect/skoda/skoda.py”, line 526, in dashboard
return dashboardskoda.Dashboard(self, **config)
File “/config/custom_components/skodaconnect/skoda/dashboardskoda.py”, line 708, in init
self.instruments = [
File “/config/custom_components/skodaconnect/skoda/dashboardskoda.py”, line 711, in
if instrument.setup(vehicle, **config)
File “/config/custom_components/skodaconnect/skoda/dashboardskoda.py”, line 30, in setup
if not self.is_supported:
File “/config/custom_components/skodaconnect/skoda/dashboardskoda.py”, line 67, in is_supported
if hasattr(self.vehicle, supported):
File “/config/custom_components/skodaconnect/skoda/skoda.py”, line 554, in is_last_connected_supported
if self.attrs.get(‘StoredVehicleDataResponse’, {}).get(‘vehicleData’, {}).get(‘data’, {})[0].get(‘field’, {})[0].get(‘tsCarSentUtc’, ):
KeyError: 0

Configuration looks like

skodaconnect:
    username: [email protected]
    password: AVeryComplexPassword
    spin: 1234
    scandinavian_miles: false
    scan_interval:
        minutes: 2
    name:
        <fin>: 'Superb'
    resources: # Optional
        - combustion_engine_heating # Note that this option is only available for 2019> Facelift models
        - position
        - distance
        - door_locked
        - trunk_locked   
        - sunroof_closed
        - battery_level
        - fuel_level
        - charging_time_left
        - electric_range
        - combustion_range
        - combined_range        
        - request_in_progress

Question: do I have to have the hacs-volkswagencarnet module installed? I think, no, or?

Hmm, this is quite strange, it seems that login was successfull but no car was returned… Good catch, I need to add some handling for these situations into the code…

Could you please add this into configuration.yaml file and then send me log (via private message) from HA -> Configuration-Logs -> LOAD FULL HOMEASSISTANT LOGS

Thank you

logger:
    default: info
    logs:        
        custom_components.skodaconnect: debug
        custom_components.skodaconnect.climate: debug
        custom_components.skodaconnect.lock: debug
        custom_components.skodaconnect.device_tracker: debug
        custom_components.skodaconnect.switch: debug
        custom_components.skodaconnect.binary_sensor: debug
        custom_components.skodaconnect.sensor: debug
1 Like

Logfile sent via PM @lendy007
THX

I have been working on a MQTT integration based on this code:

Most of the code works as is, at least after commenting out some lines as mentioned in issues.

My findings are that login and “set” actions are different from VW, and also Audi, API calls. I haven’t got that to work yet but someone sharper than me might be able to figure it out?
Since there’s no set actions available in the Skoda Connect website we can’t reverse engineer from those calls, only reverse engineering the app left?

Anyways when I have a decently stable code I’ll upload to github, all read data actions are working and data refresh (wake up car to refresh data). Maybe my code will help someone and I’m sure most will be able to make it tidier and more efficient.

1 Like

For me most of the functions are already working, just need to find out why it is not working for guys with newest Superb plug-in hybrid and add electric engine related stuff to the code… I have also used some ideas from sc2mqtt and whole code base on volkswagencarnet project which seems more “pretty looking” for HA to me.

I’ll take a look at your code and I’ll test it. Maybe I can find something!

I can see why climatisation for instance does not work for Skoda.
The VW integration is based on the web application, where all features are available via the web page. For my Skoda PHEV there’s no access to climatisation, charging etc on the web page, only Android/IOS App.
Most charging parts are collected from the eManager web page for VW and that won’t work for Skoda. I see however that some of the status items are collected from wrong state arrays and/or IDs.
For example, combustion_range is from StoredVehicleDataResponse ID 0x0301030006
ID 0x0301030005 in your implementation is combined range.

Hi, In the meantime, I got it working so far:

If all the other sensors and switches could be attached, it would be very great :smiley:

Got it working as well today, very nicely done!

However, it does not seem to be doing an actual refresh from the car to the skoda connect api, when I open the trunk for example, the status remains “Closed”. Also the “last_connected” state remains the same until I manually refresh the data in the skoda connect portal. Do you know if the car itself triggers an update in the portal everyy now and then or do you have to call some api to get it to get the actual data from the car instead of cached data?

ok :smiley: Looks nice :+1:

Now, I only miss the “electrical” category … but I think, @lendy007 will also manage this :fist: :fist:

Never mind, it seems to work now. It seems that my car hasn’t connected for a long time since my license expired and now it started updating again after renewing the license

We should be careful of requesting a refresh from the vehicle. Since such wake up calls might consume battery the VW portal will throttle to a limited ammount of such requests until no further requests can be made until the car has been started.
If I have the time I can modify and upload code for the rest of the sensors.

Regarding updates from the car - I have the code for update already, but was wondering how often it should happen… Do you think once an hour is acceptable balance between not discharging battery and having up to date information? Or maybe update frequency as configuration parameter? Maybe also create a switch to trigger update manually (for example when needed in some automation)?

Thoughts?

I’m not sure how often forced updates are allowed before they are blocked. In my MQTT implementation I have a timestamp that gets moved forward every time there’s newer data. If all data is older than 1 hour then it forces an update from the car.
I haven’t been able to test this yet though so I have no idea how often is reasonable.
It alse seems like it’s possible to only refresh parts of the data, for instance for climater och charger. In my code I have a static refresh for the stored vehicle data. Not sure if one or the other makes a difference for the throttling.

Has anyone in this thread managed to install and run the skodaconnect module on a Hassio installation?

(I’ve copied the skodaconnect folder to custom_components as per the instructions, but as soon as I add the “skodaconnect” block to configuration.yaml the config validation fails saying “Component error: skodaconnect - No module named ‘utilities’”.)

no problem here - Inside the manifest, volkswagencarnet is noted as requirement. Perhaps it helps if you install it, too,

@jhqv - try to use new release from Github to see if your issue will dissapear

I’ve separated skodaconnect package to separate pip package which will be installed via manifest.json. I have also removed volkswagencarnet dependency.

1 Like

I forked your previous version and uploaded now:

All is working fine for me but I’m still on Hass 0.104, YMMV

I added some data, some api endpoints etc.