Shadows provide an effective way to manage configurations for devices that are only intermittently online.

Shadows are stored in HERE Tracking and contain two states of a device's configuration: The reported state and the desired state.

The reported state contains the most recent position, sensor readings and settings that the device has sent. The reported shadow may also contain properties generated by HERE Tracking. Such properties are stored in system.computed property.

In case the most recent telemetry did not contain information of all the possible fields, the older, but last known, information remains in the shadow. This means that you can see e.g. the last reported temperature or tracker firmware information in the reported shadow, even if the device did not send that information in the latest telemetry.

The desired state contains the settings that will be sent to the device when it next comes online.

IMPORTANT Devices should not communicate directly with the shadows service, but instead send the telemetry to the ingestion endpoint, which updates the reported shadow and returns the desired shadow.

Ideally, applications should only write to the desired configuration state and only read from reported configuration state.

## Example

A connected heater reports that the temperature of the room in which it is installed is 25°C. This value is stored in the device's reported state.

### Reported state

{
"reported": {
"temperature": 25.2
}
}
}


The facility management system wants the room temperature lowered and sets the desired value:

### Reported state

{
"desired": {
"temperature": 21
}
}
}


The next time the device comes online, it will receive this desired state.

The device will then change the temperature of the room and update its shadow again

### Reported state

{
"reported": {