python-mobius 0.1.3__py3-none-any.whl → 0.1.4__py3-none-any.whl

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.
mobius/__init__.py CHANGED
@@ -51,7 +51,7 @@ from .discovery import (
51
51
  dedupe_by_serial, find_device_by_serial,
52
52
  )
53
53
 
54
- __version__ = "0.1.3"
54
+ __version__ = "0.1.4"
55
55
 
56
56
  __all__ = [
57
57
  "__version__",
mobius/device.py CHANGED
@@ -237,6 +237,21 @@ class MobiusDevice:
237
237
  if self._client and self._client.is_connected:
238
238
  await self._client.disconnect()
239
239
 
240
+ @property
241
+ def is_connected(self) -> bool:
242
+ """
243
+ True if there's currently a live BLE connection. connect()/
244
+ disconnect() are already separate public methods (not just
245
+ wrapped by __aenter__/__aexit__), so this device can be used as a
246
+ persistent, long-lived connection -- connect() once, read many
247
+ times, disconnect() only when actually done -- rather than
248
+ reconnecting on every read. Callers doing this should check this
249
+ property before each read and reconnect (ideally via `serial=`,
250
+ not a cached address -- see documentation/
251
+ 12-device-identity-and-address-stability.md) if it's False.
252
+ """
253
+ return self._client is not None and self._client.is_connected
254
+
240
255
  def _on_rx_data(self, _handle, data: bytearray):
241
256
  self._rx_buffer.extend(data)
242
257
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: python-mobius
3
- Version: 0.1.3
3
+ Version: 0.1.4
4
4
  Summary: Reverse-engineered Python client for the Mobius BLE protocol (EcoTech Marine VorTech/Radion, AquaIllumination, Neptune Systems, NYOS)
5
5
  Project-URL: Homepage, https://code.r3pek.org/r3pek/python-mobius
6
6
  Project-URL: Documentation, https://code.r3pek.org/r3pek/python-mobius/src/branch/main/documentation
@@ -1,8 +1,8 @@
1
- mobius/__init__.py,sha256=B-N9RU-FCtgqpcRBJPQVd6o-htq1nO-57HAvi5YdQtk,4438
1
+ mobius/__init__.py,sha256=JC9bOjhguL399hRcI7dHoH0ew12vrK1z6i7-Fxfb4m8,4438
2
2
  mobius/cli.py,sha256=Bp1joudLLQIBydlT_BWbHAwiFB-QWrNCtCnBCbAMxgU,6056
3
3
  mobius/constants.py,sha256=qr1WHvcEd4zpkdtd1QgqDGZinW8_T1gduSrACwtPNok,18388
4
4
  mobius/crc.py,sha256=WwIfUXGN_UKdsv-_Q303-L1-L1Rc1fvJnB5176ftzqU,2669
5
- mobius/device.py,sha256=-03IlhdusY4ncPQ-ReAyqGro2TUVa8bonduVTOdoWkM,51575
5
+ mobius/device.py,sha256=jpN9qurJXoXU75JDZ17GzKOjtzQBYVo3bG_mUnJDIK4,52331
6
6
  mobius/device_status.py,sha256=MDm9Anjp85i9P1n9BMKWcXAyp4dtrbzkO1hbDht_yPs,3847
7
7
  mobius/discovery.py,sha256=OacYxZnLr5mA2hYWgO9tYv4PfccWVsMMf_X8axOBeGI,4474
8
8
  mobius/frame.py,sha256=zG2vh8PceJHD8R43MwZiJnm0Ge1dr8nFcKsJR9_c9LM,6135
@@ -11,8 +11,8 @@ mobius/modifiers.py,sha256=pFNjGYX-_bNumNEpv3jJLYPCb9ZuSKYpQ0DDd2GmicQ,6451
11
11
  mobius/power.py,sha256=cZBpfYh2yg4xhmOQ0ILpACYdJSd7jMvSrhxat0yaH-g,3851
12
12
  mobius/pump_status.py,sha256=vqJXFAb16S-4oyzAzZIcwR5if7lXoTj67qwBJdbH1gI,1604
13
13
  mobius/schedule.py,sha256=kHr684TIKPZ2BplIySoeD-Yn1Xa_2bE6rfGUs-waWMQ,7483
14
- python_mobius-0.1.3.dist-info/METADATA,sha256=Q5VIi5Aaibpfd0zHOsK6XFXZZXZBEnXsFoctHt1ALfM,5959
15
- python_mobius-0.1.3.dist-info/WHEEL,sha256=lCkmxWfQsSc9CfIClYeavTdQeEX2toPqufh9gI35EQA,87
16
- python_mobius-0.1.3.dist-info/entry_points.txt,sha256=Q2hlcek-bWm70zvd12v32essflPgC2su-dKDHAqbPoE,48
17
- python_mobius-0.1.3.dist-info/licenses/LICENSE,sha256=7a72Msu2Q-TnoiFxemxEGkwafJGObk1W3rw9hzmyM_Y,17984
18
- python_mobius-0.1.3.dist-info/RECORD,,
14
+ python_mobius-0.1.4.dist-info/METADATA,sha256=1jbtxwYn6RTDvedq9JXat38gsIPnJSD10TAsmXCVbIk,5959
15
+ python_mobius-0.1.4.dist-info/WHEEL,sha256=lCkmxWfQsSc9CfIClYeavTdQeEX2toPqufh9gI35EQA,87
16
+ python_mobius-0.1.4.dist-info/entry_points.txt,sha256=Q2hlcek-bWm70zvd12v32essflPgC2su-dKDHAqbPoE,48
17
+ python_mobius-0.1.4.dist-info/licenses/LICENSE,sha256=7a72Msu2Q-TnoiFxemxEGkwafJGObk1W3rw9hzmyM_Y,17984
18
+ python_mobius-0.1.4.dist-info/RECORD,,