# Bobbie

### Get sensor data

*Request URL:*

```
POST /provider/fetch
```

*Headers:*

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

*Body*:

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

*Response:*

```
{
    "provider": {
        "cold": 26.490346029707, //value of the cold pipe temperature sensor in celsius
        "hot": 32.514830800359, //value of the hot pipe temperature sensor in celsius
        "home": 27.252545430612, //value of the ambient temperature sensor in celsius
        "energy": 0.10849291444, //electrical energy in kWh
        "voltage": 232.76088205096, //value of measured voltage in V
        "current": 12.254590367881, //value of electrical current in A
        "relay_state": 1, //state of the relay (1 - on, 0 - off)
        "load": true //indicator of load (boolean value)
    },
    "_links": {
        "self": {
            "href": "/v1/provider/fetch"
        }
    }
}
```

### Control relay state (turn Bobbie on/off)

*Request URL:*

```
POST /provider/send
```

*Headers:*

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

*Body*:

```
{
  "serial_number": “{Bobbie Serial Number}”,
  "command" : "switch_on_off",
  "state" : "on"  //receives values “on”/“off”
}
```

*Response:*

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

### Default State

*Request URL:*

```
POST /provider/send
```

*Headers:*

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

*Body*:

```
{
  "serial_number": “{Bobbie Serial Number}”,
  "command" : "default_state",
  "state" : 2  // 0-OFF, 1-ON, 2-DO NOTHING
}
```

*Response:*

```
{
  "provider": [
      254,
      16,
      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": “{Bobbie Serial Number}”,
  "command" : "led_on_off",
  "state" : 1  // 0-OFF, 1-ON
}
```

*Response:*

```
{
  "provider": [
      254,
      12,
      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/bobbie.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.
