emerald-hws 0.0.23__tar.gz → 0.0.24__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.
- {emerald_hws-0.0.23 → emerald_hws-0.0.24}/PKG-INFO +2 -2
- {emerald_hws-0.0.23 → emerald_hws-0.0.24}/pyproject.toml +1 -1
- {emerald_hws-0.0.23 → emerald_hws-0.0.24}/src/emerald_hws/emeraldhws.py +15 -3
- {emerald_hws-0.0.23 → emerald_hws-0.0.24}/src/emerald_hws.egg-info/PKG-INFO +2 -2
- {emerald_hws-0.0.23 → emerald_hws-0.0.24}/.github/dependabot.yml +0 -0
- {emerald_hws-0.0.23 → emerald_hws-0.0.24}/.github/workflows/lint.yml +0 -0
- {emerald_hws-0.0.23 → emerald_hws-0.0.24}/.github/workflows/publish.yml +0 -0
- {emerald_hws-0.0.23 → emerald_hws-0.0.24}/.github/workflows/smoke-test.yml +0 -0
- {emerald_hws-0.0.23 → emerald_hws-0.0.24}/.gitignore +0 -0
- {emerald_hws-0.0.23 → emerald_hws-0.0.24}/LICENSE +0 -0
- {emerald_hws-0.0.23 → emerald_hws-0.0.24}/README.md +0 -0
- {emerald_hws-0.0.23 → emerald_hws-0.0.24}/requirements.txt +0 -0
- {emerald_hws-0.0.23 → emerald_hws-0.0.24}/setup.cfg +0 -0
- {emerald_hws-0.0.23 → emerald_hws-0.0.24}/src/emerald_hws/__assets__/SFSRootCAG2.pem +0 -0
- {emerald_hws-0.0.23 → emerald_hws-0.0.24}/src/emerald_hws/__init__.py +0 -0
- {emerald_hws-0.0.23 → emerald_hws-0.0.24}/src/emerald_hws.egg-info/SOURCES.txt +0 -0
- {emerald_hws-0.0.23 → emerald_hws-0.0.24}/src/emerald_hws.egg-info/dependency_links.txt +0 -0
- {emerald_hws-0.0.23 → emerald_hws-0.0.24}/src/emerald_hws.egg-info/requires.txt +0 -0
- {emerald_hws-0.0.23 → emerald_hws-0.0.24}/src/emerald_hws.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: emerald_hws
|
3
|
-
Version: 0.0.
|
3
|
+
Version: 0.0.24
|
4
4
|
Summary: A package to manipulate and monitor Emerald Heat Pump Hot Water Systems
|
5
5
|
Author-email: Ross Williamson <ross@inertia.net.nz>
|
6
6
|
License-Expression: MIT
|
@@ -8,7 +8,7 @@ Project-URL: Homepage, https://github.com/ross-w/emerald_hws_py
|
|
8
8
|
Project-URL: Bug Tracker, https://github.com/ross-w/emerald_hws_py/issues
|
9
9
|
Classifier: Programming Language :: Python :: 3
|
10
10
|
Classifier: Operating System :: OS Independent
|
11
|
-
Requires-Python: >=3.
|
11
|
+
Requires-Python: >=3.9
|
12
12
|
Description-Content-Type: text/markdown
|
13
13
|
Requires-Dist: boto3<2.0.0,>=1.40.0
|
14
14
|
Requires-Dist: awsiotsdk<2.0.0,>=1.24.0
|
@@ -14,7 +14,7 @@ dependencies = [
|
|
14
14
|
authors = [{ name = "Ross Williamson", email = "ross@inertia.net.nz" }]
|
15
15
|
description = "A package to manipulate and monitor Emerald Heat Pump Hot Water Systems"
|
16
16
|
readme = "README.md"
|
17
|
-
requires-python = ">=3.
|
17
|
+
requires-python = ">=3.9"
|
18
18
|
classifiers = [
|
19
19
|
"Programming Language :: Python :: 3",
|
20
20
|
"Operating System :: OS Independent",
|
@@ -228,7 +228,9 @@ class EmeraldHWS():
|
|
228
228
|
on_lifecycle_attempting_connect = self.on_lifecycle_attempting_connect,
|
229
229
|
on_lifecycle_disconnection = self.on_lifecycle_disconnection,
|
230
230
|
on_lifecycle_connection_failure = self.on_lifecycle_connection_failure,
|
231
|
-
on_publish_received = self.mqttCallback
|
231
|
+
on_publish_received = self.mqttCallback,
|
232
|
+
# The default keep-alive is 20 minutes, which we might want to reduce
|
233
|
+
# keep_alive_interval_sec = 60,
|
232
234
|
)
|
233
235
|
|
234
236
|
client.start()
|
@@ -288,7 +290,7 @@ class EmeraldHWS():
|
|
288
290
|
def on_lifecycle_connection_failure(self, lifecycle_connection_failure: mqtt5.LifecycleConnectFailureData):
|
289
291
|
""" Log message when connection failed
|
290
292
|
"""
|
291
|
-
error = lifecycle_connection_failure.
|
293
|
+
error = lifecycle_connection_failure.exception
|
292
294
|
error_code = getattr(error, 'code', 'unknown')
|
293
295
|
error_name = getattr(error, 'name', 'unknown')
|
294
296
|
error_message = str(error)
|
@@ -317,6 +319,11 @@ class EmeraldHWS():
|
|
317
319
|
# Log all CONNACK properties if available
|
318
320
|
if hasattr(connack, '__dict__'):
|
319
321
|
self.logger.debug(f"emeraldhws: awsiot: CONNACK details: {connack.__dict__}")
|
322
|
+
|
323
|
+
if reason_code == mqtt5.ConnectReasonCode.CLIENT_IDENTIFIER_NOT_VALID:
|
324
|
+
self.logger.debug("emeraldhws: awsiot: The client identifier is not valid. Getting a new login token.")
|
325
|
+
self.getLoginToken()
|
326
|
+
self.reconnectMQTT(reason="invalid_client_id")
|
320
327
|
else:
|
321
328
|
self.logger.debug("emeraldhws: awsiot: no CONNACK packet available in failure data")
|
322
329
|
|
@@ -357,6 +364,7 @@ class EmeraldHWS():
|
|
357
364
|
|
358
365
|
# Clear connection event when disconnected
|
359
366
|
self._connection_event.clear()
|
367
|
+
self._is_connected = False
|
360
368
|
return
|
361
369
|
|
362
370
|
def on_lifecycle_attempting_connect(self, lifecycle_attempting_connect_data: mqtt5.LifecycleAttemptingConnectData):
|
@@ -433,8 +441,12 @@ class EmeraldHWS():
|
|
433
441
|
:param id: The UUID of the requested HWS
|
434
442
|
"""
|
435
443
|
with self._mqtt_lock:
|
436
|
-
|
444
|
+
retry = 0
|
445
|
+
while not self.mqttClient:
|
437
446
|
self.connectMQTT()
|
447
|
+
if retry >= 3:
|
448
|
+
raise Exception("MQTT client not connected after multiple attempts")
|
449
|
+
retry += 1
|
438
450
|
|
439
451
|
mqtt_topic = "ep/heat_pump/from_gw/{}".format(id)
|
440
452
|
subscribe_future = self.mqttClient.subscribe(
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: emerald_hws
|
3
|
-
Version: 0.0.
|
3
|
+
Version: 0.0.24
|
4
4
|
Summary: A package to manipulate and monitor Emerald Heat Pump Hot Water Systems
|
5
5
|
Author-email: Ross Williamson <ross@inertia.net.nz>
|
6
6
|
License-Expression: MIT
|
@@ -8,7 +8,7 @@ Project-URL: Homepage, https://github.com/ross-w/emerald_hws_py
|
|
8
8
|
Project-URL: Bug Tracker, https://github.com/ross-w/emerald_hws_py/issues
|
9
9
|
Classifier: Programming Language :: Python :: 3
|
10
10
|
Classifier: Operating System :: OS Independent
|
11
|
-
Requires-Python: >=3.
|
11
|
+
Requires-Python: >=3.9
|
12
12
|
Description-Content-Type: text/markdown
|
13
13
|
Requires-Dist: boto3<2.0.0,>=1.40.0
|
14
14
|
Requires-Dist: awsiotsdk<2.0.0,>=1.24.0
|
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
|