> For the complete documentation index, see [llms.txt](https://docs.eseye.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.eseye.com/modules/cinterion-r-pls62-w-wireless-module/mqtt-at-commands/emqpersist-report-a-set-value-to-the-device-shadow.md).

# EMQPERSIST – report a set value to the device shadow

Report a set value to the device shadow/twin. The operation depends on which `AWSSHADOW` mode you set, either `simple` or `complete`.

{% hint style="success" %}
You set `AWSSHADOW` in the Configuration File. For more information, see [Using the Cinterion® PLS62‑W Wireless Module configuration file](https://docs.eseye.com/smartconnect/getting-started/using-the-anynet-smartconnect-tm-configuration-file.md).
{% endhint %}

## AWSSHADOW `simple` mode

The shadow ETM performs the following automatically:

* Generates the JSON`state` and `reported` or `desired` objects
* Subscribes to the `shadow/update/delta` topic, and filters out the containing objects
* Presents the host with the state object JSON content only, sent via URC

The host only sends the content of the `reported` object.

## AWSSHADOW `complete` mode

The host sends the complete JSON for the shadow to ETM.

ETM sends the complete shadow message as a URC, without filtering.

## EMQPERSIST commands

| Type      | Syntax                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     | Returned Result                                                                     |
| --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------- |
| **Test**  | `AT+EMQPERSIST=?`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          | <p><code>OK</code></p><p><code>EMQPERSIST:\<json></code></p>                        |
| **Read**  | `AT+EMQPERSIST?`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           | <p><code>OK</code></p><p>or</p><p><code>ERROR</code></p>                            |
| **Write** | <p><code>AT+EMQPERSIST=\<JSON></code></p><p>where JSON is the JSON code, which depends on the AWSSHADOW mode you configured.</p><p>For <code>simple</code> mode:</p><p>Either the content of the <code>statereported</code> object or <code>desired</code> object is required, in this format:</p><p><code>AT+EMQPERSIST="{"key":value}"</code></p><p>where <code>value</code> is a numeric value, including decimals and negative numbers.</p><p>If the passed-in text does not include <code>reported</code> or <code>desired</code>, then <code>reported</code> is assumed. The <code>state reported</code> encapsulation is appended.</p><p>If the passed-in text includes <code>reported</code> and/or <code>desired</code>, only the <code>state</code> encapsulation is appended.</p><p>For example, for the reported text:</p><p><code>"{"key":"value"}"</code> and</p><p><code>"{"reported":{"key":"value"}}"</code> are both sent as</p><p><code>{"state":{"reported":{"key":"value"}}}</code></p><p>For example, for reported and desired text:</p><p><code>"{"reported":{"key":"value"},"desired":{"key":"value"}}"</code> is sent as</p><p><code>{"state":{"reported":{"key":"value"},"desired":{"key":"value"}}}.</code></p><p>For <code>complete</code> mode:</p><p>The complete JSON data for the shadow/update topic is required, in this format:</p><p><code>AT+EMQPERSIST="{"state":{"reported":{"key":value}}}"</code></p><p>where <code>value</code> is a numeric value, including decimals and negative numbers.</p> | <p><code>OK</code></p><p><code>SEND OK</code></p><p>or</p><p><code>ERROR</code></p> |

#### Examples

For `Simple` mode:

```
AT+EMQPERSIST="{\"Temperature\":-3.5}"
AT+EMQPERSIST="{\"Colour\":\"Blue\"}"
```

For `Complete` mode, including setting AWSSHADOW to complete:

```
AT+EMQPERSIST="{\"state\":{\"reported\":{\"Temperature\":28.0}}}"
```


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.eseye.com/modules/cinterion-r-pls62-w-wireless-module/mqtt-at-commands/emqpersist-report-a-set-value-to-the-device-shadow.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
