Skip to content

Implement port management (ADD_PORT, INHERIT_PORT, REMOVE_PORT) - #18

Merged
halacs merged 2 commits into
halacs:masterfrom
alexbartok:feat/port-management
Apr 5, 2026
Merged

Implement port management (ADD_PORT, INHERIT_PORT, REMOVE_PORT)#18
halacs merged 2 commits into
halacs:masterfrom
alexbartok:feat/port-management

Conversation

@alexbartok

Copy link
Copy Markdown
Contributor

Addresses the first two TODOs from the README:

  • "Assign new door to the gateway"
  • "Delete assigned door from the gateway"

Adds ports CLI command group with add, inherit, and remove subcommands. SDK methods, payload types, and response decoders follow existing patterns (modeled after user management).

Pairing commands use a 45-second read timeout since the gateway listens/transmits for ~40 seconds. Tested against a ProMatic 3 (firmware EE001425-14). Proximity requirements and feedback support may vary with other motors.

Thanks to @halacs for this project, which was essential for building my own garage door integration.

Addresses the first two TODOs from README:
- "Assign new door to the gateway"
- "Delete assigned door from the gateway"

SDK changes:
- Add command ID constants for ADD_PORT (0x29), INHERIT_PORT (0x41),
  REMOVE_PORT (0x42) and their response variants
- Add PortIdResponse and RemovePort payload types
- Add Client.AddPort(), Client.InheritPort(), Client.RemovePort()
- Add configurable read timeout to transmitCommand (pairing needs ~40s)
- Wire up response decoders in Packet.go

CLI changes:
- Add "ports" command group with subcommands: add, inherit, remove
- "ports add": clone hand remote signal (ADD_PORT)
- "ports inherit": transmit gateway code for motor to learn (INHERIT_PORT)
- "ports remove": delete a paired port (REMOVE_PORT)

Pairing procedures tested against a ProMatic 3 (firmware EE001425-14).
Proximity requirements and feedback support may vary with other motors.
@halacs halacs self-assigned this Apr 2, 2026
@halacs

halacs commented Apr 2, 2026

Copy link
Copy Markdown
Owner

@alexbartok can you please have a look on my d1e456e commit? Just to make sure my merge conflict resolution is correct before merge your PR. Thanks!

@halacs
halacs merged commit 9fe21e4 into halacs:master Apr 5, 2026
3 checks passed
@alexbartok

Copy link
Copy Markdown
Contributor Author

@halacs Merge resolution looks good, everything came through correctly. Thanks for merging!
Pardon the late reply!

@alexbartok
alexbartok deleted the feat/port-management branch April 5, 2026 18:51
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.

2 participants