casambi-bt-revamped 0.3.12.dev16__py3-none-any.whl → 0.4.0__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.
- CasambiBt/_client.py +13 -13
- CasambiBt/_version.py +1 -1
- {casambi_bt_revamped-0.3.12.dev16.dist-info → casambi_bt_revamped-0.4.0.dist-info}/METADATA +1 -1
- {casambi_bt_revamped-0.3.12.dev16.dist-info → casambi_bt_revamped-0.4.0.dist-info}/RECORD +7 -7
- {casambi_bt_revamped-0.3.12.dev16.dist-info → casambi_bt_revamped-0.4.0.dist-info}/WHEEL +0 -0
- {casambi_bt_revamped-0.3.12.dev16.dist-info → casambi_bt_revamped-0.4.0.dist-info}/licenses/LICENSE +0 -0
- {casambi_bt_revamped-0.3.12.dev16.dist-info → casambi_bt_revamped-0.4.0.dist-info}/top_level.txt +0 -0
CasambiBt/_client.py
CHANGED
|
@@ -1386,7 +1386,7 @@ class CasambiClient:
|
|
|
1386
1386
|
# Android n0():998 uses WRITE_TYPE_NO_RESPONSE for classic.
|
|
1387
1387
|
response=False,
|
|
1388
1388
|
)
|
|
1389
|
-
self._logger.
|
|
1389
|
+
self._logger.debug("[CASAMBI_CLASSIC_INIT] version sent successfully")
|
|
1390
1390
|
except Exception:
|
|
1391
1391
|
self._logger.warning(
|
|
1392
1392
|
"[CASAMBI_CLASSIC_INIT] version send failed (continuing with time-sync)",
|
|
@@ -1486,7 +1486,7 @@ class CasambiClient:
|
|
|
1486
1486
|
# Android X():314 uses WRITE_TYPE_DEFAULT (2) = with-response.
|
|
1487
1487
|
response=True,
|
|
1488
1488
|
)
|
|
1489
|
-
self._logger.
|
|
1489
|
+
self._logger.debug("[CASAMBI_CLASSIC_INIT] time-sync sent successfully")
|
|
1490
1490
|
except Exception:
|
|
1491
1491
|
self._logger.warning(
|
|
1492
1492
|
"[CASAMBI_CLASSIC_INIT] time-sync send failed",
|
|
@@ -1601,7 +1601,7 @@ class CasambiClient:
|
|
|
1601
1601
|
except Exception:
|
|
1602
1602
|
handle_uuid = "unknown"
|
|
1603
1603
|
|
|
1604
|
-
self._logger.
|
|
1604
|
+
self._logger.debug(
|
|
1605
1605
|
"[CLASSIC_DIAG_RX] #%d handle=%s len=%d hex=%s",
|
|
1606
1606
|
self._classicRxFrames,
|
|
1607
1607
|
handle_uuid,
|
|
@@ -1618,7 +1618,7 @@ class CasambiClient:
|
|
|
1618
1618
|
|
|
1619
1619
|
if self._classicConnHash8 is None:
|
|
1620
1620
|
if self._logLimiter.allow("classic_rx_no_hash", burst=5, window_s=60.0):
|
|
1621
|
-
self._logger.
|
|
1621
|
+
self._logger.debug("[CASAMBI_CLASSIC_RX] missing_connection_hash len=%d", len(raw))
|
|
1622
1622
|
return
|
|
1623
1623
|
|
|
1624
1624
|
visitor_key = self._network.classicVisitorKey()
|
|
@@ -1823,7 +1823,7 @@ class CasambiClient:
|
|
|
1823
1823
|
if not parsed_candidates:
|
|
1824
1824
|
self._classicRxParseFail += 1
|
|
1825
1825
|
if self._logLimiter.allow("classic_rx_parse_fail", burst=5, window_s=60.0):
|
|
1826
|
-
self._logger.
|
|
1826
|
+
self._logger.debug(
|
|
1827
1827
|
"[CASAMBI_CLASSIC_RX_PARSE_FAIL] len=%d prefix=%s",
|
|
1828
1828
|
len(raw),
|
|
1829
1829
|
b2a(raw[: min(len(raw), 32)]),
|
|
@@ -1847,7 +1847,7 @@ class CasambiClient:
|
|
|
1847
1847
|
if best["score"] == 0:
|
|
1848
1848
|
self._classicRxParseFail += 1
|
|
1849
1849
|
if self._logLimiter.allow("classic_rx_unplausible", burst=5, window_s=60.0):
|
|
1850
|
-
self._logger.
|
|
1850
|
+
self._logger.debug(
|
|
1851
1851
|
"[CASAMBI_CLASSIC_RX_UNPLAUSIBLE] preferred=%s len=%d prefix=%s",
|
|
1852
1852
|
preferred,
|
|
1853
1853
|
len(raw),
|
|
@@ -1881,7 +1881,7 @@ class CasambiClient:
|
|
|
1881
1881
|
self._classicRxHistory = self._classicRxHistory[-self._classicDiagMaxHistory:]
|
|
1882
1882
|
|
|
1883
1883
|
# Enhanced RX parse result log
|
|
1884
|
-
self._logger.
|
|
1884
|
+
self._logger.debug(
|
|
1885
1885
|
"[CLASSIC_DIAG_RX_PARSE] mode=%s verified=%s auth=%s sig_len=%d seq=%s score=%d payload_len=%d",
|
|
1886
1886
|
best["mode"],
|
|
1887
1887
|
verified,
|
|
@@ -1897,7 +1897,7 @@ class CasambiClient:
|
|
|
1897
1897
|
if best["mode"] != preferred and best["mode"] in ("conformant", "legacy"):
|
|
1898
1898
|
# Only switch if we got a stronger signal (verified or plausible payload with fewer assumptions).
|
|
1899
1899
|
if best["score"] >= 50 and self._logLimiter.allow("classic_rx_mode_switch", burst=3, window_s=3600.0):
|
|
1900
|
-
self._logger.
|
|
1900
|
+
self._logger.debug(
|
|
1901
1901
|
"[CASAMBI_CLASSIC_RX_MODE] switching %s -> %s (score=%d verified=%s sig_len=%d)",
|
|
1902
1902
|
preferred,
|
|
1903
1903
|
best["mode"],
|
|
@@ -1909,7 +1909,7 @@ class CasambiClient:
|
|
|
1909
1909
|
|
|
1910
1910
|
# Sample RX logs (limited) + periodic stats (limited).
|
|
1911
1911
|
if self._logLimiter.allow("classic_rx_sample", burst=10, window_s=60.0):
|
|
1912
|
-
self._logger.
|
|
1912
|
+
self._logger.debug(
|
|
1913
1913
|
"[CASAMBI_CLASSIC_RX] header=%s verified=%s auth=%s sig_len=%d seq=%s payload_prefix=%s",
|
|
1914
1914
|
best["mode"],
|
|
1915
1915
|
verified,
|
|
@@ -1923,7 +1923,7 @@ class CasambiClient:
|
|
|
1923
1923
|
"classic_rx_stats", burst=2, window_s=60.0
|
|
1924
1924
|
):
|
|
1925
1925
|
self._classicRxLastStatsTs = now
|
|
1926
|
-
self._logger.
|
|
1926
|
+
self._logger.debug(
|
|
1927
1927
|
"[CASAMBI_CLASSIC_RX_STATS] frames=%d verified=%d unverifiable=%d parse_fail=%d header=%s "
|
|
1928
1928
|
"type6=%d type7=%d type9=%d cmdstream=%d unknown=%d classic_states=%d",
|
|
1929
1929
|
self._classicRxFrames,
|
|
@@ -2039,7 +2039,7 @@ class CasambiClient:
|
|
|
2039
2039
|
|
|
2040
2040
|
if self._classicRxKindSamples.get(kind, 0) < 3:
|
|
2041
2041
|
self._classicRxKindSamples[kind] = self._classicRxKindSamples.get(kind, 0) + 1
|
|
2042
|
-
self._logger.
|
|
2042
|
+
self._logger.debug(
|
|
2043
2043
|
"[CASAMBI_CLASSIC_RX_KIND] kind=%s header=%s verified=%s sig_len=%d seq=%s payload_prefix=%s",
|
|
2044
2044
|
kind,
|
|
2045
2045
|
best["mode"],
|
|
@@ -2072,7 +2072,7 @@ class CasambiClient:
|
|
|
2072
2072
|
|
|
2073
2073
|
# Log full payload for the first 10 Classic payloads regardless of type.
|
|
2074
2074
|
if self._classicRxClassicStates < 10:
|
|
2075
|
-
self._logger.
|
|
2075
|
+
self._logger.debug(
|
|
2076
2076
|
"[CASAMBI_CLASSIC_DISPATCH] #%d type_byte=%d len=%d hex=%s",
|
|
2077
2077
|
self._classicRxClassicStates,
|
|
2078
2078
|
first_byte,
|
|
@@ -2160,7 +2160,7 @@ class CasambiClient:
|
|
|
2160
2160
|
|
|
2161
2161
|
# Log the first few parsed records at WARNING level for tester visibility.
|
|
2162
2162
|
if records_parsed <= 10 or self._logger.isEnabledFor(logging.DEBUG):
|
|
2163
|
-
self._logger.
|
|
2163
|
+
self._logger.debug(
|
|
2164
2164
|
"[CASAMBI_CLASSIC_STATE_PARSED] unit=%d flags=0x%02x state_len=%d "
|
|
2165
2165
|
"online=%s extra1=%d extra2=%d state=%s",
|
|
2166
2166
|
unit_id,
|
CasambiBt/_version.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: casambi-bt-revamped
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.4.0
|
|
4
4
|
Summary: Forked Casambi Bluetooth client library with switch event support, use original if no special need. https://github.com/lkempf/casambi-bt
|
|
5
5
|
Home-page: https://github.com/rankjie/casambi-bt
|
|
6
6
|
Author: rankjie
|
|
@@ -2,7 +2,7 @@ CasambiBt/__init__.py,sha256=iJdTF4oeXfj5d5gfGxQkacqUjtnQo0IW-zFPJvFjWWk,336
|
|
|
2
2
|
CasambiBt/_cache.py,sha256=3bQil8vhSy4f4sf9JusMfEdQC7d3cJuva9qHhyKro-0,3808
|
|
3
3
|
CasambiBt/_casambi.py,sha256=dAZZ0S2-t2ShLbW78AE9lOLBzOmhBOTTXJky-6khdkE,41981
|
|
4
4
|
CasambiBt/_classic_crypto.py,sha256=XIp3JBaeY8hIUv5kB0ygVG_eRx9AgHHF4ts2--CFm78,4973
|
|
5
|
-
CasambiBt/_client.py,sha256=
|
|
5
|
+
CasambiBt/_client.py,sha256=MusVDaJ4fUMfhn8bwdEe7WW9HY67Uds_Ohavpi1vECk,105803
|
|
6
6
|
CasambiBt/_constants.py,sha256=86heoDdb5iPaRrPmK2DIIl-4uSxbFFcnCo9zlCvTLww,1290
|
|
7
7
|
CasambiBt/_discover.py,sha256=jLc6H69JddrCURgtANZEjws6_UbSzXJtvJkbKTaIUHY,1849
|
|
8
8
|
CasambiBt/_encryption.py,sha256=CLcoOOrggQqhJbnr_emBnEnkizpWDvb_0yFnitq4_FM,3831
|
|
@@ -12,11 +12,11 @@ CasambiBt/_network.py,sha256=3ZUedQlHzzuHHiG5KxDLnK0AIz0TjzG1_vwg0UGsO9U,22132
|
|
|
12
12
|
CasambiBt/_operation.py,sha256=Q5UccsrtNp_B_wWqwH_3eLFW_yF6A55FMmfUKDk2WrI,1059
|
|
13
13
|
CasambiBt/_switch_events.py,sha256=S8OD0dBcw5T4J2C7qfmOQMnTJ7omIXRUYv4PqDOB87E,13137
|
|
14
14
|
CasambiBt/_unit.py,sha256=nxbg_8UCCVB9WI8dUS21g2JrGyPKcefqKMSusMOhLOo,18721
|
|
15
|
-
CasambiBt/_version.py,sha256=
|
|
15
|
+
CasambiBt/_version.py,sha256=2uX0-jxYxOYPO9Zyusle5-xRIXdXU2JXo5Tloqx9j7k,331
|
|
16
16
|
CasambiBt/errors.py,sha256=1L_Q8og_N_BRYEKizghAQXr6tihlHykFgtcCHUDcBas,1961
|
|
17
17
|
CasambiBt/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
18
|
-
casambi_bt_revamped-0.
|
|
19
|
-
casambi_bt_revamped-0.
|
|
20
|
-
casambi_bt_revamped-0.
|
|
21
|
-
casambi_bt_revamped-0.
|
|
22
|
-
casambi_bt_revamped-0.
|
|
18
|
+
casambi_bt_revamped-0.4.0.dist-info/licenses/LICENSE,sha256=TAIIitFxpxEDi6Iju7foW4TDQmWvC-IhLVLhl67jKmQ,11341
|
|
19
|
+
casambi_bt_revamped-0.4.0.dist-info/METADATA,sha256=H0L3tsjrS_Buu3UdUtGFq32ct5ZUSdFdLfh4ju9GsSc,5871
|
|
20
|
+
casambi_bt_revamped-0.4.0.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
|
|
21
|
+
casambi_bt_revamped-0.4.0.dist-info/top_level.txt,sha256=uNbqLjtecFosoFzpGAC89-5icikWODKI8rOjbi8v_sA,10
|
|
22
|
+
casambi_bt_revamped-0.4.0.dist-info/RECORD,,
|
|
File without changes
|
{casambi_bt_revamped-0.3.12.dev16.dist-info → casambi_bt_revamped-0.4.0.dist-info}/licenses/LICENSE
RENAMED
|
File without changes
|
{casambi_bt_revamped-0.3.12.dev16.dist-info → casambi_bt_revamped-0.4.0.dist-info}/top_level.txt
RENAMED
|
File without changes
|