Main entry point for the MySkoda library.
This class provides all methods to operate on the API and MQTT broker.
Example
async with aiohttp.ClientSession() as client: myskoda = MySkoda(session) await myskoda.connect("username", "password") for vin in await myskoda.list_vehicle_vins(): print(vin)
All get_ methods will always fetch new data from the API and return that.
All refresh_ methods are debounced or otherwise rate limited. They (eventually) update local attributes and don't return anything. Instead they trigger callbacks which clients can register for using the subscribe_updates method.
MQTT event callbacks can also be subscribed for using the subscribe_events method.
MqttDisabledError
Bases: Exception
MQTT was not enabled.
MySkoda
connect(email=None, password=None, refresh_token=None, fcm_token=None)
async
Authenticate on the rest api and connect to the MQTT broker.
Note
Must provide either 'email' and 'password' or 'refresh_token'.
| Parameters: |
|
|---|
connect_with_refresh_token(refresh_token)
async
Authenticate using an existing OpenID refresh token and connect MQTT.
disconnect()
async
Disconnect from the MQTT broker.
enable_mqtt(fcm_token=None)
async
If MQTT was not enabled when initializing MySkoda, enable it manually and connect.
| Raises: |
|
|---|
flash(vin)
async
Flash lights.
generate_fixture_report(vin, vehicle, endpoint)
async
Generate a fixture report for the specified endpoint and vehicle.
generate_get_fixture(name, description, vins, endpoint)
async
Generate a fixture for a get request.
get_air_conditioning(vin, anonymize=False)
async
Retrieve the current air conditioning status for the specified vehicle.
get_all_charging_sessions(vin, start=None, end=None)
async
Retrieve all sessions for a timeperiod.
get_auth_token()
async
Retrieve the main access token for the IDK session.
get_auxiliary_heating(vin, anonymize=False)
async
Retrieve the current auxiliary heating status for the specified vehicle.
get_charging(vin, anonymize=False)
async
Retrieve information related to charging for the specified vehicle.
get_charging_history(vin, cursor=None, start=None, end=None, limit=50)
async
Retrieve the charging history of the specified vehicle.
get_charging_profiles(vin, anonymize=False)
async
Retrieve information related to charging profiles for the specified vehicle.
get_charging_statistics(vin, start, end)
async
Retrieve charging session statistics from the cariad endpoint.
get_connection_status(vin, anonymize=False)
async
Retrieve vehicle connection status for the specified vehicle.
get_departure_timers(vin, anonymize=False)
async
Retrieve departure timers for the specified vehicle.
get_driving_range(vin, anonymize=False)
async
Retrieve estimated driving range for combustion vehicles.
get_driving_score(vin, anonymize=False)
async
Retrieve driving score for the specified vehicle.
get_endpoint(vin, endpoint, anonymize=False)
async
Invoke a get endpoint by endpoint enum.
get_health(vin, anonymize=False)
async
Retrieve health information for the specified vehicle.
get_info(vin, anonymize=False)
async
Retrieve the basic vehicle information for the specified vehicle.
get_loyalty_program_badge(badge_id, user_id=None, anonymize=False)
async
Retrieve loyalty program badge for the specified user.
get_loyalty_program_badges(user_id=None, anonymize=False)
async
Retrieve loyalty program badges for the specified user.
get_loyalty_program_challenges(user_id=None, anonymize=False)
async
Retrieve loyalty program challenges for the specified user.
get_loyalty_program_details(anonymize=False)
async
Retrieve loyalty program details for the specified user.
get_loyalty_program_games(user_id=None, anonymize=False)
async
Retrieve loyalty program games for the specified user.
get_loyalty_program_member(user_id=None, anonymize=False)
async
Retrieve loyalty program member information for the specified user.
get_loyalty_program_rewards(user_id=None, anonymize=False)
async
Retrieve loyalty program rewards for the specified user.
get_loyalty_program_salesforce_contacts(user_id=None, anonymize=False)
async
Retrieve loyalty program Salesforce contacts for the specified user.
get_loyalty_program_transactions(user_id=None, anonymize=False)
async
Retrieve loyalty program transactions for the specified user.
get_maintenance(vin, anonymize=False)
async
Retrieve maintenance report, settings and history.
get_maintenance_report(vin, anonymize=False)
async
Retrieve maintenance report only.
get_parking_position(vin, anonymize=False)
async
Retrieve last known parking positions for the vehicle.
get_partial_vehicle(vin, capabilities)
async
Load and return a partial vehicle, based on list of capabilities.
get_positions(vin, anonymize=False)
async
Retrieve the current position for the specified vehicle.
get_refresh_token()
async
Retrieve the refresh token for the IDK session.
get_single_trip_statistics(vin, start=None, end=None, anonymize=False)
async
Retrieve detailed statistics about past trips.
If you want to filter by date, provide both start and end date.
get_software_update_status(vin, anonymize=False)
async
Retrieve software update status for the specified vehicle.
get_status(vin, anonymize=False)
async
Retrieve the current status for the specified vehicle.
get_trip_statistics(vin, anonymize=False, offset=0, offset_type=OffsetType.WEEK)
async
Retrieve statistics about past trips.
| Parameters: |
|
|---|
get_user(anonymize=False)
async
Retrieve user information about logged in user.
get_vehicle(vin, excluded_capabilities=None)
async
Load and return a full vehicle based on its capabilities.
get_vehicle_equipment(vin, anonymize=False)
async
Retrieve vehicle equipment information for the specified vehicle.
get_vehicle_full_info(vin, anonymize=False)
async
Retrieve all available information for the specified vehicle.
get_vehicle_info(vin, anonymize=False)
async
Retrieve health information for the specified vehicle.
get_vehicle_renders(vin, anonymize=False)
async
Retrieve vehicle renders for the specified vehicle.
get_widget(vin, anonymize=False)
async
Retrieve widget information for the specified vehicle.
honk_flash(vin)
async
Honk and flash.
list_vehicle_vins()
async
List all vehicles by their vins.
lock(vin, spin)
async
Lock the car.
refresh_air_conditioning(vin, notify=True)
async
Refresh air_conditioning data for the provided Vin.
refresh_auxiliary_heating(vin, notify=True)
async
Refresh auxiliary_heating data for the provided Vin.
refresh_charging(vin, notify=True)
async
Refresh charging data for the provided Vin.
refresh_departure_info(vin, notify=True)
async
Refresh departure_info data for the provided Vin.
refresh_driving_range(vin, notify=True)
async
Refresh driving_range data for the provided Vin.
refresh_health(vin, notify=True)
async
Refresh health data for the provided Vin.
refresh_info(vin, notify=True)
async
Refresh info data for the provided Vin.
refresh_maintenance(vin, notify=True)
async
Refresh maintenance data for the provided Vin.
refresh_maintenance_report(vin, notify=True)
async
Refresh only the maintenance report for the provided Vin.
refresh_positions(vin, notify=True)
async
Refresh positions data for the provided Vin.
refresh_single_trip_statistics(vin, notify=True)
async
Refresh single_trip_statistics data for the provided Vin.
refresh_status(vin, notify=True)
async
Refresh status data for the provided Vin.
refresh_trip_statistics(vin, notify=True, offset=0, offset_type=OffsetType.WEEK)
async
Refresh trip_statistics data for the provided Vin.
refresh_user()
async
Refresh user data for the provided Vin.
refresh_vehicle(vin, notify=True)
async
Refresh all vehicle data for the provided Vin.
Get health only when missing and every 24h. This avoids triggering battery protection, such as in Citigoe and Karoq. https://github.com/skodaconnect/homeassistant-myskoda/issues/468
set_ac_at_unlock(vin, settings)
async
Enable or disable AC at unlock.
set_ac_timer(vin, timer)
async
Send provided air-conditioning timer to the vehicle.
set_ac_without_external_power(vin, settings)
async
Enable or disable AC without external power.
set_auto_unlock_plug(vin, enabled)
async
Enable or disable auto unlock plug when charged.
set_auxiliary_heating_timer(vin, timer, spin)
async
Send provided auxiliary heating timer to the vehicle.
set_battery_care_mode(vin, enabled)
async
Enable or disable the battery care mode.
set_charge_limit(vin, limit)
async
Set the maximum charge limit in percent.
set_charge_mode(vin, mode)
async
Set the charge mode.
set_departure_timer(vin, timer)
async
Send provided departure timer to the vehicle.
set_minimum_charge_limit(vin, limit)
async
Set minimum battery SoC in percent for departure timer.
set_reduced_current_limit(vin, reduced)
async
Enable reducing the current limit by which the car is charged.
set_seats_heating(vin, settings)
async
Enable or disable seats heating with AC.
set_target_temperature(vin, temperature)
async
Set the air conditioning's target temperature in °C.
set_windows_heating(vin, settings)
async
Enable or disable windows heating with AC.
start_air_conditioning(vin, temperature)
async
Start the air conditioning with the provided target temperature in °C.
start_auxiliary_heating(vin, spin, config=None)
async
Start the auxiliary heating with the provided configuration.
start_charging(vin)
async
Start charging the car.
start_ventilation(vin)
async
Start the ventilation.
start_window_heating(vin)
async
Start heating both the front and rear window.
stop_air_conditioning(vin)
async
Stop the air conditioning.
stop_auxiliary_heating(vin)
async
Stop the auxiliary heating.
stop_charging(vin)
async
Stop the car from charging.
stop_ventilation(vin)
async
Start the ventilation.
stop_window_heating(vin)
async
Stop heating both the front and rear window.
subscribe(callback)
See subscribe_events. For backwards compatibility.
subscribe_events(callback)
Listen for events emitted by MySkoda's MQTT broker.
subscribe_updates(vin, callback)
Subscribe a callback function to be called when Vehicle data is updated.
unlock(vin, spin)
async
Unlock the car.
vehicle(vin)
Return the currently cached vehicle.
verify_spin(spin, anonymize=False)
async
Verify S-PIN.
wakeup(vin)
async
Wake the vehicle up. Can be called maximum three times a day.
UnknownVinError
Bases: Exception
Requested Vin not found.
UnsupportedEndpointError
Bases: Exception
Endpoint not implemented.
trace_response(_session, _trace_config_ctx, params)
async
Log response details. Used in aiohttp.TraceConfig.