# 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"
    }
  }
}
```

##


---

# 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://docs.mclimate.eu/mclimate-api-documentation/control-devices-1/melissa.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.
