Add automatic PoE power cycling for recovery loop#24
Merged
Conversation
Pluggable PowerController ABC with RouterOS implementation that auto-discovers PoE ports by matching serial device names against switch interface comments. Zero external dependencies — custom RouterOS API protocol over async TCP. Tested on CRS112-8P-4S with two cameras: - IVGHP203Y-AF (ether3) via /dev/uart-IVGHP203Y-AF - IVG85HG50PYA-S (ether4) via /dev/uart-IVG85HG50PYA-S Usage: defib burn -c <chip> -p /dev/uart-CAM --power-cycle Env: DEFIB_POE_HOST, DEFIB_POE_USER, DEFIB_POE_PASS Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
PowerControllerABC (src/defib/power/base.py) for device power controlRecoverySessionas optional step before handshake--power-cycleflag todefib burncommand, configured viaDEFIB_POE_*env varsTested on real hardware
CRS112-8P-4S PoE switch with two cameras:
0x20pattern detected via/dev/uart-IVGHP203Y-AF0x20pattern detected via/dev/uart-IVG85HG50PYA-SUsage
Test plan
🤖 Generated with Claude Code