Skip to content

Add PROFINET DCP network discovery#634

Open
gijzelaerr wants to merge 2 commits intomasterfrom
feature/discovery
Open

Add PROFINET DCP network discovery#634
gijzelaerr wants to merge 2 commits intomasterfrom
feature/discovery

Conversation

@gijzelaerr
Copy link
Owner

Summary

  • Wraps the pnio-dcp library for discovering Siemens PLCs on the local network
  • Adds Device frozen dataclass with name, IP, MAC, netmask, gateway, family
  • Provides discover() and identify() functions
  • Adds snap7-scan CLI entry point and discovery optional dependency group

Closes #622

Test plan

  • 11 tests pass (tests/test_discovery.py)
  • All tests use mocks (pnio-dcp requires raw sockets/root)
  • Tests cover: Device creation, frozen dataclass, import error handling, discover/identify with mocked responses
  • ruff check/format passes

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com

gijzelaerr and others added 2 commits March 20, 2026 12:49
Wraps pnio-dcp library for discovering Siemens PLCs on the local network.
Includes Device dataclass, discover() and identify() functions, and CLI entry point.
Closes #622

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Exports a reusable click command (discover_command) that the s7 CLI
can auto-register as `s7 discover`. Removes the standalone snap7-scan
entry point in favor of the unified s7 CLI.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.

PROFINET DCP network discovery (find PLCs on the network)

1 participant