Button on a board to open the yard gate, but my command doesn’t show up in the control settings
Different project from my trailer one. At our depot the yard gate is a roller door with a dumb controller that takes a dry contact pulse to open or close. I put an ESP32 with a relay next to it, the relay closes for 500 ms when it gets a command, and a reed switch on the door reports door_closed as telemetry. All working from the device’s Commands tab.
Now the night shift wants a button on the depot board instead of hunting through the device page. I added a Button card, went to When this control is used, Run a command, picked the device… and the command list is empty. I made the command gate.pulse in the profile’s Commands catalogue, tier Privileged because, well, it’s a gate. Marked it high impact too.
What am I missing? The card just says “Choose a command in this widget’s settings”.
Could you make it a switch that writes a telemetry value and have the ESP32 watch for that? That’s what I did for a light.
Unrelated to the menu thing, but make sure the ESP32 only ever pulses and never holds the relay, and that the door controller’s own limit switches and safety edge are what stop it. The board button should be a convenience, not the safety.
Yep, door has its own safety edge and photocell, the ESP32 only does the pulse. Kevin, I’d rather not, the command history with who pressed it is half the reason we’re doing this.
It’s the tier. A board control only sends commands that are in the profile’s catalogue, Basic tier, and not high impact. Privileged, Critical and anything marked high impact get refused from a board on purpose (“send it from the device console”), so the picker doesn’t offer them.
We run a loading-bay door the same way. Set gate.pulse to Basic and untick high impact, then leave “Ask before running” on in the button’s action, so the operator still gets a confirm dialog (the server enforces it too, nobody skips it from another client). Bind a status line to door_closed so people see what the door is doing, not what they pressed. Who may press it is down to permissions: Run widget commands plus permission to send basic commands. Night shift gets those, people who only look at the board don’t.
And one thing on the ESP32 side: a command can arrive twice. Keep the last 32 request ids for 10 minutes and don’t run the same id again. For a gate that toggles on each pulse this matters, a duplicate means it opens and closes again.
Page with the board rules: Control cards.
That was it, tier and the high impact box. It shows up now. And the duplicate thing is real: during testing we had one double pulse when the depot Wi-Fi dropped right after a press, the door went up and straight back down. Added the request id check and haven’t seen it since.
The “may arrive twice” rule catches a lot of people, worth putting in every sketch that drives something physical.
- You must be logged in to reply to this topic.
Join the conversation
Sign in to ask and answer, like helpful posts and mark the reply that solved your problem. Every contribution earns points and levels.

