Swing gate with full and pedestrian opening: two Shelly 1 Gen3 on the controller

A customer with a swing-gate motor wanted both openings from the phone: full, for the car, and pedestrian, one leaf. He already had the Automatic Gate Pack and a spare Shelly 1 Gen3. He got it right: exactly those two parts are needed. Here is why, and how to configure them through the API as well as the app.

One channel per input

The Shelly 1 Gen3 has a single relay, switch:0: it gives one command. A two-leaf swing gate controller has two separate command inputs, one per mode. One command per input, one Shelly per input:

DeviceController inputExtra
Shelly no. 1 (from the pack)Full openingPlus Add-on + limit switch: state
Shelly no. 2 (spare)Pedestrian opening—

Wiring: dry contact in parallel

The Shelly 1 Gen3’s O and I terminals are a potential-free contact: they close together when the relay acts and carry no voltage of their own. Electrically they are a push button. So:

  • Each Shelly’s O–I goes, with two wires, to its mode’s command input, in parallel with the existing push button. Remote and wall button keep working as before.
  • The Shelly’s supply (L/N) is a separate circuit from the contact. Many controllers offer a 24 V auxiliary output in AC: check the Shelly’s datasheet accepts that voltage before using it; 24 V AC is not 24 V DC.
  • The motor’s power never goes through the Shelly. The contact only “presses” the input; the controller still drives the motor.

Input names vary by manufacturer: full opening is often labelled “step-by-step”, “PP” or “start”, pedestrian “ped”. Confirm it in the controller’s manual before connecting.

Pulse mode: auto_off at one second

A gate controller expects a pulse, the same as a press of the button. A relay that stays closed is a button held down: depending on the controller, it locks up, ignores commands or drops into hold-to-run mode. In the app it is Auto-off at 1 s; over RPC, on each of the two devices:

http://<ip>/rpc/Switch.SetConfig?id=0&config={"auto_off":true,"auto_off_delay":1}

With that, Switch.Set with on=true gives a one-second pulse and the relay returns on its own. It is the call you would use from Home Assistant, a script or another system:

http://<ip>/rpc/Switch.Set?id=0&on=true

Check the mode of the Shelly’s SW input too: with nothing connected, set it detached (in_mode: "detached") so no noise on the terminal can fire the relay.

Why the state has to come from a sensor

The step-by-step input is sequential: each pulse cycles open → stop → close → stop. The controller knows where it is in that cycle; the Shelly does not. The relay only knows it sent a pulse, never which way the gate went. That is why the pack includes a magnetic limit switch on the no. 1’s Plus Add-on: it appears as input:100 and its state is the real position.

http://<ip>/rpc/Input.GetStatus?id=100

With that you can build automations that make sense: warn if the gate has been open more than ten minutes, or not send a “close” pulse when it is already closed — which on step-by-step would open it. To have the app show “Open/Closed” instead of a switch, see the article on the limit switch.

Safety

  • Photocells across the opening and force limiting with reversal on obstruction: they belong to the controller, not the Shelly, and they must be there.
  • Do not enable automatic closing without photocells.
  • Make sure no scene can pulse both inputs at once: a full and a pedestrian pulse in quick succession leave the controller in a state that is hard to predict.
  • A gate controller carries mains voltage and drives a heavy moving leaf. Without experience, have an installer connect it.

Frequently asked questions

Wouldn’t a two-channel Shelly 2PM do?

Its outputs are not dry contacts: they switch the phase that supplies it. A voltage-free command input needs a potential-free contact, which is what the Shelly 1 Gen3 provides.

Will the usual remote still work?

Yes. Being in parallel with the push button, remote and button carry on; the Shelly adds another way in.

In short: one Shelly 1 Gen3 per input; O–I in parallel with the push button; auto_off at 1 s on both; the state from the limit switch on input:100, never from the relay.