When learning how to install Home Assistant on Raspberry Pi hardware, most guides stop at flashing an SD card and plugging in a USB wall wart. For a production-grade smart home server, that approach is a liability. Wall adapters introduce voltage drop, ground loops, and SD card corruption from micro-brownouts. The professional standard in 2026 is to hardwire a Raspberry Pi 5 into your structured wiring enclosure using a DIN-rail mounted AC-to-DC power supply.

This guide covers the complete physical installation and hardwiring of a dedicated Home Assistant Pi 5 node, including the critical USB-C Power Delivery (PD) handshake required to unlock the Pi 5's full 5A peripheral current limit.

⚠️ Mains Voltage Safety Warning

This procedure involves terminating 120V AC mains wiring. Before touching any conductors, de-energize the circuit at the main breaker panel. Apply a lockout/tagout device to the breaker. Use a verified non-contact voltage tester and a CAT III multimeter to verify the circuit is dead (reading 0V) before stripping any wires. If you are not comfortable working inside an electrical panel or structured media enclosure, hire a licensed electrician to run the dedicated 15A branch circuit to your enclosure.

Tools and Materials List

To execute this installation without a second trip to the supply house, gather the following specific components. Do not substitute the power supply or the PD trigger board; the Pi 5's strict power negotiation requires exact hardware.

  • Compute: Raspberry Pi 5 (8GB variant recommended for Home Assistant OS + Docker add-ons)
  • Storage: 128GB Samsung PRO Endurance microSD (or Pi 5 M.2 HAT with a 256GB NVMe SSD)
  • Power Supply: Mean Well NDR-60-5 (60W, 5V DC, 12A output, DIN-rail mount)
  • PD Trigger: IP2721 USB-C PD 5V/5A Trigger Board (crucial for Pi 5 peripheral unlock)
  • Enclosure: 35mm DIN-rail mount and M2.5 brass standoffs for Pi 5
  • AC Wiring: 14 AWG THHN stranded copper (Black, White, Green)
  • DC Wiring: 18 AWG stranded copper (Red, Black)
  • Terminations: Wago 221 3-conductor lever nuts, ferrule crimp kit (for DC screw terminals)
  • Testing: CAT III Digital Multimeter (Fluke 115 or equivalent)

Prerequisite: Flashing Home Assistant OS

Before wiring the hardware, prepare the compute module. Download the official Home Assistant OS image for the Raspberry Pi 5 (64-bit). Use BalenaEtcher to flash the image to your high-endurance microSD or NVMe drive. Insert the storage into the Pi 5, but do not power it on yet. We will handle the network connection via hardwired Ethernet during the physical mount.

Physical Mounting and AC Mains Wiring

The Mean Well NDR-60-5 provides massive overhead (12A) compared to the Pi 5's maximum draw (~5A), ensuring the supply runs cool and silent inside a closed media enclosure.

  1. Mount the DIN Rail Components: Snap the Mean Well NDR-60-5 onto the 35mm DIN rail in your enclosure. Secure the Raspberry Pi 5 to the adjacent DIN-rail mount plate using the M2.5 brass standoffs. Ensure the Pi's GPIO pins and USB-C power port face outward for easy access.
  2. Prepare the AC Input Wires: Strip 1/2 inch of insulation from your 14 AWG THHN wires. Crimp insulated ferrules onto the ends of the Black (Hot), White (Neutral), and Green (Ground) wires to prevent stray strands from bridging terminals.
  3. Terminate AC Ground: Land the Green 14 AWG wire onto the enclosure's dedicated ground bus bar or the panel's equipment grounding terminal. Torque to the manufacturer's specification (typically 15-20 in-lbs). Never land the ground wire directly on the power supply's DC output terminals.
  4. Terminate AC Hot and Neutral: On the Mean Well NDR-60-5 input block (labeled L and N), land the Black 14 AWG wire into the L (Line) terminal. Land the White 14 AWG wire into the N (Neutral) terminal. Tighten the terminal screws firmly (approx. 7 in-lbs). Give each wire a firm tug to verify the mechanical grip.
  5. Connect to Branch Circuit: Route the other ends of your Black, White, and Green 14 AWG wires to the dedicated 15A/120V breaker and neutral/ground bars in your main panel. Use Wago 221 lever nuts if splicing into an existing junction box inside the media enclosure.

DC Output Wiring and the Pi 5 PD Handshake

The Raspberry Pi 5 requires a 27W USB-C PD power supply to enable the full 5A current limit for downstream USB devices (like Zigbee coordinators and external SSDs). If you wire 5V directly to a standard USB-C breakout board, the Pi 5 will default to a 600mA USB limit, causing your Zigbee stick to randomly disconnect. We use an IP2721 PD trigger board to spoof the 5V/5A PD contract.

Wire ColorGaugeSource TerminalDestination Terminal
Red18 AWGMean Well V+PD Trigger Board IN+
Black18 AWGMean Well V-PD Trigger Board IN-
Red (Short Jumper)18 AWGPD Trigger Board OUT+USB-C Plug VBUS (Pin A4/B4)
Black (Short Jumper)18 AWGPD Trigger Board OUT-USB-C Plug GND (Pin A1/B12)
  1. Prepare DC Wires: Cut two 18 AWG stranded wires (Red and Black) long enough to reach from the power supply to the PD trigger board, mounted near the Pi 5. Strip 1/4 inch and crimp twin-wire ferrules.
  2. Wire the Power Supply Output: Land the Red 18 AWG wire into the Mean Well V+ terminal. Land the Black 18 AWG wire into the V- terminal. Tighten securely.
  3. Wire the PD Trigger Input: On the IP2721 trigger board, land the Red wire into the IN+ solder pad or screw terminal, and the Black wire into the IN- pad. The trigger board requires a minimum of 5.2V input to negotiate properly; we will adjust the power supply's potentiometer in the testing phase.
  4. Wire the USB-C Injection: Using a pre-wired USB-C PD 5A pigtail or a high-quality breakout board, connect the trigger board's OUT+ to the USB-C VBUS line, and OUT- to the USB-C GND line. Plug the USB-C connector into the Raspberry Pi 5's power port.

Verify and Test: Meter Readings

Do not skip the verification step. Blindly energizing a newly wired enclosure is how you fry a $80 compute module.

  1. Energize the Circuit: Remove lockout/tagout, clear the enclosure of tools and wire clippings, and flip the 15A breaker to ON.
  2. Verify AC Input: Set your multimeter to AC Voltage. Place the black probe on the Neutral terminal and the red probe on the Line terminal of the Mean Well supply. Expected reading: 114V to 126V AC. If you read 0V, check the breaker and upstream splices.
  3. Adjust DC Output Voltage: Set your multimeter to DC Voltage. Place the probes on the V+ and V- screw terminals of the power supply. Using a small ceramic flathead screwdriver, turn the yellow adjustment potentiometer on the Mean Well supply until your meter reads exactly 5.15V DC. This compensates for voltage drop across the 18 AWG wire and ensures the PD trigger board receives enough headroom to negotiate the 5A contract.
  4. Verify PD Handshake: Look at the Raspberry Pi 5's power LED. It should illuminate solid green. Boot the Pi. Once Home Assistant OS loads, SSH into the host or check the hardware menu in the UI. Verify that the USB current limit is reported as 5000mA (5A), not 600mA.

The Most Common Botch and Its Symptom

The Botch: Bypassing the PD trigger board and wiring 5V DC directly to a generic USB-C breakout cable, or using a power supply that cannot be adjusted above 5.0V.
The Symptom: Home Assistant boots, but your Zigbee USB coordinator (like the Sonoff Zigbee 3.0 Dongle Plus) randomly drops offline every 12-24 hours, and external USB SSDs fail to mount. The Pi 5's firmware detects the lack of a PD contract and aggressively throttles the USB bus to 600mA to protect the board. Always use the trigger board and dial the supply to 5.15V.

Frequently Asked Questions

Can I install Home Assistant on a Raspberry Pi without a monitor?

Yes. Home Assistant OS is designed to run headless. Once you have hardwired the power and connected an Ethernet cable to your router, simply plug the Pi 5 in. Wait about 2 minutes for the first boot sequence to expand the filesystem and initialize the network. On your primary computer, open a browser and navigate to http://homeassistant.local:8123 to complete the onboarding wizard.

Why does my Raspberry Pi Home Assistant keep rebooting randomly?

Random reboots are almost exclusively caused by power brownouts or thermal throttling. If you used a standard USB wall adapter instead of the hardwired DIN-rail setup detailed above, transient current spikes from WiFi/Zigbee radios will pull the voltage below 4.63V, triggering the Pi's brownout detection and forcing a reboot. Check your power supply's DC output with a multimeter under load; it should never dip below 4.9V at the Pi's USB-C port.

What is the best Raspberry Pi model for Home Assistant in 2026?

The Raspberry Pi 5 (8GB) is the definitive choice for Home Assistant in 2026. The Pi 4 (4GB) is still capable but lacks the PCIe 2.0 interface required for native NVMe SSD booting. Running Home Assistant on a microSD card leads to inevitable flash wear and database corruption within 12 to 18 months. The Pi 5's M.2 HAT ecosystem allows you to boot from a reliable, high-speed NVMe drive, eliminating the primary failure point of Pi-based smart home servers.