carconnectivity-connector-skoda 0.4a7__tar.gz → 0.4.1__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.4.1/CHANGELOG.md +45 -0
- {carconnectivity_connector_skoda-0.4a7 → carconnectivity_connector_skoda-0.4.1}/PKG-INFO +2 -2
- {carconnectivity_connector_skoda-0.4a7 → carconnectivity_connector_skoda-0.4.1}/pyproject.toml +1 -1
- {carconnectivity_connector_skoda-0.4a7 → carconnectivity_connector_skoda-0.4.1}/src/carconnectivity_connector_skoda.egg-info/PKG-INFO +2 -2
- {carconnectivity_connector_skoda-0.4a7 → carconnectivity_connector_skoda-0.4.1}/src/carconnectivity_connector_skoda.egg-info/requires.txt +1 -1
- {carconnectivity_connector_skoda-0.4a7 → carconnectivity_connector_skoda-0.4.1}/src/carconnectivity_connectors/skoda/_version.py +2 -2
- {carconnectivity_connector_skoda-0.4a7 → carconnectivity_connector_skoda-0.4.1}/src/carconnectivity_connectors/skoda/capability.py +11 -4
- {carconnectivity_connector_skoda-0.4a7 → carconnectivity_connector_skoda-0.4.1}/src/carconnectivity_connectors/skoda/connector.py +43 -8
- {carconnectivity_connector_skoda-0.4a7 → carconnectivity_connector_skoda-0.4.1}/src/carconnectivity_connectors/skoda/mqtt_client.py +7 -2
- carconnectivity_connector_skoda-0.4a7/CHANGELOG.md +0 -25
- {carconnectivity_connector_skoda-0.4a7 → carconnectivity_connector_skoda-0.4.1}/.flake8 +0 -0
- {carconnectivity_connector_skoda-0.4a7 → carconnectivity_connector_skoda-0.4.1}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
- {carconnectivity_connector_skoda-0.4a7 → carconnectivity_connector_skoda-0.4.1}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
- {carconnectivity_connector_skoda-0.4a7 → carconnectivity_connector_skoda-0.4.1}/.github/dependabot.yml +0 -0
- {carconnectivity_connector_skoda-0.4a7 → carconnectivity_connector_skoda-0.4.1}/.github/workflows/build.yml +0 -0
- {carconnectivity_connector_skoda-0.4a7 → carconnectivity_connector_skoda-0.4.1}/.github/workflows/build_and_publish.yml +0 -0
- {carconnectivity_connector_skoda-0.4a7 → carconnectivity_connector_skoda-0.4.1}/.github/workflows/codeql-analysis.yml +0 -0
- {carconnectivity_connector_skoda-0.4a7 → carconnectivity_connector_skoda-0.4.1}/.gitignore +0 -0
- {carconnectivity_connector_skoda-0.4a7 → carconnectivity_connector_skoda-0.4.1}/LICENSE +0 -0
- {carconnectivity_connector_skoda-0.4a7 → carconnectivity_connector_skoda-0.4.1}/Makefile +0 -0
- {carconnectivity_connector_skoda-0.4a7 → carconnectivity_connector_skoda-0.4.1}/README.md +0 -0
- {carconnectivity_connector_skoda-0.4a7 → carconnectivity_connector_skoda-0.4.1}/doc/Config.md +0 -0
- {carconnectivity_connector_skoda-0.4a7 → carconnectivity_connector_skoda-0.4.1}/setup.cfg +0 -0
- {carconnectivity_connector_skoda-0.4a7 → carconnectivity_connector_skoda-0.4.1}/setup_requirements.txt +0 -0
- {carconnectivity_connector_skoda-0.4a7 → carconnectivity_connector_skoda-0.4.1}/src/carconnectivity_connector_skoda.egg-info/SOURCES.txt +0 -0
- {carconnectivity_connector_skoda-0.4a7 → carconnectivity_connector_skoda-0.4.1}/src/carconnectivity_connector_skoda.egg-info/dependency_links.txt +0 -0
- {carconnectivity_connector_skoda-0.4a7 → carconnectivity_connector_skoda-0.4.1}/src/carconnectivity_connector_skoda.egg-info/top_level.txt +0 -0
- {carconnectivity_connector_skoda-0.4a7 → carconnectivity_connector_skoda-0.4.1}/src/carconnectivity_connectors/skoda/__init__.py +0 -0
- {carconnectivity_connector_skoda-0.4a7 → carconnectivity_connector_skoda-0.4.1}/src/carconnectivity_connectors/skoda/auth/__init__.py +0 -0
- {carconnectivity_connector_skoda-0.4a7 → carconnectivity_connector_skoda-0.4.1}/src/carconnectivity_connectors/skoda/auth/auth_util.py +0 -0
- {carconnectivity_connector_skoda-0.4a7 → carconnectivity_connector_skoda-0.4.1}/src/carconnectivity_connectors/skoda/auth/helpers/blacklist_retry.py +0 -0
- {carconnectivity_connector_skoda-0.4a7 → carconnectivity_connector_skoda-0.4.1}/src/carconnectivity_connectors/skoda/auth/my_skoda_session.py +0 -0
- {carconnectivity_connector_skoda-0.4a7 → carconnectivity_connector_skoda-0.4.1}/src/carconnectivity_connectors/skoda/auth/openid_session.py +0 -0
- {carconnectivity_connector_skoda-0.4a7 → carconnectivity_connector_skoda-0.4.1}/src/carconnectivity_connectors/skoda/auth/session_manager.py +0 -0
- {carconnectivity_connector_skoda-0.4a7 → carconnectivity_connector_skoda-0.4.1}/src/carconnectivity_connectors/skoda/auth/skoda_web_session.py +0 -0
- {carconnectivity_connector_skoda-0.4a7 → carconnectivity_connector_skoda-0.4.1}/src/carconnectivity_connectors/skoda/charging.py +0 -0
- {carconnectivity_connector_skoda-0.4a7 → carconnectivity_connector_skoda-0.4.1}/src/carconnectivity_connectors/skoda/climatization.py +0 -0
- {carconnectivity_connector_skoda-0.4a7 → carconnectivity_connector_skoda-0.4.1}/src/carconnectivity_connectors/skoda/command_impl.py +0 -0
- {carconnectivity_connector_skoda-0.4a7 → carconnectivity_connector_skoda-0.4.1}/src/carconnectivity_connectors/skoda/error.py +0 -0
- {carconnectivity_connector_skoda-0.4a7 → carconnectivity_connector_skoda-0.4.1}/src/carconnectivity_connectors/skoda/ui/connector_ui.py +0 -0
- {carconnectivity_connector_skoda-0.4a7 → carconnectivity_connector_skoda-0.4.1}/src/carconnectivity_connectors/skoda/vehicle.py +0 -0
- {carconnectivity_connector_skoda-0.4a7 → carconnectivity_connector_skoda-0.4.1}/test/integration_test/carConnectivity.json +0 -0
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
## [Unreleased]
|
|
6
|
+
- No unreleased changes so far
|
|
7
|
+
|
|
8
|
+
## [0.4.1] - 2025-03-04
|
|
9
|
+
### Fixed
|
|
10
|
+
- Fixed potential http error when parking position was fetched but due to error not available
|
|
11
|
+
|
|
12
|
+
## [0.4] - 2025-03-02
|
|
13
|
+
### Added
|
|
14
|
+
- Added better feedback when consent is needed
|
|
15
|
+
- added better access to connection state
|
|
16
|
+
- added better access to health state
|
|
17
|
+
- added attribute for vehicle in_motion
|
|
18
|
+
- added possibility to online change interval
|
|
19
|
+
- added named threads for better debugging
|
|
20
|
+
- added vehcile connection state
|
|
21
|
+
- added global vehicle state
|
|
22
|
+
- added maintainance objects
|
|
23
|
+
- added checks for min/max values with climatization temperatures
|
|
24
|
+
- improved error handling with commands
|
|
25
|
+
|
|
26
|
+
## [0.3] - 2025-02-19
|
|
27
|
+
### Added
|
|
28
|
+
- Added support for images
|
|
29
|
+
- Added tags to attributes
|
|
30
|
+
- Added support for webui via carconnectivity-plugin-webui
|
|
31
|
+
|
|
32
|
+
## [0.2] - 2025-02-02
|
|
33
|
+
### Added
|
|
34
|
+
- Wake Sleep command
|
|
35
|
+
|
|
36
|
+
## [0.1] - 2025-01-25
|
|
37
|
+
Initial release, let's go and give this to the public to try out...
|
|
38
|
+
The API is not yet implemented completely but most functions already work
|
|
39
|
+
|
|
40
|
+
[unreleased]: https://github.com/tillsteinbach/CarConnectivity-connector-skoda/compare/v0.4.1...HEAD
|
|
41
|
+
[0.4.1]: https://github.com/tillsteinbach/CarConnectivity-connector-skoda/releases/tag/v0.4.1
|
|
42
|
+
[0.4]: https://github.com/tillsteinbach/CarConnectivity-connector-skoda/releases/tag/v0.4
|
|
43
|
+
[0.3]: https://github.com/tillsteinbach/CarConnectivity-connector-skoda/releases/tag/v0.3
|
|
44
|
+
[0.2]: https://github.com/tillsteinbach/CarConnectivity-connector-skoda/releases/tag/v0.2
|
|
45
|
+
[0.1]: https://github.com/tillsteinbach/CarConnectivity-connector-skoda/releases/tag/v0.1
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.2
|
|
2
2
|
Name: carconnectivity-connector-skoda
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.4.1
|
|
4
4
|
Summary: CarConnectivity connector for Skoda services
|
|
5
5
|
Author: Till Steinbach
|
|
6
6
|
License: MIT License
|
|
@@ -37,7 +37,7 @@ Classifier: Topic :: Software Development :: Libraries
|
|
|
37
37
|
Requires-Python: >=3.8
|
|
38
38
|
Description-Content-Type: text/markdown
|
|
39
39
|
License-File: LICENSE
|
|
40
|
-
Requires-Dist: carconnectivity>=0.
|
|
40
|
+
Requires-Dist: carconnectivity>=0.4
|
|
41
41
|
Requires-Dist: oauthlib~=3.2.2
|
|
42
42
|
Requires-Dist: requests~=2.32.3
|
|
43
43
|
Requires-Dist: jwt~=1.3.1
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.2
|
|
2
2
|
Name: carconnectivity-connector-skoda
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.4.1
|
|
4
4
|
Summary: CarConnectivity connector for Skoda services
|
|
5
5
|
Author: Till Steinbach
|
|
6
6
|
License: MIT License
|
|
@@ -37,7 +37,7 @@ Classifier: Topic :: Software Development :: Libraries
|
|
|
37
37
|
Requires-Python: >=3.8
|
|
38
38
|
Description-Content-Type: text/markdown
|
|
39
39
|
License-File: LICENSE
|
|
40
|
-
Requires-Dist: carconnectivity>=0.
|
|
40
|
+
Requires-Dist: carconnectivity>=0.4
|
|
41
41
|
Requires-Dist: oauthlib~=3.2.2
|
|
42
42
|
Requires-Dist: requests~=2.32.3
|
|
43
43
|
Requires-Dist: jwt~=1.3.1
|
|
@@ -5,7 +5,7 @@ from typing import TYPE_CHECKING
|
|
|
5
5
|
from enum import IntEnum
|
|
6
6
|
|
|
7
7
|
from carconnectivity.objects import GenericObject
|
|
8
|
-
from carconnectivity.attributes import StringAttribute
|
|
8
|
+
from carconnectivity.attributes import StringAttribute, GenericAttribute
|
|
9
9
|
|
|
10
10
|
if TYPE_CHECKING:
|
|
11
11
|
from typing import Dict, Optional
|
|
@@ -77,7 +77,7 @@ class Capabilities(GenericObject):
|
|
|
77
77
|
"""
|
|
78
78
|
return self.__capabilities.get(capability_id)
|
|
79
79
|
|
|
80
|
-
def has_capability(self, capability_id: str) -> bool:
|
|
80
|
+
def has_capability(self, capability_id: str, check_status_ok=False) -> bool:
|
|
81
81
|
"""
|
|
82
82
|
Check if the Capabilities contains a capability with the specified ID.
|
|
83
83
|
|
|
@@ -87,7 +87,14 @@ class Capabilities(GenericObject):
|
|
|
87
87
|
Returns:
|
|
88
88
|
bool: True if the capability exists, otherwise False.
|
|
89
89
|
"""
|
|
90
|
-
|
|
90
|
+
if check_status_ok:
|
|
91
|
+
if capability_id in self.__capabilities and self.__capabilities[capability_id].enabled:
|
|
92
|
+
capability: Capability = self.__capabilities[capability_id]
|
|
93
|
+
if capability.status.enabled and capability.status.value is not None and len(capability.status.value) > 0:
|
|
94
|
+
return False
|
|
95
|
+
return True
|
|
96
|
+
return False
|
|
97
|
+
return capability_id in self.__capabilities and self.__capabilities[capability_id].enabled
|
|
91
98
|
|
|
92
99
|
|
|
93
100
|
class Capability(GenericObject):
|
|
@@ -103,7 +110,7 @@ class Capability(GenericObject):
|
|
|
103
110
|
super().__init__(object_id=capability_id, parent=capabilities)
|
|
104
111
|
self.delay_notifications = True
|
|
105
112
|
self.capability_id = StringAttribute("id", self, capability_id, tags={'connector_custom'})
|
|
106
|
-
self.
|
|
113
|
+
self.status = GenericAttribute("status", self, value=[], tags={'connector_custom'})
|
|
107
114
|
self.enabled = True
|
|
108
115
|
self.delay_notifications = False
|
|
109
116
|
|
|
@@ -83,6 +83,8 @@ class Connector(BaseConnector):
|
|
|
83
83
|
|
|
84
84
|
self.connection_state: EnumAttribute = EnumAttribute(name="connection_state", parent=self, value_type=ConnectionState,
|
|
85
85
|
value=ConnectionState.DISCONNECTED, tags={'connector_custom'})
|
|
86
|
+
self.rest_connected: bool = False
|
|
87
|
+
self.mqtt_connected: bool = False
|
|
86
88
|
self.interval: DurationAttribute = DurationAttribute(name="interval", parent=self, tags={'connector_custom'})
|
|
87
89
|
self.interval.minimum = timedelta(seconds=180)
|
|
88
90
|
self.interval._is_changeable = True # pylint: disable=protected-access
|
|
@@ -201,25 +203,43 @@ class Connector(BaseConnector):
|
|
|
201
203
|
raise
|
|
202
204
|
except TooManyRequestsError as err:
|
|
203
205
|
LOG.error('Retrieval error during update. Too many requests from your account (%s). Will try again after 15 minutes', str(err))
|
|
206
|
+
self.connection_state._set_value(value=ConnectionState.ERROR) # pylint: disable=protected-access
|
|
207
|
+
self.rest_connected = False
|
|
204
208
|
self._stop_event.wait(900)
|
|
205
209
|
except RetrievalError as err:
|
|
206
210
|
LOG.error('Retrieval error during update (%s). Will try again after configured interval of %ss', str(err), interval)
|
|
211
|
+
self.connection_state._set_value(value=ConnectionState.ERROR) # pylint: disable=protected-access
|
|
212
|
+
self.rest_connected = False
|
|
207
213
|
self._stop_event.wait(interval)
|
|
208
214
|
except APIError as err:
|
|
209
215
|
LOG.error('API error during update (%s). Will try again after configured interval of %ss', str(err), interval)
|
|
216
|
+
self.connection_state._set_value(value=ConnectionState.ERROR) # pylint: disable=protected-access
|
|
217
|
+
self.rest_connected = False
|
|
210
218
|
self._stop_event.wait(interval)
|
|
211
219
|
except APICompatibilityError as err:
|
|
212
220
|
LOG.error('API compatability error during update (%s). Will try again after configured interval of %ss', str(err), interval)
|
|
221
|
+
self.connection_state._set_value(value=ConnectionState.ERROR) # pylint: disable=protected-access
|
|
222
|
+
self.rest_connected = False
|
|
213
223
|
self._stop_event.wait(interval)
|
|
214
224
|
except TemporaryAuthenticationError as err:
|
|
215
225
|
LOG.error('Temporary authentification error during update (%s). Will try again after configured interval of %ss', str(err), interval)
|
|
226
|
+
self.connection_state._set_value(value=ConnectionState.ERROR) # pylint: disable=protected-access
|
|
227
|
+
self.rest_connected = False
|
|
216
228
|
self._stop_event.wait(interval)
|
|
217
229
|
except Exception as err:
|
|
218
230
|
LOG.critical('Critical error during update: %s', traceback.format_exc())
|
|
231
|
+
self.connection_state._set_value(value=ConnectionState.ERROR) # pylint: disable=protected-access
|
|
232
|
+
self.rest_connected = False
|
|
219
233
|
self.healthy._set_value(value=False) # pylint: disable=protected-access
|
|
220
234
|
raise err
|
|
221
235
|
else:
|
|
236
|
+
self.rest_connected = True
|
|
237
|
+
if self.mqtt_connected:
|
|
238
|
+
self.connection_state._set_value(value=ConnectionState.CONNECTED) # pylint: disable=protected-access
|
|
222
239
|
self._stop_event.wait(interval)
|
|
240
|
+
# When leaving the loop, set the connection state to disconnected
|
|
241
|
+
self.connection_state._set_value(value=ConnectionState.DISCONNECTED) # pylint: disable=protected-access
|
|
242
|
+
self.rest_connected = False
|
|
223
243
|
|
|
224
244
|
def persist(self) -> None:
|
|
225
245
|
"""
|
|
@@ -353,15 +373,15 @@ class Connector(BaseConnector):
|
|
|
353
373
|
vehicle_to_update = self.fetch_vehicle_status(vehicle_to_update)
|
|
354
374
|
vehicle_to_update = self.fetch_driving_range(vehicle_to_update)
|
|
355
375
|
if vehicle_to_update.capabilities is not None and vehicle_to_update.capabilities.enabled:
|
|
356
|
-
if vehicle_to_update.capabilities.has_capability('READINESS'):
|
|
376
|
+
if vehicle_to_update.capabilities.has_capability('READINESS', check_status_ok=True):
|
|
357
377
|
vehicle_to_update = self.fetch_connection_status(vehicle_to_update)
|
|
358
|
-
if vehicle_to_update.capabilities.has_capability('PARKING_POSITION'):
|
|
378
|
+
if vehicle_to_update.capabilities.has_capability('PARKING_POSITION', check_status_ok=True):
|
|
359
379
|
vehicle_to_update = self.fetch_position(vehicle_to_update)
|
|
360
|
-
if vehicle_to_update.capabilities.has_capability('CHARGING') and isinstance(vehicle_to_update, SkodaElectricVehicle):
|
|
380
|
+
if vehicle_to_update.capabilities.has_capability('CHARGING', check_status_ok=True) and isinstance(vehicle_to_update, SkodaElectricVehicle):
|
|
361
381
|
vehicle_to_update = self.fetch_charging(vehicle_to_update)
|
|
362
|
-
if vehicle_to_update.capabilities.has_capability('AIR_CONDITIONING'):
|
|
382
|
+
if vehicle_to_update.capabilities.has_capability('AIR_CONDITIONING', check_status_ok=True):
|
|
363
383
|
vehicle_to_update = self.fetch_air_conditioning(vehicle_to_update)
|
|
364
|
-
if vehicle_to_update.capabilities.has_capability('VEHICLE_HEALTH_INSPECTION'):
|
|
384
|
+
if vehicle_to_update.capabilities.has_capability('VEHICLE_HEALTH_INSPECTION', check_status_ok=True):
|
|
365
385
|
vehicle_to_update = self.fetch_maintenance(vehicle_to_update)
|
|
366
386
|
vehicle_to_update = self.decide_state(vehicle_to_update)
|
|
367
387
|
self.car_connectivity.transaction_end()
|
|
@@ -1014,6 +1034,20 @@ class Connector(BaseConnector):
|
|
|
1014
1034
|
else:
|
|
1015
1035
|
capability = Capability(capability_id=capability_id, capabilities=vehicle.capabilities)
|
|
1016
1036
|
vehicle.capabilities.add_capability(capability_id, capability)
|
|
1037
|
+
if 'statuses' in capability_dict and capability_dict['statuses'] is not None:
|
|
1038
|
+
statuses = capability_dict['statuses']
|
|
1039
|
+
if isinstance(statuses, list):
|
|
1040
|
+
for status in statuses:
|
|
1041
|
+
if status in [item.name for item in Capability.Status]:
|
|
1042
|
+
capability.status.value.append(Capability.Status[status])
|
|
1043
|
+
else:
|
|
1044
|
+
LOG_API.warning('Capability status unkown %s', status)
|
|
1045
|
+
capability.status.value.append(Capability.Status.UNKNOWN)
|
|
1046
|
+
else:
|
|
1047
|
+
LOG_API.warning('Capability status not a list in %s', statuses)
|
|
1048
|
+
else:
|
|
1049
|
+
capability.status.value.clear()
|
|
1050
|
+
log_extra_keys(LOG_API, 'capability', capability_dict, {'id', 'statuses'})
|
|
1017
1051
|
else:
|
|
1018
1052
|
raise APIError('Could not parse capability, id missing')
|
|
1019
1053
|
for capability_id in vehicle.capabilities.capabilities.keys() - found_capabilities:
|
|
@@ -1023,7 +1057,7 @@ class Connector(BaseConnector):
|
|
|
1023
1057
|
else:
|
|
1024
1058
|
vehicle.capabilities.clear_capabilities()
|
|
1025
1059
|
|
|
1026
|
-
if vehicle.capabilities.has_capability('VEHICLE_WAKE_UP_TRIGGER'):
|
|
1060
|
+
if vehicle.capabilities.has_capability('VEHICLE_WAKE_UP_TRIGGER', check_status_ok=True):
|
|
1027
1061
|
if vehicle.commands is not None and vehicle.commands.commands is not None \
|
|
1028
1062
|
and not vehicle.commands.contains_command('wake-sleep'):
|
|
1029
1063
|
wake_sleep_command = WakeSleepCommand(parent=vehicle.commands)
|
|
@@ -1032,7 +1066,8 @@ class Connector(BaseConnector):
|
|
|
1032
1066
|
vehicle.commands.add_command(wake_sleep_command)
|
|
1033
1067
|
|
|
1034
1068
|
# Add HONK_AND_FLASH command if necessary capabilities are available
|
|
1035
|
-
if vehicle.capabilities.has_capability('HONK_AND_FLASH')
|
|
1069
|
+
if vehicle.capabilities.has_capability('HONK_AND_FLASH', check_status_ok=True) \
|
|
1070
|
+
and vehicle.capabilities.has_capability('PARKING_POSITION', check_status_ok=True):
|
|
1036
1071
|
if vehicle.commands is not None and vehicle.commands.commands is not None \
|
|
1037
1072
|
and not vehicle.commands.contains_command('honk-flash'):
|
|
1038
1073
|
honk_flash_command = HonkAndFlashCommand(parent=vehicle.commands)
|
|
@@ -1041,7 +1076,7 @@ class Connector(BaseConnector):
|
|
|
1041
1076
|
vehicle.commands.add_command(honk_flash_command)
|
|
1042
1077
|
|
|
1043
1078
|
# Add lock and unlock command
|
|
1044
|
-
if vehicle.capabilities.has_capability('ACCESS'):
|
|
1079
|
+
if vehicle.capabilities.has_capability('ACCESS', check_status_ok=True):
|
|
1045
1080
|
if vehicle.doors is not None and vehicle.doors.commands is not None and vehicle.doors.commands.commands is not None \
|
|
1046
1081
|
and not vehicle.doors.commands.contains_command('lock-unlock'):
|
|
1047
1082
|
lock_unlock_command = LockUnlockCommand(parent=vehicle.doors.commands)
|
|
@@ -22,6 +22,7 @@ from carconnectivity.util import robust_time_parse, log_extra_keys
|
|
|
22
22
|
from carconnectivity.charging import Charging
|
|
23
23
|
from carconnectivity.climatization import Climatization
|
|
24
24
|
from carconnectivity.units import Speed, Power, Length
|
|
25
|
+
from carconnectivity.enums import ConnectionState
|
|
25
26
|
|
|
26
27
|
from carconnectivity_connectors.skoda.vehicle import SkodaVehicle, SkodaElectricVehicle
|
|
27
28
|
from carconnectivity_connectors.skoda.charging import SkodaCharging, mapping_skoda_charging_state
|
|
@@ -77,6 +78,7 @@ class SkodaMQTTClient(Client): # pylint: disable=too-many-instance-attributes
|
|
|
77
78
|
Returns:
|
|
78
79
|
MQTTErrorCode: The result of the connection attempt.
|
|
79
80
|
"""
|
|
81
|
+
self._skoda_connector.connection_state._set_value(value=ConnectionState.CONNECTING) # pylint: disable=protected-access
|
|
80
82
|
return super().connect(*args, host='mqtt.messagehub.de', port=8883, keepalive=60, **kwargs)
|
|
81
83
|
|
|
82
84
|
def _on_pre_connect_callback(self, client: Client, userdata: Any) -> None:
|
|
@@ -312,7 +314,9 @@ class SkodaMQTTClient(Client): # pylint: disable=too-many-instance-attributes
|
|
|
312
314
|
# reason_code 0 means success
|
|
313
315
|
if reason_code == 0:
|
|
314
316
|
LOG.info('Connected to Skoda MQTT server')
|
|
315
|
-
self._skoda_connector.
|
|
317
|
+
if self._skoda_connector.rest_connected:
|
|
318
|
+
self._skoda_connector.connection_state._set_value(value=ConnectionState.CONNECTED) # pylint: disable=protected-access
|
|
319
|
+
self._skoda_connector.mqtt_connected = True
|
|
316
320
|
observer_flags: Observable.ObserverEvent = Observable.ObserverEvent.ENABLED | Observable.ObserverEvent.DISABLED
|
|
317
321
|
self._skoda_connector.car_connectivity.garage.add_observer(observer=self._on_carconnectivity_vehicle_enabled,
|
|
318
322
|
flag=observer_flags,
|
|
@@ -385,7 +389,8 @@ class SkodaMQTTClient(Client): # pylint: disable=too-many-instance-attributes
|
|
|
385
389
|
del properties
|
|
386
390
|
del flags
|
|
387
391
|
|
|
388
|
-
self._skoda_connector.
|
|
392
|
+
self._skoda_connector.connection_state._set_value(value=ConnectionState.DISCONNECTED) # pylint: disable=protected-access
|
|
393
|
+
self._skoda_connector.mqtt_connected = False
|
|
389
394
|
self._skoda_connector.car_connectivity.garage.remove_observer(observer=self._on_carconnectivity_vehicle_enabled)
|
|
390
395
|
|
|
391
396
|
self.subscribed_topics.clear()
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
# Changelog
|
|
2
|
-
|
|
3
|
-
All notable changes to this project will be documented in this file.
|
|
4
|
-
|
|
5
|
-
## [Unreleased]
|
|
6
|
-
- No unreleased changes so far
|
|
7
|
-
|
|
8
|
-
## [0.3] - 2025-02-19
|
|
9
|
-
### Added
|
|
10
|
-
- Added support for images
|
|
11
|
-
- Added tags to attributes
|
|
12
|
-
- Added support for webui via carconnectivity-plugin-webui
|
|
13
|
-
|
|
14
|
-
## [0.2] - 2025-02-02
|
|
15
|
-
### Added
|
|
16
|
-
- Wake Sleep command
|
|
17
|
-
|
|
18
|
-
## [0.1] - 2025-01-25
|
|
19
|
-
Initial release, let's go and give this to the public to try out...
|
|
20
|
-
The API is not yet implemented completely but most functions already work
|
|
21
|
-
|
|
22
|
-
[unreleased]: https://github.com/tillsteinbach/CarConnectivity-connector-skoda/compare/v0.3...HEAD
|
|
23
|
-
[0.3]: https://github.com/tillsteinbach/CarConnectivity-connector-skoda/releases/tag/v0.3
|
|
24
|
-
[0.2]: https://github.com/tillsteinbach/CarConnectivity-connector-skoda/releases/tag/v0.2
|
|
25
|
-
[0.1]: https://github.com/tillsteinbach/CarConnectivity-connector-skoda/releases/tag/v0.1
|
|
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
|
{carconnectivity_connector_skoda-0.4a7 → carconnectivity_connector_skoda-0.4.1}/doc/Config.md
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
|