A customer writes in with a very reasonable question: in the Shelly app, his gate shows a switch that says «On» and, when it changes, «Off». What he wants is for it to say «Open» and «Closed», because his Shelly 1 Gen3 has an Add-on with a limit switch wired to it that knows whether the gate is open or closed. It can be done, but there's a technical nuance worth understanding first, because it completely changes where you need to act.

First things first: that toggle is the relay, not the gate

The switch you see with «On/Off» is the relay output of the Shelly 1 Gen3: the pulse that drives the gate motor. The app won't let you change that text and, moreover, it shouldn't say «Open/Closed», because the relay only gives the order to the motor and doesn't know whether the gate actually opened. What does reflect the real position is the limit switch, the contact you've wired to the DIGITAL IN input of the Shelly Plus Add-on fitted to the Shelly 1 Gen3.
So the fix isn't to rename the toggle, but to show the limit switch's state as «Open/Closed» on a separate tile. There are two ways to do it, depending on what your app version offers and the level of detail you want.
Option A (no code): the input as a door sensor

This is the quickest route and needs no code. The limit switch is wired to the DIGITAL IN input of the Plus Add-on (two wires, no voltage). Then, in the Shelly Smart Control app, you open the Shelly 1 Gen3 and add the digital input peripheral. In that input's settings, if your app version offers it, you pick the door/garage type: the status then shows as a tile with its icon and open/closed text. If it reads backwards, enable «Invert» in the input settings, and run a full open-and-close cycle to confirm the sensor reports the right state.
If your app doesn't show the «door» input type, the input will still appear as a generic contact (active/inactive). In that case, or if you want literally the words «Open» and «Closed», use Option B.
Option B (exact text): Virtual Component + script

Shelly Gen3 devices (and Gen2/Plus with current firmware) support Virtual Components and scripts. This lets you create a tile with exactly the text you want and keep it in sync with the limit switch. The process is:
- In Components, create a new Virtual Component of type Boolean. Give it a name (for example, «Gate») and set its two titles: the true state as «Open» and the false one as «Closed». Choose the label view. Note its ID (virtual components run from 200 up).
- Check the Add-on input ID in Components. It's usually
input:100. - In Settings > Scripts, create a script, paste the code below (adjust the IDs if yours differ) and enable it. Tick «run on startup» so it keeps working after a reboot.
- Add the Virtual Component to a group so it appears on the app's home screen.
The script reads the limit switch state and copies it to the Boolean whenever it changes; the Boolean, with your titles, shows «Open» or «Closed»:
// Show OPEN / CLOSED from the Add-on limit switch
// Adjust the IDs if yours differ (check them in Components)
let INPUT_ID = 100; // Add-on digital input (usually input:100)
let BOOL_ID = 200; // your virtual Boolean component (e.g. "Gate")
let INVERT = false; // set to true if the state reads reversed
function sync(state) {
if (INVERT) state = !state;
Shelly.call("Boolean.Set", { id: BOOL_ID, value: state });
}
// State on boot
Shelly.call("Input.GetStatus", { id: INPUT_ID }, function (r) {
if (r) sync(r.state);
});
// Whenever the limit switch changes
Shelly.addStatusHandler(function (e) {
if (e.name === "input" && e.id === INPUT_ID && e.delta && e.delta.state !== undefined) {
sync(e.delta.state);
}
});
After saving it, do a full open and close: the «Gate» tile should go from «Closed» to «Open» and back. If it shows reversed, set INVERT = true (or invert the input in its settings).
Before you start, keep in mind
- You need the Add-on and the limit switch. The gate's status doesn't come from the relay: it needs the physical contact on the Plus Add-on's DIGITAL IN input. The door kit already includes the three parts, matched.
- The relay and the status are independent. You can keep using the toggle to open/close and, separately, have the «Open/Closed» tile that tells you the real position.
- Always check with a full cycle. A misaligned limit switch may never register «open»; adjust it until the state really changes.
- The script runs locally. It doesn't depend on the cloud: the status updates even with no internet.
Frequently asked questions
Why does the toggle say «On/Off» and not «Open/Closed»?
Because it's the relay output, that is, the pulse that drives the motor. It's not the gate's position, which is why the app shows it as an on/off switch. The real status comes from the limit switch, shown separately.
Can I directly change the relay's «On/Off» text?
No. The app doesn't offer renaming an output's on/off state, and even if you could, it would be misleading: the relay being «on» doesn't guarantee the gate is open.
What do I need to see «Open/Closed»?
A limit switch (magnetic contact) wired to the DIGITAL IN input of the Shelly Plus Add-on fitted to the Shelly 1 Gen3. The automatic door kit already includes the Shelly, the Add-on and the sensor.
Option A or B?
A is quicker and code-free, if your app version offers the «door/garage» input type. B gives you the exact «Open/Closed» text and works even if your app doesn't offer that type; in exchange, you create a component and paste a script.
Does the script get wiped on reboot?
No, if you tick «run on startup» when you create it. That way it relaunches by itself every time the Shelly powers up.
What ID does the Add-on input have?
Usually input:100. Check it in the device's Components section and adjust the script's INPUT_ID value if yours is different.
Does it work on Gen2/Plus devices or only Gen3?
Virtual Components and scripting are available on Gen3 and also on Gen2/Plus devices with current firmware. If you don't see the Components section, update the device firmware.
Summary and products
- Pack Puerta Automática Shelly 1 Gen3 — includes the Shelly 1 Gen3, the Plus Add-on and the limit switch: exactly what you need to see the gate's status.
- Shelly Plus Add-On — if you already have the Shelly and just need the input for the limit switch.
- Shelly 1 Gen3 — the dry-contact relay that drives the gate motor.
If you like, we'll set up the component and the script ready for your case —with your device's IDs— so you only have to copy it across. Technical support in Spanish and English, and shipping from Spain.

Dejar un comentario