Skip to content

Add PROFINET DCP network discovery#634

Merged
gijzelaerr merged 3 commits into
masterfrom
feature/discovery
Mar 24, 2026
Merged

Add PROFINET DCP network discovery#634
gijzelaerr merged 3 commits into
masterfrom
feature/discovery

Conversation

@gijzelaerr
Copy link
Copy Markdown
Owner

@gijzelaerr gijzelaerr commented Mar 19, 2026

Summary

  • Adds PROFINET DCP network discovery via pnio-dcp
  • Device frozen dataclass with name, IP, MAC, netmask, gateway, family
  • discover() and identify() library functions in snap7.discovery
  • Integrated as s7 discover subcommand of the existing CLI (no separate entry point)
  • discovery optional dependency group (pip install python-snap7[discovery])
  • CLI documentation for all s7 subcommands (doc/cli.rst)
  • Discovery API reference (doc/API/discovery.rst)

Closes #622

Test plan

  • 11 tests pass (tests/test_discovery.py)
  • All tests use mocks (pnio-dcp requires raw sockets/root)
  • Sphinx docs build cleanly
  • ruff check/format passes

🤖 Generated with Claude Code

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>
- Resolve merge conflicts with master (uv.lock)
- Remove standalone snap7-scan entry point; discover is now a subcommand
  of the existing s7 CLI (s7 discover)
- Add CLI documentation for all s7 subcommands (doc/cli.rst)
- Add discovery API reference (doc/API/discovery.rst)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@gijzelaerr gijzelaerr merged commit 175750c into master Mar 24, 2026
37 checks passed
@gijzelaerr gijzelaerr added this to the 3.1 milestone Mar 24, 2026
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