Skip to content

BX2: exact alias BX2 and two-outlet start on f006 byte 1 - #1

Open
matthewhand wants to merge 1 commit into
masterfrom
pr1/bx2-hose-byte1
Open

BX2: exact alias BX2 and two-outlet start on f006 byte 1#1
matthewhand wants to merge 1 commit into
masterfrom
pr1/bx2-hose-byte1

Conversation

@matthewhand

@matthewhand matthewhand commented Aug 15, 2026

Copy link
Copy Markdown
Owner

Confirmed on BX2 Dual Outlet Bluetooth Tap Timer MK1 only (SKU CO3112):
https://www.holmanindustries.com.au/product/bx2-dual-outlet-bluetooth-tap-timer-mk1/

Not tested on the newer BX2:
https://www.holmanindustries.com.au/product/bx2-dual-outlet-bluetooth-tap-timer/

Upstream: scottmckenzie#9

Summary

Two BX2 MK1 gaps in the Linux SDK:

  1. Alias filter. Advertised name is exactly BX2. Discovery uses an exact-string allowlist: Tap Timer and BX2. Empty alias does not match. Constructor accepted_aliases or HOLMAN_ACCEPTED_ALIASES (comma-separated) adds another exact name, not a prefix.

  2. Second byte selects the outlet. Current start() is [0x01, 0x00, 0x00, minutes] with byte 1 hardcoded 0. Zone 1 (--zone 1) stays that payload. Zone 2 (--zone 2) is byte 1 = 0x01: [0x01, 0x01, 0x00, minutes]. Stop stays all-zero. CLI --zone is part of this change.

start = [0x01, tap_index, 0x00, minutes]
tap_index 0 = zone 1  (--zone 1)
            1 = zone 2  (--zone 2)
stop  = [0x00, 0x00, 0x00, 0x00]

Some units expose c001. Writing AE 8E there first unlocks the session so the following f006 write is accepted. If c001 is missing, skip it.

HOLMAN_SERVICE_UUIDS (or constructor service_uuids) replaces the vendor UUID filter. Defaults stay CO3015 / CO3012 / CO3011.

Docs (docs/BX2.md, HA example) are in a separate PR. This PR is the SDK change plus a short README supported-devices note.

Test plan

  • python3 -m py_compile holman/holman.py holmanctl.py
  • TapTimer.start zone 1 -> 01 00 00 NN, zone 2 -> 01 01 00 NN
  • holmanctl --help shows --zone 1 / --zone 2
  • Discover accepts exact Tap Timer and BX2 only by default
  • Unset HOLMAN_SERVICE_UUIDS keeps CO3015 / CO3012 / CO3011

@amazon-q-developer amazon-q-developer Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR introduces comprehensive BX2 dual-outlet support with correct payload mapping. The implementation properly handles zone-based control and device discovery enhancements. Key changes include alias-based discovery supporting both BX1 and BX2 devices, BX2 session unlock, and dual-zone control with correct byte mapping for the f006 characteristic. The code changes are well-documented with detailed protocol notes and Home Assistant integration examples. No blocking issues identified.


You can now have the agent implement changes and create commits directly on your pull request's source branch. Simply comment with /q followed by your request in natural language to ask the agent to make changes.

@matthewhand matthewhand changed the title BX2 Hose is f006 byte 1 = 0x01 (010100NN); keep Tap/BX discovery Accept BX aliases and select BX2 second tap via f006 byte 1 Aug 15, 2026
@matthewhand matthewhand changed the title Accept BX aliases and select BX2 second tap via f006 byte 1 Accept exact Tap Timer / BX2 aliases and select BX2 Hose via f006 byte 1 Aug 16, 2026
cursor Bot pushed a commit that referenced this pull request Aug 26, 2026
- Update _unlock docstring to explain WHY: session unlock enables f006 writes
- Revert .gitignore to master (bluez ignore was for local dev only)
- PR #1 now contains only holman/holman.py and holmanctl.py changes

Co-authored-by: mhand <matthewhand@users.noreply.github.com>
cursor Bot pushed a commit that referenced this pull request Aug 26, 2026
Co-authored-by: mhand <matthewhand@users.noreply.github.com>
@matthewhand matthewhand changed the title Accept exact Tap Timer / BX2 aliases and select BX2 Hose via f006 byte 1 BX2: exact alias BX2 and two-outlet start on f006 byte 1 Aug 26, 2026
Exact alias allowlist Tap Timer + BX2. start() uses f006 byte 1 as tap
index (zone 1 = 0, zone 2 = 1). Unlock AE 8E on c001 when present.
Env/constructor overrides for extra aliases and service UUIDs. CLI gains --zone.

Confirmed on BX2 Dual Outlet MK1 (SKU CO3112) only. Newer BX2 not tested.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant