Best Practices for Installing Shelly Relays in Electrical Panels
By Shelly Europe | Published: 2026-07-25
Category: Tips & Care
Learn how to safely install Shelly relays in your electrical panel. This guide covers DIN rail mounting, wiring best practices, and tips for using devices like Shelly 1 Gen4 and Shelly Plus 1PM.
Installing a smart relay directly inside your electrical panel is one of the most effective ways to automate lights, appliances, and other circuits without cluttering your walls. By mounting a Shelly relay on the DIN rail inside the panel, you gain centralized control and energy monitoring while keeping the installation tidy and professional. However, working inside a breaker box comes with strict safety requirements and best practices that must not be overlooked.
Whether you are a seasoned electrician or a confident DIYer, understanding the right approach to mounting, wiring, and configuring Shelly relays in a panel ensures a safe, code-compliant, and reliable smart home. This guide covers key considerations, from selecting the correct relay to managing heat and clearance, with practical tips for popular models like the Shelly 1 Gen4 2-pack and the Shelly Plus 1PM.

Why Mount Shelly Relays Inside the Electrical Panel?
Placing relays inside the main panel offers several advantages. It eliminates the need for separate junction boxes near each load, reduces visible wiring, and centralizes all smart controls in one secure location. Combined with a DIN rail adapter, most Shelly relays snap easily onto the standard rail found in modern panels, making installation quick and modular.
Another benefit is the proximity to the main breaker and neutral bar, which simplifies power tapping and ensures a clean ground reference. This setup also enables whole‑circuit energy monitoring when using relays like the Shelly Plus 1PM, which reports real‑time power consumption. By consolidating devices in the panel, you reduce electromagnetic interference and create a more professional finish.
- Centralized control – manage multiple circuits from one enclosure.
- Cleaner installation – no extra boxes or exposed wires near loads.
- Easy DIN rail mounting – compatible with standard panel rails.
Pre‑Installation Safety and Planning
Before opening your electrical panel, always turn off the main breaker and use a non‑contact voltage tester to confirm the power is dead. Working inside a live panel is extremely dangerous; never skip this step. Additionally, check local electrical codes to ensure that adding low‑voltage devices inside the panel is permitted. Many jurisdictions allow it as long as the relay is UL or CE listed and installed according to the manufacturer’s instructions.
Plan the layout carefully. Choose a position on the DIN rail that leaves enough space for ventilation. Shelly relays generate minimal heat, but stacking them too closely can raise temperatures and reduce lifespan. Leave at least 10 mm of air gap between adjacent devices. For new installations, consider using a dedicated branch circuit to power the relays, or tap from an existing breaker using proper wire gauges and ferrules.
- Always disconnect main power and verify with a tester.
- Consult local codes before mounting smart devices inside the panel.
- Allow adequate spacing between relays for heat dissipation.
Step‑by‑Step DIN Rail Mounting and Wiring
Most Shelly relays come with a DIN rail clip that clicks onto the standard 35 mm rail. For models like the Shelly 1 Gen4 2-pack, snap each relay onto the rail one by one, ensuring they are firmly seated. If your panel has a crowded rail, you can use a rail‑mounting bracket to create extra sections. Once mounted, connect the live (L) wire from the breaker to the relay’s L terminal, and the neutral (N) wire to the N terminal.
For the load side, connect the switched live output (O or SW) to the device or circuit you want to control. If the relay includes a dry contact (e.g., Shelly 1 Gen4), you can also use it for switching low‑voltage signals. Always use wire ferrules for stranded wires and tighten terminal screws to the torque specified in the manual. For the Shelly Plus 1PM, also connect the CT clamp around the load wire if you want accurate energy monitoring.
- Snap relays onto the DIN rail until they click – check for a secure fit.
- Use ferrules on stranded wires to prevent loose connections.
- For current monitoring, install the CT clamp per the manufacturer’s diagram.
Wiring Safety Tips and Common Mistakes
One common mistake is mixing up neutral and ground. In a panel, the neutral bar and ground bar are often bonded at the main panel only. Never connect a relay’s neutral to the ground bar; it must go to the neutral bar. Also, avoid running low‑voltage sensor wires alongside high‑voltage AC cables within the panel – this can induce noise and affect sensor readings. If you need to add sensors like the Shelly Temp. Sensor DS18B20, route their wires separately or use shielded cable.
Another critical point is over‑torquing terminals. Shelly relay terminals are designed for a specific torque range (usually 0.4–0.6 Nm). Using a screwdriver with a torque setting helps avoid damaging the terminal block. Finally, always label each relay and its corresponding breaker inside the panel. This makes future troubleshooting and maintenance much easier, especially if you have multiple relays like a pair of Shelly 1 Gen4 units.
- Neutral must go to the neutral bar – never to the ground bus.
- Keep sensor wires away from AC mains to avoid interference.
- Use a torque screwdriver to avoid over‑tightening terminals.
- Label every relay and its circuit for easy identification.
Testing and Configuration After Installation
After wiring, double‑check all connections visually and with a continuity tester if possible. Then restore power only after closing the panel door. Turn on the main breaker and then the individual breaker feeding the relay. Use the Shelly Smart Control app (or web interface) to verify that the relay powers on and connects to your Wi‑Fi, Z‑Wave, or Zigbee network.
Once connected, test each output by toggling it via the app and physically verifying the connected load responds. For energy‑monitoring models like the Shelly Plus 1PM, check that the power readings make sense (e.g., a 60 W bulb should show around 60 W). If readings seem off, confirm the CT clamp orientation and wiring polarity. Finally, set up schedules, scenes, or voice control to fully automate the circuit.
- Perform a visual check of all connections before closing the panel.
- Test each relay manually via the app after power‑up.
- Verify energy readings match expected load values.
Installing Shelly relays in your electrical panel is a smart way to achieve whole‑home automation while keeping your wiring clean and safe. By following these best practices – from proper DIN rail mounting and wiring safety to testing and labeling – you can create a reliable, code‑compliant setup that works flawlessly for years. Ready to start your panel upgrade? Explore the Shelly 1 Gen4 2-pack and other DIN‑rail compatible relays to bring smart control to every circuit in your home.



