Skip to content
Product Engineering

Wake-on-LAN for a Whole Gaming Cafe

By Code Red Developments · 2 min read

Staff opening a cafe want every PC on without walking the floor. Wake-on-LAN does that: a “magic packet” containing a machine’s MAC address, broadcast on the local network, tells a powered-off PC to boot. The catch is in the word local.

The cloud can’t send a local broadcast

The CR Cafe backend lives in the cloud, and a magic packet doesn’t cross the internet into someone’s LAN. Something inside the cafe has to send it. Usually that’s another station agent that is already on — but first thing in the morning, when every PC is off, there is nothing on the network to send it.

The relay

So we built CR Cafe Relay: a tray-only Electron app for the always-on counter PC. It keeps a connection to the backend and broadcasts wake packets when asked. It isn’t a station — no lock screen, no licence, never counted against a plan’s station limit.

The bug that looked like success

The first design chose one sender for each wake. Enrollment codes are cafe-wide, so a relay could be installed from a different building. When it won the pick, it broadcast every wake onto its own network, the PCs never woke — and the dashboard still said “Wake signal sent”, because the server reported success as soon as it had emitted the message.

Fan out, then confirm

  • A wake now goes to every relay and every online agent in the cafe. Magic packets are idempotent, so extra senders cost nothing
  • Each sender acknowledges with a result. The first success wins; a failure only shows once every sender has answered and all failed
  • A timeout reports that the signal went out but wasn’t confirmed, rather than failing — older relays that don’t acknowledge still work
  • The dashboard lists every connected relay and flags one that appears to be on a different network

Setting up Wake-on-LAN on cafe PCs

Software is only half of it. For wakes to work, each PC needs Wake-on-LAN enabled in the BIOS or UEFI and on the network adapter, and should be connected by Ethernet — most Wi-Fi adapters can’t wake from a full shutdown. The relay machine should stay on and on the same LAN as the stations.

The same “confirm, don’t assume” principle runs through the rest of the real-time layer; see building real-time station control with Socket.IO.

Written by the team behind CR Cafe gaming cafe management software.

Explore CR Cafe

Have something that needs building?

Tell us what you are trying to do. We reply to every enquiry, usually within one business day.

Start a Project