Skoda Connect

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.

Great! Would you mind if I will copy it to my code? Because what was here was only beta-version where both skodaconnect library and Homeassistant plugin were together, now I have splitted it so I would like to include it in library package which is then used by HA plugin.

Please do.
I’ll test when it’s updated. There’s more sensor data available that i’m planning to add such as outside temp and if vehicle is moving.

The token handling also isn’t great, I have it working im my crude mqtt script. I’ll see if I can patch it in.

Ok will do. Please wait with further updates to be performed in this new package release and make modifications in that one so we can pull request in…

Version 1.0.8 available on Github

New sensors available (if you do not specify anything in resources section of configuration, it will automatically create all supported sensors for your car):

  • service_inspection_km
  • oil_inspection_km
  • outside_temperature
  • electric_climatisation
  • window_heater
  • charging
  • battery_level
  • charging_time_left
  • electric_range
  • combined_range
  • charge_max_ampere
  • climatisation_target_temperature
  • external_power
  • climatisation_without_external_power
  • charging_cable_connected
  • charging_cable_locked
  • trip_last_average_electric_consumption
  • hood_closed

@Farfar - I have used your modifications, thank you for that! Regarding modifications you created in HA plugin, I am getting now this message in log:

BinarySensorDevice is deprecated, modify SkodaBinarySensor to extend BinarySensorEntity
LockDevice is deprecated, modify SkodaLock to extend LockEntity

shouldn’t it be reverted back to original “Entity”, not “Device”?

@SpeedMaxX & @jhqv - guys with electric vehicles - could you please try and let us know if showing correct data for electric related stuff (currently actions like starting climatisation, charging, window heater aren’t working yet)

4 Likes

Yes it should be Entity and not Device.
I am using Device since I’m still on 0.104
Haven’t upgraded since support for many of my sensors are missing in hass core.

@lendy007 seems I have the same issue as SpeedMaxX, logs look very similar.
Send you logs and config by PM

I have upgraded to 0.110 without breaking anything on my installation. Now I don’t need to change “Entity” to “Device”…
A few things, I don’t have the time to code myself right now.

  • _hood_closed: The value is inverted
  • adblue_level: This is not supported but the config entry is there. Need to add a check if the value is None as I had in my code.
    sensor.xxx_external_power: This sensor is created but with no data. The correct sensor is binary_sensor
    __. Can’t figure out why this incorrect one gets created.
  • _last_trip_average_electric_consumption: Needs to be divided by 10
  • _electric_climatisation: Value is inverted

Else it seems to be working fine for me, except the actions part not working :slight_smile:

I have found a few hints on more API endpoints, remote lock and unlock for one, but have only been able to see last actions so far.
I will try to debug the app and see if I can find something.
PM me if you want raw json of requests and responses.

Ok, I will check these small modifications…

Regarding lock/unlock - I have captured it from my mobile app, but even when I send the same JSON I am getting HTTP 403 forbidden… Need to play with it a bit…

@Farfar - created v1.0.9

  • _hood_closed: The value is inverted
  • adblue_level: fixed when not supported
  • _last_trip_average_electric_consumption: Needs to be divided by 10
  • _electric_climatisation: Value is inverted
  • beta version of start/stop window heater and start/stop electric climatisation (not able to test, need somebody with electric car to test)
2 Likes

@lendy007 looks quite good!!! :+1: :smiley:

Man! This is super-good news! I just installed it, seems to be working fine so far. I have one Skoda Superb iV (Plugin-Hybrid) and one Scala and both cars shows up. Will do some more testing this weekend.

Big thanks and GREAT JOB!

I’ve successfully sent a climatisation stop now through python with:

data = {
"action": {
"type": "stopClimatisation"
}
}
myheaders = {
"X-App-Version": "3.2.6",
"X-App-Name": "cz.skodaauto.connect",
"X-App-Id": "cz.skodaauto.connect",
"Content-Type": "application/json; charset=UTF-8",
"Connection": "Keep-Alive",
"Accept-Encoding": "gzip",
"User-Agent": "okhttp/3.14.7",
"Accept": "application/vnd.vwg.mbb.ClimaterAction_v1_0_1+json",
"Accept-Charset": "UTF-8",
"Authorization": "Bearer " + <my-access-token>
}
url = $homeregion/fs-car/bs/climatisation/v1/$type/$country/vehicles/$vin/climater/actions
response = requests.post(url, headers=myheaders, json=data)

{"action":{"type":"stopClimatisation","actionId":7136760,"actionState":"queued"}}

I’ve tried off and on and only got invalid payload but finally figured out that the function I was using that in turn calls on requests.post don’t handle json, or so I believe.

Sorry, I do not have an electric Skoda so I can’t help out with that.

I am still successfully running the 1.0.1 release from Nov 18th, but will probably pull the latest version this weekend.

So far, all the sensors seem to work well, but I haven’t tried sending commands like “unlock” or “enable heating” yet.

My only improval request so far is that I’d like to be able to store my VIN number in my secrets.yaml file, but that doesn’t seem possible since the VIN is in a YAML key, not in a value. The value is a bit sensitive, so it would make sense to not keep it in the configuration…

So instead of

name:
    abcdefg1234567: 'Octavia'

it could perhaps look like

name:
    vin: 'abcdefg1234567'
    friendly_name: 'Octavia'

Great work on this, @lendy007!

Turning on climatization does not work currently:

2020-11-21 12:46:40 DEBUG (MainThread) [custom_components.skodaconnect.switch] Turning ON combustion_climatisation.
2020-11-21 12:46:42 WARNING (MainThread) [skodaconnect] Failure to execute: 403, message='Forbidden', url=URL('https://fal-3a.prd.eu.dp.vwg-connect.com/fs-car/bs/rs/v1/skoda/CZ/vehicles/<redacted>/action')
2020-11-21 12:46:42 WARNING (MainThread) [skodaconnect] Failed to start combustion engine climatisation
2020-11-21 12:46:42 DEBUG (MainThread) [custom_components.skodaconnect.switch] Getting state of combustion_climatisation

The app also allows to turn them on simultaneously or only turn on ventilation.

New pull request, start/stop electric climatisation and charging (switches) working for me.

1 Like

Did some mitmproxy and ssl pinning workarounds this afternoon. The Android app sends a XML request for heater:

POST https://fal-3a.prd.eu.dp.vwg-connect.com/fs-car/bs/rs/v1/Skoda/CZ/vehicles/<redacted>/action HTTP/1.1
X-MbbSecToken:	<redacted>
Accept:	application/json
Accept-Charset:	UTF-8
App-Version:	AN 1.0
Authorization:	Bearer <redacted>
X-App-Version:	2002275293
X-App-Name:	cz.skodaauto.connect
X-App-Id:	cz.skodaauto.connect
X-Platform:	Android
X-Language-Id:	en
X-Country-Id:	US
Accept-Language:	en-US
Accept-Charset:	UTF-8
Content-Type:	application/vnd.vwg.mbb.RemoteStandheizung_v2_0_2+xml
Content-Length:	220
Host:	fal-3a.prd.eu.dp.vwg-connect.com
Connection:	Keep-Alive
Accept-Encoding:	gzip
User-Agent:	okhttp/3.14.7
<performAction xmlns="http://audi.de/connect/rs">
   <quickstart>
      <active>true</active>
      <startMode>heating</startMode>
      <climatisationDuration>30</climatisationDuration>
   </quickstart>
</performAction>

Yes, for parking heater. For electric climater it’s JSON