> 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

Control your devices from Chirp — turn things on or off, dim lights, or just ask the AI Assistant to do it for you.

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 platform that tells you the living room is chilly can also turn the heater on.

With a supported connection and the right command payload, you can 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="https://1153890212-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxgYoHO4zlaBzHJcfIrto%2Fuploads%2Fgit-blob-239a5c4d9d211d02bfa521e702ded55600c79c58%2Fdevice-command-states.jpg?alt=media" alt="A device&#x27;s Commands &#x26; States tab, with its commands and recent actions"><figcaption></figcaption></figure>

The saved actions belong to the device's [digital twin](https://docs.chirpwireless.io/devices.md), while the connected hardware carries them out. If you replace a smart plug or garden valve with another model, check its command settings and feedback readings before using the action again. Keeping the same digital device does not make the new model accept the old model's messages.

## 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](https://docs.chirpwireless.io/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](https://docs.chirpwireless.io/devices/commands/creating-commands.md).
* **States** — where you actually press the buttons and see what happened. See [Sending a command](https://docs.chirpwireless.io/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.
* **LoRaWAN devices** — save the physical connection first. A Class A sensor receives commands after it sends an update, while Class C can listen between updates. Check that the model supports the action you want.
* **Pretend sensors with Support commands switched on** — a [pretend sensor](https://docs.chirpwireless.io/devices/pretend-sensors.md) behaves like the real thing, so you can practise the whole business before the hardware turns up.

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](https://docs.chirpwireless.io/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, a LoRaWAN device that accepts commands, or a [pretend sensor](https://docs.chirpwireless.io/devices/pretend-sensors.md) with commands switched on.
2. **At least one command set up** — a brand-new device has no actions yet. Start with [Setting up a command](https://docs.chirpwireless.io/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.

## Five ways to control a device

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

* **On the device** — open it, go to **States**, and press a command.
* **On a dashboard** — add a [Control widget](https://docs.chirpwireless.io/dashboards/adding-widgets/control-widget.md) so a light switch or button sits right next to your readings.
* **From an automation** — the [Rules engine](https://docs.chirpwireless.io/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](https://docs.chirpwireless.io/rules-engine/reference/automation-runs-a-command.md).
* **By asking the assistant** — say *"turn on the lamp"* and your [AI Assistant](https://docs.chirpwireless.io/ai-assistant.md) does it, after showing you what it's about to send and checking afterwards that the device got it. See [Ask It to Turn Things On](https://docs.chirpwireless.io/ai-assistant/let-ai-set-it-up.md).
* **From your own AI app** — connect ChatGPT, Claude or anything else that speaks MCP and ask it the same thing from wherever you already work. See [Your Own AI App](https://docs.chirpwireless.io/api/mcp-server.md).

All five end up in the same place: the commands you set up here, sent the same way, logged the same way.

Alerts still have their place alongside all of them: 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](https://docs.chirpwireless.io/devices/commands/creating-commands.md).
