aioshelly 5.3.0__tar.gz → 5.3.2__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.
- {aioshelly-5.3.0/aioshelly.egg-info → aioshelly-5.3.2}/PKG-INFO +1 -1
- {aioshelly-5.3.0 → aioshelly-5.3.2}/aioshelly/const.py +1 -0
- {aioshelly-5.3.0 → aioshelly-5.3.2}/aioshelly/rpc_device/wsrpc.py +7 -1
- {aioshelly-5.3.0 → aioshelly-5.3.2/aioshelly.egg-info}/PKG-INFO +1 -1
- {aioshelly-5.3.0 → aioshelly-5.3.2}/setup.py +1 -1
- {aioshelly-5.3.0 → aioshelly-5.3.2}/LICENSE +0 -0
- {aioshelly-5.3.0 → aioshelly-5.3.2}/MANIFEST.in +0 -0
- {aioshelly-5.3.0 → aioshelly-5.3.2}/README.md +0 -0
- {aioshelly-5.3.0 → aioshelly-5.3.2}/aioshelly/__init__.py +0 -0
- {aioshelly-5.3.0 → aioshelly-5.3.2}/aioshelly/ble/__init__.py +0 -0
- {aioshelly-5.3.0 → aioshelly-5.3.2}/aioshelly/ble/const.py +0 -0
- {aioshelly-5.3.0 → aioshelly-5.3.2}/aioshelly/block_device/__init__.py +0 -0
- {aioshelly-5.3.0 → aioshelly-5.3.2}/aioshelly/block_device/coap.py +0 -0
- {aioshelly-5.3.0 → aioshelly-5.3.2}/aioshelly/block_device/device.py +0 -0
- {aioshelly-5.3.0 → aioshelly-5.3.2}/aioshelly/common.py +0 -0
- {aioshelly-5.3.0 → aioshelly-5.3.2}/aioshelly/exceptions.py +0 -0
- {aioshelly-5.3.0 → aioshelly-5.3.2}/aioshelly/json.py +0 -0
- {aioshelly-5.3.0 → aioshelly-5.3.2}/aioshelly/py.typed +0 -0
- {aioshelly-5.3.0 → aioshelly-5.3.2}/aioshelly/rpc_device/__init__.py +0 -0
- {aioshelly-5.3.0 → aioshelly-5.3.2}/aioshelly/rpc_device/device.py +0 -0
- {aioshelly-5.3.0 → aioshelly-5.3.2}/aioshelly/rpc_device/models.py +0 -0
- {aioshelly-5.3.0 → aioshelly-5.3.2}/aioshelly.egg-info/SOURCES.txt +0 -0
- {aioshelly-5.3.0 → aioshelly-5.3.2}/aioshelly.egg-info/dependency_links.txt +0 -0
- {aioshelly-5.3.0 → aioshelly-5.3.2}/aioshelly.egg-info/requires.txt +0 -0
- {aioshelly-5.3.0 → aioshelly-5.3.2}/aioshelly.egg-info/top_level.txt +0 -0
- {aioshelly-5.3.0 → aioshelly-5.3.2}/aioshelly.egg-info/zip-safe +0 -0
- {aioshelly-5.3.0 → aioshelly-5.3.2}/requirements.txt +0 -0
- {aioshelly-5.3.0 → aioshelly-5.3.2}/setup.cfg +0 -0
|
@@ -70,6 +70,7 @@ MODEL_NAMES = {
|
|
|
70
70
|
"SNSW-001X16EU": "Shelly Plus 1",
|
|
71
71
|
"SNSW-0024X": "Shelly Plus I4",
|
|
72
72
|
"SNSW-002P16EU": "Shelly Plus 2PM",
|
|
73
|
+
"SNSW-102P16EU": "Shelly Plus 2PM",
|
|
73
74
|
"SPEM-003CEBEU": "Shelly Pro 3EM",
|
|
74
75
|
"SPSW-001PE16EU": "Shelly Pro 1PM",
|
|
75
76
|
"SPSW-001XE16EU": "Shelly Pro 1",
|
|
@@ -235,8 +235,14 @@ class WsRPC:
|
|
|
235
235
|
# so schedule next heartbeat
|
|
236
236
|
self._schedule_heartbeat()
|
|
237
237
|
return
|
|
238
|
+
asyncio.create_task(self._ping_if_not_closed())
|
|
239
|
+
|
|
240
|
+
async def _ping_if_not_closed(self) -> None:
|
|
241
|
+
"""Send ping if the client is not closed."""
|
|
242
|
+
if not self._client or self._client.closed:
|
|
243
|
+
return
|
|
238
244
|
self._schedule_pong_response_cb()
|
|
239
|
-
|
|
245
|
+
await self._client.ping()
|
|
240
246
|
|
|
241
247
|
def _pong_not_received(self) -> None:
|
|
242
248
|
"""Pong not received."""
|
|
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
|