> For the complete documentation index, see [llms.txt](https://docs.chirpwireless.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.chirpwireless.io/devices/commands.md).

# Controlling Your Devices

Up to now, Chirp has mostly listened — gathering readings from your sensors and showing them on your dashboards. **Commands** flip that around. They let Chirp *talk back* to your devices, so the same app that tells you the living room is chilly can also turn the heater on.

If a device can be told to do something, Chirp can do it for you: flick a smart plug on or off, dim the bedroom lights to 30%, warm a bulb's color temperature for movie night, nudge a thermostat to a new target, or send a setting to almost anything in your home. It works whether your device connects over Zigbee/MQTT or LoRaWAN — you don't have to think about the plumbing.

<figure><img src="/files/xdX3BT2TOovEO7RRUIvj" alt="A device&#x27;s Commands &#x26; States tab, with its commands and recent actions"><figcaption></figcaption></figure>

## Why you'll love it

Before, controlling a smart device usually meant juggling apps — one for the lights, another for the plugs, a third for the thermostat. Chirp brings the controls into the same place you already watch your home:

* **One home, one place to control it.** Define what a device can do once, then operate it with a tap — no fiddling with technical settings every time.
* **Tap-friendly controls.** You see a simple, friendly action ("Turn on", "Set brightness") — Chirp handles the messy details behind the scenes.
* **Know it actually happened.** Chirp can check that the device really responded, not just that the message was sent (see [Making sure it worked](/devices/commands/verification.md)).
* **A tidy history.** Every action you send is logged, so you can always see what changed and when.

## Where to find it

Open a device, and look for the **Commands & States** tab. It has two parts:

* **Commands** — where you set up the actions a device can do. See [Setting up a command](/devices/commands/creating-commands.md).
* **States** — where you actually press the buttons and see what happened. See [Sending a command](/devices/commands/executing-commands.md).

You'll see the **Commands & States** tab on devices that can be controlled:

* **Smart home devices connected over MQTT** — most Zigbee devices (through Zigbee2MQTT), DIY ESP32 builds, Tasmota plugs, and similar.
* **Class C LoRaWAN devices** — these listen all the time, so they're always ready to receive a command. (Battery-saving Class A LoRaWAN sensors only wake briefly, so they can't be controlled on demand.)

Once a device has at least one command set up, it becomes *controllable* — and you can also drop it onto a dashboard as a [Control widget](/dashboards/adding-widgets/control-widget.md).

## Before you start

To control a device, you'll want:

1. **A device that can receive commands** — connected over MQTT, or a Class C LoRaWAN device.
2. **At least one command set up** — a brand-new device has no actions yet. Start with [Setting up a command](/devices/commands/creating-commands.md).
3. **Permission to control it** — managing and sending commands follows your home's sharing settings.
4. **Sensible values** — if a command takes an input (like a brightness level), it has to be within the allowed range before Chirp will send it.

## Three ways to control a device

Commands are the foundation, and you can run them from three places:

* **On the device** — open it, go to **States**, and press a command.
* **On a dashboard** — add a [Control widget](/dashboards/adding-widgets/control-widget.md) so a light switch or button sits right next to your readings.
* **From an automation** — the [Rules engine](/rules-engine.md) can now press a command for you, automatically, the moment something happens. The same command you'd tap yourself gets sent with nobody home — so a leak at 3 a.m. shuts the water off on its own. See [When an Automation Runs a Command](/rules-engine/reference/automation-runs-a-command.md).

Alerts still have their place alongside all three: an automation can act *and* tell you about it — shut the water off **and** send you a heads-up — so the problem's handled and you're never left in the dark.

Ready? Head to [Setting up a command](/devices/commands/creating-commands.md).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.chirpwireless.io/devices/commands.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
