Skip to content

Add a Wake-on-LAN power module (type: wol) #216

Description

@Ulrond

Wrappers are provided for hs100 / apc / apcAos / olimex / kasa / tapo / SLP / none, but there is no way for RAFT to wake a device that is asleep or in a Wake-on-LAN soft-off state.

Some targets (e.g. STB panels that aggressively deep-sleep) drop their console when idle and can only be brought back by a Wake-on-LAN magic packet. Today RAFT cannot do this, so test runs against such targets need an out-of-band wake step before the session can be opened.

Proposal

Add framework/core/powerModules/wol.py (powerWol) and a type: "wol" branch in powerControlClass:

  • powerOn() sends the WoL magic packet (6x 0xFF + target MAC x16) to broadcast:port.
  • Wake-on-LAN is wake-only, so powerOff() is a logged no-op and reboot() is a best-effort wake.
  • Config (under a device powerSwitch:): mac (required), broadcast (default 255.255.255.255), port (default 9).
  • Standard-library only (socket) — no new dependencies.
powerSwitch:
  type: "wol"
  mac: "aa:bb:cc:dd:ee:ff"
  broadcast: "255.255.255.255"
  port: 9

Verification

Sends a valid magic packet and wakes a real armv7 target on the same broadcast domain; invalid / missing MAC is rejected with a clear error.

PR to follow.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions