casambi-bt-revamped 0.3.6.dev5__py3-none-any.whl → 0.3.6.dev6__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 -10
- {casambi_bt_revamped-0.3.6.dev5.dist-info → casambi_bt_revamped-0.3.6.dev6.dist-info}/METADATA +1 -1
- {casambi_bt_revamped-0.3.6.dev5.dist-info → casambi_bt_revamped-0.3.6.dev6.dist-info}/RECORD +6 -6
- {casambi_bt_revamped-0.3.6.dev5.dist-info → casambi_bt_revamped-0.3.6.dev6.dist-info}/WHEEL +0 -0
- {casambi_bt_revamped-0.3.6.dev5.dist-info → casambi_bt_revamped-0.3.6.dev6.dist-info}/licenses/LICENSE +0 -0
- {casambi_bt_revamped-0.3.6.dev5.dist-info → casambi_bt_revamped-0.3.6.dev6.dist-info}/top_level.txt +0 -0
CasambiBt/_client.py
CHANGED
|
@@ -600,16 +600,11 @@ class CasambiClient:
|
|
|
600
600
|
# Expected pattern: [unit_id_echo][0x12 or similar][0x00]
|
|
601
601
|
unit_id_echo = extra_data[0]
|
|
602
602
|
if unit_id_echo != unit_id:
|
|
603
|
-
#
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
return # Don't process this as a switch event
|
|
609
|
-
else:
|
|
610
|
-
self._logger.warning(
|
|
611
|
-
f"Extra data validation failed: unit_id_echo {unit_id_echo} != unit_id {unit_id}"
|
|
612
|
-
)
|
|
603
|
+
# This might indicate a control relationship
|
|
604
|
+
# e.g., unit_id_echo = controlling unit, unit_id = controlled unit
|
|
605
|
+
self._logger.info(
|
|
606
|
+
f"Control event: unit {unit_id} controlled by unit {unit_id_echo}"
|
|
607
|
+
)
|
|
613
608
|
|
|
614
609
|
event_string = "unknown"
|
|
615
610
|
|
|
@@ -661,6 +656,13 @@ class CasambiClient:
|
|
|
661
656
|
self._logger.warning(f"Unit ID mismatch: current={unit_id}, android={android_switch_event['unit_id']}")
|
|
662
657
|
if android_switch_event['button'] != button:
|
|
663
658
|
self._logger.warning(f"Button mismatch: current={button}, android={android_switch_event['button']}")
|
|
659
|
+
|
|
660
|
+
# Extract controlling unit if present
|
|
661
|
+
controlling_unit = None
|
|
662
|
+
if message_type == 0x10 and len(extra_data) >= 1:
|
|
663
|
+
unit_id_echo = extra_data[0]
|
|
664
|
+
if unit_id_echo != unit_id:
|
|
665
|
+
controlling_unit = unit_id_echo
|
|
664
666
|
|
|
665
667
|
self._dataCallback(
|
|
666
668
|
IncommingPacketType.SwitchEvent,
|
|
@@ -672,6 +674,7 @@ class CasambiClient:
|
|
|
672
674
|
"event": event_string,
|
|
673
675
|
"flags": flags,
|
|
674
676
|
"extra_data": extra_data,
|
|
677
|
+
"controlling_unit": controlling_unit,
|
|
675
678
|
"packet_sequence": packet_seq,
|
|
676
679
|
"raw_packet": b2a(raw_packet) if raw_packet else None,
|
|
677
680
|
"decrypted_data": b2a(full_data),
|
{casambi_bt_revamped-0.3.6.dev5.dist-info → casambi_bt_revamped-0.3.6.dev6.dist-info}/RECORD
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
CasambiBt/__init__.py,sha256=TW445xSu5PV3TyMjJfwaA1JoWvQQ8LXhZgGdDTfWf3s,302
|
|
2
2
|
CasambiBt/_cache.py,sha256=KZ2xbiHAHXUPa8Gw_75Nw9NL4QSY_sTWHbyYXYUDaB0,3865
|
|
3
3
|
CasambiBt/_casambi.py,sha256=gLLkhEcObgapqTx5Mk7WRClyG29UyfZYZCCIhhOg4H4,23101
|
|
4
|
-
CasambiBt/_client.py,sha256=
|
|
4
|
+
CasambiBt/_client.py,sha256=J0hK5raNn_RiOtVHxiXK27g6wIDdspcYpf2BSHVm06k,28180
|
|
5
5
|
CasambiBt/_client_android_parser.py,sha256=1lVkVYMO0Nhh9_nkNwgb68hlCS_uD8WxYQDir5hOdHs,7744
|
|
6
6
|
CasambiBt/_constants.py,sha256=_AxkG7Btxl4VeS6mO7GJW5Kc9dFs3s9sDmtJ83ZEKNw,359
|
|
7
7
|
CasambiBt/_discover.py,sha256=H7HpiFYIy9ELvmPXXd_ck-5O5invJf15dDIRk-vO5IE,1696
|
|
@@ -12,8 +12,8 @@ CasambiBt/_operation.py,sha256=-BuC1Bvtg-G-zSN_b_0JMvXdHZaR6LbTw0S425jg96c,842
|
|
|
12
12
|
CasambiBt/_unit.py,sha256=YiQWoHmMDWHHo4XAjtW8rHsBqIqpmp9MVdv1Mbu2xw4,17043
|
|
13
13
|
CasambiBt/errors.py,sha256=0JgDjaKlAKDes0poWzA8nrTUYQ8qdNfBb8dfaqqzCRA,1664
|
|
14
14
|
CasambiBt/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
15
|
-
casambi_bt_revamped-0.3.6.
|
|
16
|
-
casambi_bt_revamped-0.3.6.
|
|
17
|
-
casambi_bt_revamped-0.3.6.
|
|
18
|
-
casambi_bt_revamped-0.3.6.
|
|
19
|
-
casambi_bt_revamped-0.3.6.
|
|
15
|
+
casambi_bt_revamped-0.3.6.dev6.dist-info/licenses/LICENSE,sha256=TAIIitFxpxEDi6Iju7foW4TDQmWvC-IhLVLhl67jKmQ,11341
|
|
16
|
+
casambi_bt_revamped-0.3.6.dev6.dist-info/METADATA,sha256=IfbdDC_iGnUvJQjyOAhgf9ePqD6FXj8GdUybUBV2MZ0,3049
|
|
17
|
+
casambi_bt_revamped-0.3.6.dev6.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
18
|
+
casambi_bt_revamped-0.3.6.dev6.dist-info/top_level.txt,sha256=uNbqLjtecFosoFzpGAC89-5icikWODKI8rOjbi8v_sA,10
|
|
19
|
+
casambi_bt_revamped-0.3.6.dev6.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
{casambi_bt_revamped-0.3.6.dev5.dist-info → casambi_bt_revamped-0.3.6.dev6.dist-info}/top_level.txt
RENAMED
|
File without changes
|