> For the complete documentation index, see [llms.txt](https://docs.mclimate.eu/mclimate-api-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.mclimate.eu/mclimate-api-documentation/control-devices-1/melissa.md).

# Melissa

### Get sensor data

*Request URL:*

```
POST /provider/fetch
```

*Headers:*

```
Content-Type: application/json
Authorization: Bearer {access_token}
```

*Body*:

```
{
  "serial_number" : "{Melissa Serial Number}"
}
```

*Response:*

```
{
    "provider": {
        "temp": 16.6,   // temperature in celsius  
        "raw_temperature": 24928,  //raw sensor data for the ambient temperature
        "humidity": 43.8,  //humidity in %
        "raw_humidity": 26096  //raw sensor data for the ambient humidity
    },
    "_links": {
        "self": {
            "href": "/v1/provider/fetch"
        }
    }
}
```

### Sending IR Command to the AC

*Request URL:*

```
POST /provider/send
```

*Headers:*

```
Content-Type: application/json
Authorization: Bearer {access_token}
```

*Body*:

```
{
  "serial_number": “{Melissa Serial Number}”,
  "command": "send_ir_code",
  “state": 1,  //0-OFF; 1-ON; 2-Idle
  "mode": 3,   //0-Auto; 1-Fan; 2-Heat; 3-Cool; 4-Dry
  "temp": 18,  //number between 16 and 30 (depends on the codeset)
  "fan": 0     //0-Auto; 1-Low; 2-Med; 3-High
}
```

*Response:*

```
{
  "provider": [
    254,
    2,
    0,
    0
  ],
  "_links": {
    "self": {
      "href": "/v1/provider/send"
    }
  }
}
```

### Turning OFF/ON the LED light

*Request URL:*

```
POST /provider/send
```

*Headers:*

```
Content-Type: application/json
Authorization: Bearer {access_token}
```

*Body*:

```
{
  "serial_number": “{Melissa Serial Number}”,
  "command": "turn_led_off" //turn_led_off-led light off, reset_color-led light on
}
```

*Response:*

```
{
  "provider": [
    254,
    7, // 6 - off, 7 - on
    0,
    0
  ],
  "_links": {
    "self": {
      "href": "/v1/provider/send"
    }
  }
}
```

##
