carconnectivity-connector-skoda 0.4a2__tar.gz → 0.4a3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of carconnectivity-connector-skoda might be problematic. Click here for more details.
- {carconnectivity_connector_skoda-0.4a2 → carconnectivity_connector_skoda-0.4a3}/PKG-INFO +1 -1
- {carconnectivity_connector_skoda-0.4a2 → carconnectivity_connector_skoda-0.4a3}/src/carconnectivity_connector_skoda.egg-info/PKG-INFO +1 -1
- {carconnectivity_connector_skoda-0.4a2 → carconnectivity_connector_skoda-0.4a3}/src/carconnectivity_connectors/skoda/_version.py +1 -1
- {carconnectivity_connector_skoda-0.4a2 → carconnectivity_connector_skoda-0.4a3}/src/carconnectivity_connectors/skoda/connector.py +171 -80
- {carconnectivity_connector_skoda-0.4a2 → carconnectivity_connector_skoda-0.4a3}/.flake8 +0 -0
- {carconnectivity_connector_skoda-0.4a2 → carconnectivity_connector_skoda-0.4a3}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
- {carconnectivity_connector_skoda-0.4a2 → carconnectivity_connector_skoda-0.4a3}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
- {carconnectivity_connector_skoda-0.4a2 → carconnectivity_connector_skoda-0.4a3}/.github/dependabot.yml +0 -0
- {carconnectivity_connector_skoda-0.4a2 → carconnectivity_connector_skoda-0.4a3}/.github/workflows/build.yml +0 -0
- {carconnectivity_connector_skoda-0.4a2 → carconnectivity_connector_skoda-0.4a3}/.github/workflows/build_and_publish.yml +0 -0
- {carconnectivity_connector_skoda-0.4a2 → carconnectivity_connector_skoda-0.4a3}/.github/workflows/codeql-analysis.yml +0 -0
- {carconnectivity_connector_skoda-0.4a2 → carconnectivity_connector_skoda-0.4a3}/.gitignore +0 -0
- {carconnectivity_connector_skoda-0.4a2 → carconnectivity_connector_skoda-0.4a3}/CHANGELOG.md +0 -0
- {carconnectivity_connector_skoda-0.4a2 → carconnectivity_connector_skoda-0.4a3}/LICENSE +0 -0
- {carconnectivity_connector_skoda-0.4a2 → carconnectivity_connector_skoda-0.4a3}/Makefile +0 -0
- {carconnectivity_connector_skoda-0.4a2 → carconnectivity_connector_skoda-0.4a3}/README.md +0 -0
- {carconnectivity_connector_skoda-0.4a2 → carconnectivity_connector_skoda-0.4a3}/doc/Config.md +0 -0
- {carconnectivity_connector_skoda-0.4a2 → carconnectivity_connector_skoda-0.4a3}/pyproject.toml +0 -0
- {carconnectivity_connector_skoda-0.4a2 → carconnectivity_connector_skoda-0.4a3}/setup.cfg +0 -0
- {carconnectivity_connector_skoda-0.4a2 → carconnectivity_connector_skoda-0.4a3}/setup_requirements.txt +0 -0
- {carconnectivity_connector_skoda-0.4a2 → carconnectivity_connector_skoda-0.4a3}/src/carconnectivity_connector_skoda.egg-info/SOURCES.txt +0 -0
- {carconnectivity_connector_skoda-0.4a2 → carconnectivity_connector_skoda-0.4a3}/src/carconnectivity_connector_skoda.egg-info/dependency_links.txt +0 -0
- {carconnectivity_connector_skoda-0.4a2 → carconnectivity_connector_skoda-0.4a3}/src/carconnectivity_connector_skoda.egg-info/requires.txt +0 -0
- {carconnectivity_connector_skoda-0.4a2 → carconnectivity_connector_skoda-0.4a3}/src/carconnectivity_connector_skoda.egg-info/top_level.txt +0 -0
- {carconnectivity_connector_skoda-0.4a2 → carconnectivity_connector_skoda-0.4a3}/src/carconnectivity_connectors/skoda/__init__.py +0 -0
- {carconnectivity_connector_skoda-0.4a2 → carconnectivity_connector_skoda-0.4a3}/src/carconnectivity_connectors/skoda/auth/__init__.py +0 -0
- {carconnectivity_connector_skoda-0.4a2 → carconnectivity_connector_skoda-0.4a3}/src/carconnectivity_connectors/skoda/auth/auth_util.py +0 -0
- {carconnectivity_connector_skoda-0.4a2 → carconnectivity_connector_skoda-0.4a3}/src/carconnectivity_connectors/skoda/auth/helpers/blacklist_retry.py +0 -0
- {carconnectivity_connector_skoda-0.4a2 → carconnectivity_connector_skoda-0.4a3}/src/carconnectivity_connectors/skoda/auth/my_skoda_session.py +0 -0
- {carconnectivity_connector_skoda-0.4a2 → carconnectivity_connector_skoda-0.4a3}/src/carconnectivity_connectors/skoda/auth/openid_session.py +0 -0
- {carconnectivity_connector_skoda-0.4a2 → carconnectivity_connector_skoda-0.4a3}/src/carconnectivity_connectors/skoda/auth/session_manager.py +0 -0
- {carconnectivity_connector_skoda-0.4a2 → carconnectivity_connector_skoda-0.4a3}/src/carconnectivity_connectors/skoda/auth/skoda_web_session.py +0 -0
- {carconnectivity_connector_skoda-0.4a2 → carconnectivity_connector_skoda-0.4a3}/src/carconnectivity_connectors/skoda/capability.py +0 -0
- {carconnectivity_connector_skoda-0.4a2 → carconnectivity_connector_skoda-0.4a3}/src/carconnectivity_connectors/skoda/charging.py +0 -0
- {carconnectivity_connector_skoda-0.4a2 → carconnectivity_connector_skoda-0.4a3}/src/carconnectivity_connectors/skoda/climatization.py +0 -0
- {carconnectivity_connector_skoda-0.4a2 → carconnectivity_connector_skoda-0.4a3}/src/carconnectivity_connectors/skoda/command_impl.py +0 -0
- {carconnectivity_connector_skoda-0.4a2 → carconnectivity_connector_skoda-0.4a3}/src/carconnectivity_connectors/skoda/error.py +0 -0
- {carconnectivity_connector_skoda-0.4a2 → carconnectivity_connector_skoda-0.4a3}/src/carconnectivity_connectors/skoda/mqtt_client.py +0 -0
- {carconnectivity_connector_skoda-0.4a2 → carconnectivity_connector_skoda-0.4a3}/src/carconnectivity_connectors/skoda/ui/connector_ui.py +0 -0
- {carconnectivity_connector_skoda-0.4a2 → carconnectivity_connector_skoda-0.4a3}/src/carconnectivity_connectors/skoda/vehicle.py +0 -0
- {carconnectivity_connector_skoda-0.4a2 → carconnectivity_connector_skoda-0.4a3}/test/integration_test/carConnectivity.json +0 -0
|
@@ -1336,10 +1336,20 @@ class Connector(BaseConnector):
|
|
|
1336
1336
|
raise SetterError(f'Unknown temperature unit {temperature_attribute.unit}')
|
|
1337
1337
|
|
|
1338
1338
|
url = f'https://mysmob.api.connect.skoda-auto.cz/api/v2/air-conditioning/{vin}/settings/target-temperature'
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1339
|
+
try:
|
|
1340
|
+
settings_response: requests.Response = self.session.post(url, data=json.dumps(setting_dict), allow_redirects=True)
|
|
1341
|
+
if settings_response.status_code != requests.codes['accepted']:
|
|
1342
|
+
LOG.error('Could not set target temperature (%s)', settings_response.status_code)
|
|
1343
|
+
raise SetterError(f'Could not set value ({settings_response.status_code})')
|
|
1344
|
+
except requests.exceptions.ConnectionError as connection_error:
|
|
1345
|
+
raise SetterError(f'Connection error: {connection_error}.'
|
|
1346
|
+
' If this happens frequently, please check if other applications communicate with the Skoda server.') from connection_error
|
|
1347
|
+
except requests.exceptions.ChunkedEncodingError as chunked_encoding_error:
|
|
1348
|
+
raise SetterError(f'Error: {chunked_encoding_error}') from chunked_encoding_error
|
|
1349
|
+
except requests.exceptions.ReadTimeout as timeout_error:
|
|
1350
|
+
raise SetterError(f'Timeout during read: {timeout_error}') from timeout_error
|
|
1351
|
+
except requests.exceptions.RetryError as retry_error:
|
|
1352
|
+
raise SetterError(f'Retrying failed: {retry_error}') from retry_error
|
|
1343
1353
|
return target_temperature
|
|
1344
1354
|
|
|
1345
1355
|
def __on_air_conditioning_at_unlock_change(self, at_unlock_attribute: BooleanAttribute, at_unlock_value: bool) -> bool:
|
|
@@ -1355,10 +1365,20 @@ class Connector(BaseConnector):
|
|
|
1355
1365
|
setting_dict['airConditioningAtUnlockEnabled'] = at_unlock_value
|
|
1356
1366
|
|
|
1357
1367
|
url = f'https://mysmob.api.connect.skoda-auto.cz/api/v2/air-conditioning/{vin}/settings/ac-at-unlock'
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1368
|
+
try:
|
|
1369
|
+
settings_response: requests.Response = self.session.post(url, data=json.dumps(setting_dict), allow_redirects=True)
|
|
1370
|
+
if settings_response.status_code != requests.codes['accepted']:
|
|
1371
|
+
LOG.error('Could not set air conditioning at unlock (%s)', settings_response.status_code)
|
|
1372
|
+
raise SetterError(f'Could not set value ({settings_response.status_code})')
|
|
1373
|
+
except requests.exceptions.ConnectionError as connection_error:
|
|
1374
|
+
raise SetterError(f'Connection error: {connection_error}.'
|
|
1375
|
+
' If this happens frequently, please check if other applications communicate with the Skoda server.') from connection_error
|
|
1376
|
+
except requests.exceptions.ChunkedEncodingError as chunked_encoding_error:
|
|
1377
|
+
raise SetterError(f'Error: {chunked_encoding_error}') from chunked_encoding_error
|
|
1378
|
+
except requests.exceptions.ReadTimeout as timeout_error:
|
|
1379
|
+
raise SetterError(f'Timeout during read: {timeout_error}') from timeout_error
|
|
1380
|
+
except requests.exceptions.RetryError as retry_error:
|
|
1381
|
+
raise SetterError(f'Retrying failed: {retry_error}') from retry_error
|
|
1362
1382
|
return at_unlock_value
|
|
1363
1383
|
|
|
1364
1384
|
def __on_air_conditioning_window_heating_change(self, window_heating_attribute: BooleanAttribute, window_heating_value: bool) -> bool:
|
|
@@ -1374,10 +1394,20 @@ class Connector(BaseConnector):
|
|
|
1374
1394
|
setting_dict['windowHeatingEnabled'] = window_heating_value
|
|
1375
1395
|
|
|
1376
1396
|
url = f'https://mysmob.api.connect.skoda-auto.cz/api/v2/air-conditioning/{vin}/settings/ac-at-unlock'
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1397
|
+
try:
|
|
1398
|
+
settings_response: requests.Response = self.session.post(url, data=json.dumps(setting_dict), allow_redirects=True)
|
|
1399
|
+
if settings_response.status_code != requests.codes['accepted']:
|
|
1400
|
+
LOG.error('Could not set air conditioning window heating (%s)', settings_response.status_code)
|
|
1401
|
+
raise SetterError(f'Could not set value ({settings_response.status_code})')
|
|
1402
|
+
except requests.exceptions.ConnectionError as connection_error:
|
|
1403
|
+
raise SetterError(f'Connection error: {connection_error}.'
|
|
1404
|
+
' If this happens frequently, please check if other applications communicate with the Skoda server.') from connection_error
|
|
1405
|
+
except requests.exceptions.ChunkedEncodingError as chunked_encoding_error:
|
|
1406
|
+
raise SetterError(f'Error: {chunked_encoding_error}') from chunked_encoding_error
|
|
1407
|
+
except requests.exceptions.ReadTimeout as timeout_error:
|
|
1408
|
+
raise SetterError(f'Timeout during read: {timeout_error}') from timeout_error
|
|
1409
|
+
except requests.exceptions.RetryError as retry_error:
|
|
1410
|
+
raise SetterError(f'Retrying failed: {retry_error}') from retry_error
|
|
1381
1411
|
return window_heating_value
|
|
1382
1412
|
|
|
1383
1413
|
def __on_air_conditioning_start_stop(self, start_stop_command: ClimatizationStartStopCommand, command_arguments: Union[str, Dict[str, Any]]) \
|
|
@@ -1394,53 +1424,63 @@ class Connector(BaseConnector):
|
|
|
1394
1424
|
if 'command' not in command_arguments:
|
|
1395
1425
|
raise CommandError('Command argument missing')
|
|
1396
1426
|
command_dict = {}
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
if
|
|
1405
|
-
|
|
1406
|
-
|
|
1427
|
+
try:
|
|
1428
|
+
if command_arguments['command'] == ClimatizationStartStopCommand.Command.START:
|
|
1429
|
+
command_dict['heaterSource'] = 'ELECTRIC'
|
|
1430
|
+
command_dict['targetTemperature'] = {}
|
|
1431
|
+
if 'target_temperature' in command_arguments:
|
|
1432
|
+
# Round target temperature to nearest 0.5
|
|
1433
|
+
command_dict['targetTemperature']['temperatureValue'] = round(command_arguments['target_temperature'] * 2) / 2
|
|
1434
|
+
if 'target_temperature_unit' in command_arguments:
|
|
1435
|
+
if not isinstance(command_arguments['target_temperature_unit'], Temperature):
|
|
1436
|
+
raise CommandError('Temperature unit is not of type Temperature')
|
|
1437
|
+
if command_arguments['target_temperature_unit'] == Temperature.C:
|
|
1438
|
+
command_dict['targetTemperature']['unitInCar'] = 'CELSIUS'
|
|
1439
|
+
elif command_arguments['target_temperature_unit'] == Temperature.F:
|
|
1440
|
+
command_dict['targetTemperature']['unitInCar'] = 'FAHRENHEIT'
|
|
1441
|
+
elif command_arguments['target_temperature_unit'] == Temperature.K:
|
|
1442
|
+
command_dict['targetTemperature']['unitInCar'] = 'KELVIN'
|
|
1443
|
+
else:
|
|
1444
|
+
raise CommandError(f'Unknown temperature unit {command_arguments["target_temperature_unit"]}')
|
|
1445
|
+
else:
|
|
1407
1446
|
command_dict['targetTemperature']['unitInCar'] = 'CELSIUS'
|
|
1408
|
-
|
|
1447
|
+
elif start_stop_command.parent is not None and (climatization := start_stop_command.parent.parent) is not None \
|
|
1448
|
+
and isinstance(climatization, Climatization) and climatization.settings is not None \
|
|
1449
|
+
and climatization.settings.target_temperature is not None and climatization.settings.target_temperature.enabled \
|
|
1450
|
+
and climatization.settings.target_temperature.value is not None: # pylint: disable=too-many-boolean-expressions
|
|
1451
|
+
# Round target temperature to nearest 0.5
|
|
1452
|
+
command_dict['targetTemperature']['temperatureValue'] = round(climatization.settings.target_temperature.value * 2) / 2
|
|
1453
|
+
if climatization.settings.target_temperature.unit == Temperature.C:
|
|
1454
|
+
command_dict['targetTemperature']['unitInCar'] = 'CELSIUS'
|
|
1455
|
+
elif climatization.settings.target_temperature.unit == Temperature.F:
|
|
1409
1456
|
command_dict['targetTemperature']['unitInCar'] = 'FAHRENHEIT'
|
|
1410
|
-
elif
|
|
1457
|
+
elif climatization.settings.target_temperature.unit == Temperature.K:
|
|
1411
1458
|
command_dict['targetTemperature']['unitInCar'] = 'KELVIN'
|
|
1412
1459
|
else:
|
|
1413
|
-
raise CommandError(f'Unknown temperature unit {
|
|
1460
|
+
raise CommandError(f'Unknown temperature unit {climatization.settings.target_temperature.unit}')
|
|
1414
1461
|
else:
|
|
1462
|
+
command_dict['targetTemperature']['temperatureValue'] = 25.0
|
|
1415
1463
|
command_dict['targetTemperature']['unitInCar'] = 'CELSIUS'
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
command_dict['targetTemperature']['temperatureValue'] = round(climatization.settings.target_temperature.value * 2) / 2
|
|
1422
|
-
if climatization.settings.target_temperature.unit == Temperature.C:
|
|
1423
|
-
command_dict['targetTemperature']['unitInCar'] = 'CELSIUS'
|
|
1424
|
-
elif climatization.settings.target_temperature.unit == Temperature.F:
|
|
1425
|
-
command_dict['targetTemperature']['unitInCar'] = 'FAHRENHEIT'
|
|
1426
|
-
elif climatization.settings.target_temperature.unit == Temperature.K:
|
|
1427
|
-
command_dict['targetTemperature']['unitInCar'] = 'KELVIN'
|
|
1428
|
-
else:
|
|
1429
|
-
raise CommandError(f'Unknown temperature unit {climatization.settings.target_temperature.unit}')
|
|
1464
|
+
url = f'https://mysmob.api.connect.skoda-auto.cz/api/v2/air-conditioning/{vin}/start'
|
|
1465
|
+
command_response: requests.Response = self.session.post(url, data=json.dumps(command_dict), allow_redirects=True)
|
|
1466
|
+
elif command_arguments['command'] == ClimatizationStartStopCommand.Command.STOP:
|
|
1467
|
+
url = f'https://mysmob.api.connect.skoda-auto.cz/api/v2/air-conditioning/{vin}/stop'
|
|
1468
|
+
command_response: requests.Response = self.session.post(url, allow_redirects=True)
|
|
1430
1469
|
else:
|
|
1431
|
-
|
|
1432
|
-
command_dict['targetTemperature']['unitInCar'] = 'CELSIUS'
|
|
1433
|
-
url = f'https://mysmob.api.connect.skoda-auto.cz/api/v2/air-conditioning/{vin}/start'
|
|
1434
|
-
command_response: requests.Response = self.session.post(url, data=json.dumps(command_dict), allow_redirects=True)
|
|
1435
|
-
elif command_arguments['command'] == ClimatizationStartStopCommand.Command.STOP:
|
|
1436
|
-
url = f'https://mysmob.api.connect.skoda-auto.cz/api/v2/air-conditioning/{vin}/stop'
|
|
1437
|
-
command_response: requests.Response = self.session.post(url, allow_redirects=True)
|
|
1438
|
-
else:
|
|
1439
|
-
raise CommandError(f'Unknown command {command_arguments["command"]}')
|
|
1470
|
+
raise CommandError(f'Unknown command {command_arguments["command"]}')
|
|
1440
1471
|
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1472
|
+
if command_response.status_code != requests.codes['accepted']:
|
|
1473
|
+
LOG.error('Could not start/stop air conditioning (%s: %s)', command_response.status_code, command_response.text)
|
|
1474
|
+
raise CommandError(f'Could not start/stop air conditioning ({command_response.status_code}: {command_response.text})')
|
|
1475
|
+
except requests.exceptions.ConnectionError as connection_error:
|
|
1476
|
+
raise CommandError(f'Connection error: {connection_error}.'
|
|
1477
|
+
' If this happens frequently, please check if other applications communicate with the Skoda server.') from connection_error
|
|
1478
|
+
except requests.exceptions.ChunkedEncodingError as chunked_encoding_error:
|
|
1479
|
+
raise CommandError(f'Error: {chunked_encoding_error}') from chunked_encoding_error
|
|
1480
|
+
except requests.exceptions.ReadTimeout as timeout_error:
|
|
1481
|
+
raise CommandError(f'Timeout during read: {timeout_error}') from timeout_error
|
|
1482
|
+
except requests.exceptions.RetryError as retry_error:
|
|
1483
|
+
raise CommandError(f'Retrying failed: {retry_error}') from retry_error
|
|
1444
1484
|
return command_arguments
|
|
1445
1485
|
|
|
1446
1486
|
def __on_charging_start_stop(self, start_stop_command: ChargingStartStopCommand, command_arguments: Union[str, Dict[str, Any]]) \
|
|
@@ -1456,18 +1496,29 @@ class Connector(BaseConnector):
|
|
|
1456
1496
|
raise CommandError('VIN in object hierarchy missing')
|
|
1457
1497
|
if 'command' not in command_arguments:
|
|
1458
1498
|
raise CommandError('Command argument missing')
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1499
|
+
try:
|
|
1500
|
+
if command_arguments['command'] == ChargingStartStopCommand.Command.START:
|
|
1501
|
+
url = f'https://mysmob.api.connect.skoda-auto.cz/api/v1/charging/{vin}/start'
|
|
1502
|
+
command_response: requests.Response = self.session.post(url, allow_redirects=True)
|
|
1503
|
+
elif command_arguments['command'] == ChargingStartStopCommand.Command.STOP:
|
|
1504
|
+
url = f'https://mysmob.api.connect.skoda-auto.cz/api/v1/charging/{vin}/stop'
|
|
1505
|
+
|
|
1506
|
+
command_response: requests.Response = self.session.post(url, allow_redirects=True)
|
|
1507
|
+
else:
|
|
1508
|
+
raise CommandError(f'Unknown command {command_arguments["command"]}')
|
|
1467
1509
|
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1510
|
+
if command_response.status_code != requests.codes['accepted']:
|
|
1511
|
+
LOG.error('Could not start/stop charging (%s: %s)', command_response.status_code, command_response.text)
|
|
1512
|
+
raise CommandError(f'Could not start/stop charging ({command_response.status_code}: {command_response.text})')
|
|
1513
|
+
except requests.exceptions.ConnectionError as connection_error:
|
|
1514
|
+
raise CommandError(f'Connection error: {connection_error}.'
|
|
1515
|
+
' If this happens frequently, please check if other applications communicate with the Skoda server.') from connection_error
|
|
1516
|
+
except requests.exceptions.ChunkedEncodingError as chunked_encoding_error:
|
|
1517
|
+
raise CommandError(f'Error: {chunked_encoding_error}') from chunked_encoding_error
|
|
1518
|
+
except requests.exceptions.ReadTimeout as timeout_error:
|
|
1519
|
+
raise CommandError(f'Timeout during read: {timeout_error}') from timeout_error
|
|
1520
|
+
except requests.exceptions.RetryError as retry_error:
|
|
1521
|
+
raise CommandError(f'Retrying failed: {retry_error}') from retry_error
|
|
1471
1522
|
return command_arguments
|
|
1472
1523
|
|
|
1473
1524
|
def __on_honk_flash(self, honk_flash_command: HonkAndFlashCommand, command_arguments: Union[str, Dict[str, Any]]) \
|
|
@@ -1497,10 +1548,20 @@ class Connector(BaseConnector):
|
|
|
1497
1548
|
command_dict['vehiclePosition']['longitude'] = vehicle.position.longitude.value
|
|
1498
1549
|
|
|
1499
1550
|
url = f'https://mysmob.api.connect.skoda-auto.cz/api/v1/vehicle-access/{vin}/honk-and-flash'
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1551
|
+
try:
|
|
1552
|
+
command_response: requests.Response = self.session.post(url, data=json.dumps(command_dict), allow_redirects=True)
|
|
1553
|
+
if command_response.status_code != requests.codes['accepted']:
|
|
1554
|
+
LOG.error('Could not execute honk or flash command (%s: %s)', command_response.status_code, command_response.text)
|
|
1555
|
+
raise CommandError(f'Could not execute honk or flash command ({command_response.status_code}: {command_response.text})')
|
|
1556
|
+
except requests.exceptions.ConnectionError as connection_error:
|
|
1557
|
+
raise CommandError(f'Connection error: {connection_error}.'
|
|
1558
|
+
' If this happens frequently, please check if other applications communicate with the Skoda server.') from connection_error
|
|
1559
|
+
except requests.exceptions.ChunkedEncodingError as chunked_encoding_error:
|
|
1560
|
+
raise SetterError(f'Error: {chunked_encoding_error}') from chunked_encoding_error
|
|
1561
|
+
except requests.exceptions.ReadTimeout as timeout_error:
|
|
1562
|
+
raise CommandError(f'Timeout during read: {timeout_error}') from timeout_error
|
|
1563
|
+
except requests.exceptions.RetryError as retry_error:
|
|
1564
|
+
raise CommandError(f'Retrying failed: {retry_error}') from retry_error
|
|
1504
1565
|
else:
|
|
1505
1566
|
raise CommandError(f'Unknown command {command_arguments["command"]}')
|
|
1506
1567
|
return command_arguments
|
|
@@ -1531,10 +1592,20 @@ class Connector(BaseConnector):
|
|
|
1531
1592
|
url = f'https://mysmob.api.connect.skoda-auto.cz/api/v1/vehicle-access/{vin}/unlock'
|
|
1532
1593
|
else:
|
|
1533
1594
|
raise CommandError(f'Unknown command {command_arguments["command"]}')
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1595
|
+
try:
|
|
1596
|
+
command_response: requests.Response = self.session.post(url, data=json.dumps(command_dict), allow_redirects=True)
|
|
1597
|
+
if command_response.status_code != requests.codes['accepted']:
|
|
1598
|
+
LOG.error('Could not execute locking command (%s: %s)', command_response.status_code, command_response.text)
|
|
1599
|
+
raise CommandError(f'Could not execute locking command ({command_response.status_code}: {command_response.text})')
|
|
1600
|
+
except requests.exceptions.ConnectionError as connection_error:
|
|
1601
|
+
raise CommandError(f'Connection error: {connection_error}.'
|
|
1602
|
+
' If this happens frequently, please check if other applications communicate with the Skoda server.') from connection_error
|
|
1603
|
+
except requests.exceptions.ChunkedEncodingError as chunked_encoding_error:
|
|
1604
|
+
raise CommandError(f'Error: {chunked_encoding_error}') from chunked_encoding_error
|
|
1605
|
+
except requests.exceptions.ReadTimeout as timeout_error:
|
|
1606
|
+
raise CommandError(f'Timeout during read: {timeout_error}') from timeout_error
|
|
1607
|
+
except requests.exceptions.RetryError as retry_error:
|
|
1608
|
+
raise CommandError(f'Retrying failed: {retry_error}') from retry_error
|
|
1538
1609
|
return command_arguments
|
|
1539
1610
|
|
|
1540
1611
|
def __on_wake_sleep(self, wake_sleep_command: WakeSleepCommand, command_arguments: Union[str, Dict[str, Any]]) \
|
|
@@ -1553,10 +1624,20 @@ class Connector(BaseConnector):
|
|
|
1553
1624
|
if command_arguments['command'] == WakeSleepCommand.Command.WAKE:
|
|
1554
1625
|
url = f'https://mysmob.api.connect.skoda-auto.cz/api/v1/vehicle-wakeup/{vin}?applyRequestLimiter=true'
|
|
1555
1626
|
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1627
|
+
try:
|
|
1628
|
+
command_response: requests.Response = self.session.post(url, data='{}', allow_redirects=True)
|
|
1629
|
+
if command_response.status_code != requests.codes['accepted']:
|
|
1630
|
+
LOG.error('Could not execute wake command (%s: %s)', command_response.status_code, command_response.text)
|
|
1631
|
+
raise CommandError(f'Could not execute wake command ({command_response.status_code}: {command_response.text})')
|
|
1632
|
+
except requests.exceptions.ConnectionError as connection_error:
|
|
1633
|
+
raise CommandError(f'Connection error: {connection_error}.'
|
|
1634
|
+
' If this happens frequently, please check if other applications communicate with the Skoda server.') from connection_error
|
|
1635
|
+
except requests.exceptions.ChunkedEncodingError as chunked_encoding_error:
|
|
1636
|
+
raise CommandError(f'Error: {chunked_encoding_error}') from chunked_encoding_error
|
|
1637
|
+
except requests.exceptions.ReadTimeout as timeout_error:
|
|
1638
|
+
raise CommandError(f'Timeout during read: {timeout_error}') from timeout_error
|
|
1639
|
+
except requests.exceptions.RetryError as retry_error:
|
|
1640
|
+
raise CommandError(f'Retrying failed: {retry_error}') from retry_error
|
|
1560
1641
|
elif command_arguments['command'] == WakeSleepCommand.Command.SLEEP:
|
|
1561
1642
|
raise CommandError('Sleep command not supported by vehicle. Vehicle will put itself to sleep')
|
|
1562
1643
|
else:
|
|
@@ -1583,10 +1664,20 @@ class Connector(BaseConnector):
|
|
|
1583
1664
|
url = 'https://mysmob.api.connect.skoda-auto.cz/api/v1/spin/verify'
|
|
1584
1665
|
else:
|
|
1585
1666
|
raise CommandError(f'Unknown command {command_arguments["command"]}')
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1667
|
+
try:
|
|
1668
|
+
command_response: requests.Response = self.session.post(url, data=json.dumps(command_dict), allow_redirects=True)
|
|
1669
|
+
if command_response.status_code != requests.codes['ok']:
|
|
1670
|
+
LOG.error('Could not execute spin command (%s: %s)', command_response.status_code, command_response.text)
|
|
1671
|
+
raise CommandError(f'Could not execute spin command ({command_response.status_code}: {command_response.text})')
|
|
1672
|
+
else:
|
|
1673
|
+
LOG.info('Spin verify command executed successfully')
|
|
1674
|
+
except requests.exceptions.ConnectionError as connection_error:
|
|
1675
|
+
raise CommandError(f'Connection error: {connection_error}.'
|
|
1676
|
+
' If this happens frequently, please check if other applications communicate with the Skoda server.') from connection_error
|
|
1677
|
+
except requests.exceptions.ChunkedEncodingError as chunked_encoding_error:
|
|
1678
|
+
raise CommandError(f'Error: {chunked_encoding_error}') from chunked_encoding_error
|
|
1679
|
+
except requests.exceptions.ReadTimeout as timeout_error:
|
|
1680
|
+
raise CommandError(f'Timeout during read: {timeout_error}') from timeout_error
|
|
1681
|
+
except requests.exceptions.RetryError as retry_error:
|
|
1682
|
+
raise CommandError(f'Retrying failed: {retry_error}') from retry_error
|
|
1592
1683
|
return command_arguments
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{carconnectivity_connector_skoda-0.4a2 → carconnectivity_connector_skoda-0.4a3}/CHANGELOG.md
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{carconnectivity_connector_skoda-0.4a2 → carconnectivity_connector_skoda-0.4a3}/doc/Config.md
RENAMED
|
File without changes
|
{carconnectivity_connector_skoda-0.4a2 → carconnectivity_connector_skoda-0.4a3}/pyproject.toml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|