# MQTT JSON Structure

Devices that have been registered with Edgeware will advertise their telemetry data on MQTT topics such as

```
ble/adv/{MAC-address}
```

<figure><img src="https://1919983420-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRttkjsvZgmC2QBy90cck%2Fuploads%2FRF2by5uoLgDDLB2hoDiR%2Fimage.png?alt=media&#x26;token=b398ed92-3873-46b1-9fa5-181e54e96e0e" alt=""><figcaption></figcaption></figure>

The structure of the JSON message is different for every sensor type, but will generally look like the below Ruuvi sensor payload:

```
{
    measurement: "ambient"
    fields: {
        temperature: 16.29
        humidity: 46.7475
        pressure: 1012.66
        accelX: 64
        accelY: -52
        accelZ: 1032
        batteryVol: 2109
        moveCounter: 0
    }
    tags: {
        make: "ruuvi"
        model: "ruuvi-tag"
        name: "Ruuvi Loungeroom"
        address: "E1BD5B95F2B0"
    }
    timestamp: "2023-09-09T03:34:33.207+00:00"
    rssi: -53
}
```

![](https://1919983420-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRttkjsvZgmC2QBy90cck%2Fuploads%2FfYGK4Wb3OCuIhiC5A9Og%2Fimage.png?alt=media\&token=61aa6f0d-4cff-49b6-b164-fa190d213b5b)

## Request-Response Actions over MQTT

Interactions via the Edgeware gateway follow the Request-Response MQTT v5 pattern. For more information visit:\
<https://www.hivemq.com/blog/mqtt5-essentials-part9-request-response-pattern/>

You can post requests to

```
ble/requests/{device}
```

A demonstration of this will come soon...
