casambi-bt-revamped 0.3.6.dev15__py3-none-any.whl → 0.3.6.dev18__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 +21 -19
- {casambi_bt_revamped-0.3.6.dev15.dist-info → casambi_bt_revamped-0.3.6.dev18.dist-info}/METADATA +1 -1
- {casambi_bt_revamped-0.3.6.dev15.dist-info → casambi_bt_revamped-0.3.6.dev18.dist-info}/RECORD +6 -6
- {casambi_bt_revamped-0.3.6.dev15.dist-info → casambi_bt_revamped-0.3.6.dev18.dist-info}/WHEEL +0 -0
- {casambi_bt_revamped-0.3.6.dev15.dist-info → casambi_bt_revamped-0.3.6.dev18.dist-info}/licenses/LICENSE +0 -0
- {casambi_bt_revamped-0.3.6.dev15.dist-info → casambi_bt_revamped-0.3.6.dev18.dist-info}/top_level.txt +0 -0
CasambiBt/_client.py
CHANGED
|
@@ -551,14 +551,11 @@ class CasambiClient:
|
|
|
551
551
|
# Process based on message type
|
|
552
552
|
if message_type == 0x08 or message_type == 0x10: # Switch/button events
|
|
553
553
|
switch_events_found += 1
|
|
554
|
-
# Extract button ID
|
|
555
|
-
#
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
else:
|
|
560
|
-
# Fallback to parameter for short payloads
|
|
561
|
-
button = parameter
|
|
554
|
+
# Extract button ID - parameter field contains the button ID
|
|
555
|
+
# For EVO firmware: parameter encodes button ID in lower 4 bits
|
|
556
|
+
# (0x40=button0, 0x41=button1, 0x42=button2, etc.)
|
|
557
|
+
button = parameter & 0x0F
|
|
558
|
+
self._logger.debug(f"EVO button extraction: parameter=0x{parameter:02x}, button={button}")
|
|
562
559
|
|
|
563
560
|
# For type 0x10 messages, we need to pass additional data beyond the declared payload
|
|
564
561
|
if message_type == 0x10:
|
|
@@ -613,18 +610,15 @@ class CasambiClient:
|
|
|
613
610
|
if len(payload) > 2:
|
|
614
611
|
extra_data = payload[2:]
|
|
615
612
|
|
|
616
|
-
# Extract action
|
|
617
|
-
if len(payload) >
|
|
618
|
-
#
|
|
619
|
-
action = payload[
|
|
613
|
+
# Extract action based on message type (action SHOULD be different for press vs release)
|
|
614
|
+
if message_type == 0x10 and len(payload) > 1:
|
|
615
|
+
# Type 0x10: action is at payload[1]
|
|
616
|
+
action = payload[1]
|
|
617
|
+
elif len(payload) > 1:
|
|
618
|
+
# Other types: action is at payload[1]
|
|
619
|
+
action = payload[1]
|
|
620
620
|
else:
|
|
621
|
-
|
|
622
|
-
if message_type == 0x10 and len(payload) > 1:
|
|
623
|
-
action = payload[1]
|
|
624
|
-
elif len(payload) > 1:
|
|
625
|
-
action = payload[1]
|
|
626
|
-
else:
|
|
627
|
-
action = None
|
|
621
|
+
action = None
|
|
628
622
|
|
|
629
623
|
event_string = "unknown"
|
|
630
624
|
|
|
@@ -694,6 +688,14 @@ class CasambiClient:
|
|
|
694
688
|
controlling_unit = None
|
|
695
689
|
# This is redundant since we already return early if unit_id_echo != unit_id
|
|
696
690
|
# Removing to avoid confusion
|
|
691
|
+
|
|
692
|
+
# Filter out type 0x08 messages with button=0 (likely notifications)
|
|
693
|
+
if message_type == 0x08 and button == 0:
|
|
694
|
+
self._logger.debug(
|
|
695
|
+
f"Filtering out type 0x08 notification event: button={button}, unit_id={unit_id}, "
|
|
696
|
+
f"action={action_display}, flags=0x{flags:02x}"
|
|
697
|
+
)
|
|
698
|
+
return
|
|
697
699
|
|
|
698
700
|
self._dataCallback(
|
|
699
701
|
IncommingPacketType.SwitchEvent,
|
{casambi_bt_revamped-0.3.6.dev15.dist-info → casambi_bt_revamped-0.3.6.dev18.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=4l5n-roiPx7zlsKAtRY8zgChWaQKubhop_GgvxRQUWI,30187
|
|
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.dev18.dist-info/licenses/LICENSE,sha256=TAIIitFxpxEDi6Iju7foW4TDQmWvC-IhLVLhl67jKmQ,11341
|
|
16
|
+
casambi_bt_revamped-0.3.6.dev18.dist-info/METADATA,sha256=ggrribcwpwFTtBK6ApxuENydV3NkeddoeK-LGq3FSc8,3050
|
|
17
|
+
casambi_bt_revamped-0.3.6.dev18.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
18
|
+
casambi_bt_revamped-0.3.6.dev18.dist-info/top_level.txt,sha256=uNbqLjtecFosoFzpGAC89-5icikWODKI8rOjbi8v_sA,10
|
|
19
|
+
casambi_bt_revamped-0.3.6.dev18.dist-info/RECORD,,
|
{casambi_bt_revamped-0.3.6.dev15.dist-info → casambi_bt_revamped-0.3.6.dev18.dist-info}/WHEEL
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|