Testing Shelly Smart Switches with a Battery Pack (No Electrician Required)

Sat May 02 2026

How I safely tested a Shelly GEN4 relay using a battery pack and avoided opening up electrical wiring.

Written by: Cesar

2 min read

IoT

Shelly

Hardware

Testing

DIY

I’m working with the Shelly smart switch platform, but I’ve never installed anything in my home that requires opening up a light switch and connecting a bunch of wires. I wasn’t feeling confident about it, so I decided to find an alternative way to test first.

I found that I could use a battery pack instead — a much safer approach than accidentally electrocuting myself.

The Setup

I bought the Raptor 2600 mAh Battery Pack on Amazon, and it already came with a 2-wire connection built in. Saved me a trip to get one separately.

When it arrived, I looked online for examples on how to connect it to the Shelly, but found nothing. So I worked with my AI advisor, who suggested hooking up the red wire to the 12V and the black to the N+. Didn’t work.

I struggled for a bit, trying different things — hooking the wires to the charger that came with the battery pack. No luck. Eventually, I ended up using the L pin on the Shelly and it worked.

When I showed that to my AI, it told me it was wrong and to be careful. But I convinced it that it actually worked.

The Solution

The breakthrough: use the L pin on the Shelly for power input, not the typical 12V/N+ pins. This gave me a working test setup with zero risk.

Shelly battery pack setup with jumper cables

I’m currently using a jumper cable to trigger a button press — connecting the same L pin and the SW (switch) pin whenever I want to simulate a button press.

Why This Works

Battery packs are isolated, low-voltage systems. They’re perfect for testing logic and wiring without touching live household electrical. Once I validate my setup with the battery, I can feel confident moving to real electrical installation.

No opened switches. No risk. Just iteration and learning.


Next up: Once this battery setup is proven out, I’ll move to real installation. But for now, I’ve got a safe, reversible way to test Shelly’s capabilities.