Skip to content

Add SiLA device discovery (SiLA 1 + SiLA 2)#887

Merged
rickwierenga merged 14 commits intomainfrom
sila-discovery
Feb 14, 2026
Merged

Add SiLA device discovery (SiLA 1 + SiLA 2)#887
rickwierenga merged 14 commits intomainfrom
sila-discovery

Conversation

@rickwierenga
Copy link
Member

@rickwierenga rickwierenga commented Feb 13, 2026

Summary

  • Add pylabrobot.sila package with device discovery for both SiLA 1 and SiLA 2 instruments
  • SiLA 2: mDNS-based discovery via _sila._tcp.local. (requires zeroconf)
  • SiLA 1: NetBIOS broadcast + SOAP GetDeviceIdentification (no extra dependencies)
  • discover() runs both probes in parallel and returns SiLADevice objects with host, port, name, and version-specific metadata
  • Includes a CLI tool (python -m pylabrobot.sila.discovery) for terminal-based discovery
  • Add API docs and a user guide notebook

Test plan

  • Unit tests for SiLADevice, _decode_nbns_name, _parse_device_identification, and mDNS discovery with mocked Zeroconf
  • Verify discover() finds SiLA devices on a network with active instruments
  • Verify CLI tool outputs tab-delimited results
  • Verify docs build cleanly

🤖 Generated with Claude Code

rickwierenga and others added 5 commits February 12, 2026 23:28
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
SiLA 1 devices (e.g. Inheco ODTC on Windows CE) don't support mDNS.
They respond to NetBIOS NBSTAT broadcast queries on UDP port 137,
then confirm identity via SOAP GetDeviceIdentification on TCP port 8080.

Discovery now runs SiLA 2 (mDNS) and SiLA 1 (NetBIOS) probes in
parallel and deduplicates results. Also fixes RuntimeWarning when
running `python -m pylabrobot.sila.discovery` by emptying __init__.py.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@rickwierenga rickwierenga changed the title Add SiLA 2 device discovery via mDNS Add SiLA device discovery (SiLA 1 + SiLA 2) Feb 14, 2026
rickwierenga and others added 9 commits February 13, 2026 16:12
Remove dead ioctl fallback and fcntl import (broke Windows), add logging
warning when zeroconf is missing, use Optional[str] for SiLA 1-only
fields, add unit tests, add sila to dev extras, and document assumptions.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
SiLA is a communication protocol like serial/USB/FTDI/HID, so it
belongs under the io package alongside other transport layers.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Use asyncio.get_running_loop() instead of deprecated get_event_loop()
- Fix socket leak in _get_device_identification via try/finally
- Run Zeroconf init/close in executor to avoid blocking the event loop
- Fix NBNS query transaction ID (high bit was set, mimicking a response)
- Add debug logging when no link-local interfaces are found
- Normalize type hints to lowercase (list/dict/set)
- Add SiLADevice/discover re-exports to __init__.py
- Fix docs RST to say "SiLA" instead of "SiLA 2"

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…sila

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@rickwierenga rickwierenga merged commit 2bc788f into main Feb 14, 2026
10 checks passed
@rickwierenga rickwierenga deleted the sila-discovery branch February 14, 2026 05:38
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