forked from Sensibo/sensibo-python-sdk
-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
SensiboAPI_v2.yaml
205 lines (204 loc) · 4.8 KB
/
SensiboAPI_v2.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
# Example YAML to get you started quickly.
# Be aware that YAML has indentation based scoping.
swagger: '2.0'
info:
version: "2.0.0"
title: Sensibo
host: home.sensibo.com
basePath: /api/v2
schemes:
- https
consumes:
- application/json
produces:
- application/json
security:
- apiKey: []
securityDefinitions:
apiKey:
type: apiKey
in: query
name: apiKey
paths:
/users/me/pods:
get:
description: |
Gets `Pods` of a specific user.
security:
- apiKey: []
responses:
200:
description: Successful response
schema:
title: ArrayOfPods
type: array
items:
title: Pod
type: object
properties:
name:
type: string
/pods/{podUid}:
get:
description:
Gets `Pod` of a specific user.
parameters:
-
name: podUid
in: path
description: Pod unique id
required: true
type: string
security:
- apiKey: []
responses:
200:
description: Successful response
schema:
title: Pod
type: object
items:
properties:
name:
type: string
/pods/{podUid}/acStates:
get:
description:
Get air conditioner state (and previous) for this pod
parameters:
-
name: podUid
in: path
description: Pod unique id
required: true
type: string
security:
- apiKey: []
responses:
200:
description: Success. Returns when command actually happened
post:
description:
Set air conditioner state for this pod
parameters:
-
name: podUid
in: path
description: Pod unique id
required: true
type: string
-
name: acState
in: body
description: The required AC state
schema:
$ref: '#/definitions/acStateObject'
security:
- apiKey: []
responses:
200:
description: Success. Returns when command actually happened
/pods/{podUid}/acStates/{property}:
get:
description:
Get air conditioner state for a specific state id
parameters:
-
name: podUid
in: path
description: Pod unique id
required: true
type: string
-
name: property
in: path
description: State id to be retrieved
required: true
type: string
security:
- apiKey: []
responses:
200:
description: Success. Returns when command actually happened
patch:
description:
Change a protperty of the air conditioner state for this pod
parameters:
-
name: podUid
in: path
description: Pod unique id
required: true
type: string
-
name: property
in: path
description: The property to change (e.g., targetTemperature)
required: true
type: string
-
name: newValue
in: body
description: new value for property (e.g., "24")
required: true
schema:
$ref: "#/definitions/newValueObject"
security:
- apiKey: []
responses:
200:
description: Success. Returns when command actually happened
/pods/{podUid}/measurements:
get:
description:
Returns an array with the last measurements sent by the pod
parameters:
-
name: podUid
in: path
description: Pod unique id
required: true
type: string
security:
- apiKey: []
responses:
200:
description: Success. Returns an array of 1 measurement object with time temperature and humidity
definitions:
acStateObject:
required:
- acState
properties:
acState:
$ref: '#/definitions/acState'
acState:
type: object
required:
- on
- mode
- fanLevel
- targetTemperature
properties:
on:
type: boolean
description: on/off
mode:
type: string
description: one of "cool", "heat", "fan"
fanLevel:
type: string
description: one of "low", "medium", "high", "auto"
targetTemperature:
type: integer
description: target temperature (16 to 30)
newValueObject:
type: object
required:
- newValue
- currentAcState
properties:
newValue:
type: string
description: the new value
currentAcState:
$ref: "#/definitions/acStateObject"