# Host @ Commands

From [OctoPrint's documentation](https://docs.octoprint.org/en/master/features/atcommands.html):

> @ commands (also known as host commands elsewhere) are special commands you may include in GCODE files streamed through OctoPrint to your printer or send as part of GCODE scripts, through the Terminal Tab, the API or plugins. Contrary to other commands they will never be sent to the printer but instead trigger functions inside OctoPrint.

The plugin reacts to some different @ commands, listed below:

| Command         | Explanation                                         |
| --------------- | --------------------------------------------------- |
| `@WS_LIGHTSON`  | Turns lights on, same as pressing switch in navbar. |
| `@WS_LIGHTSOFF` | Turns lights off.                                   |
| `@WS_TORCH`     | Activates the torch mode, for timer mode            |
| `@WS_TORCH_ON`  | Turn torch on, for toggle mode                      |
| `@WS_TORCH_OFF` | Turn torch off, for toggle mode                     |

These commands can be used in g-code scripts, or in custom controls in apps - see here for [instructions for OctoRemote](https://github.com/cp2004/OctoPrint-WS281x_LED_Status/issues/6#issuecomment-668110507), or the guide on how to create a [timelapse flash in OctoLapse](https://cp2004.gitbook.io/ws281x-led-status/devel/guides/octolapse-flash) which also uses @ commands.


---

# Agent Instructions: 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:

```
GET https://cp2004.gitbook.io/ws281x-led-status/devel/documentation/host-commands.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
