home-iot-api (1.0.0)

Download OpenAPI specification:

The API for the EatBacon IOT project

Device

getDevices

returns all registered devices

query Parameters
skip
integer <int32>

number of records to skip

limit
integer <int32>

max number of records to return

Responses

Response samples

Content type
application/json

register

Request Body schema: application/json
uri
string <uri>
id
string <uuid>

Responses

Request samples

Content type
application/json
{}

Z-Wave

setDimmer

path Parameters
deviceId
required
string
value
required
integer <int32> [ 0 .. 100 ]

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "everything is ok"
}

setDimmerTimer

sets a dimmer to a specific value on a timer

path Parameters
deviceId
required
string
value
required
integer <int32>
timeunit
required
integer <int32>
query Parameters
units
string
Default: "milliseconds"
Enum: "seconds" "minutes" "milliseconds"

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "everything is ok"
}

getSwitchState

path Parameters
deviceId
required
string

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "lastUpdate": "2019-08-24T14:15:22Z",
  • "level": 0
}

setSwitch

path Parameters
deviceId
required
string
value
required
string
Enum: "true" "false"

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "everything is ok"
}

setSwitchTimer

sets a switch to a specific value on a timer

path Parameters
deviceId
required
string
value
required
string
Enum: "true" "false"
minutes
required
integer <int32>

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "everything is ok"
}

getLightingSummary

Responses

Response samples

Content type
application/json
{
  • "zones": [
    ],
  • "zoneStatus": [
    ]
}

Environment

temperatureSummary

Responses

Response samples

Content type
application/json
{
  • "zones": [
    ],
  • "zoneStatus": [
    ]
}

getForecast

path Parameters
days
required
integer <int32>

Responses

Response samples

Content type
application/json
{
  • "city": {
    },
  • "values": [
    ]
}

getZoneTemperature

path Parameters
zoneId
required
string

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "value": 0.1,
  • "units": "celsius",
  • "timestamp": "2019-08-24T14:15:22Z"
}

getHeaterState

gets the state of the heater

path Parameters
zoneId
required
string

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "state": "string"
}

setHeaterState

turns the heater on or off

path Parameters
zoneId
required
string
state
required
string
Enum: "false" "true"

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "everything is ok"
}

Zones

getZones

Responses

Response samples

Content type
application/json
[
  • "string"
]

quietZone

path Parameters
zoneId
required
string
Enum: "basement" "first-floor" "second-floor"

Responses