1
apiVersion: backstage.io/v1alpha1
5
description: The Smartylighting Streetlights API allows you to remotely manage the city lights.
15
title: Streetlights MQTT API
17
description: "The Smartylighting Streetlights API allows you to remotely manage the city lights.\n\n### Check out its awesome features:\n\n* Turn a specific streetlight on/off \U0001F303\n* Dim a specific streetlight \U0001F60E\n* Receive real-time information about environmental lighting conditions \U0001F4C8\n"
20
url: 'https://www.apache.org/licenses/LICENSE-2.0'
21
defaultContentType: application/json
24
host: 'test.mosquitto.org:{port}'
26
description: Test broker
29
description: Secure connection (TLS) is available through port 8883.
35
- $ref: '#/components/securitySchemes/apiKey'
37
description: Flows to support OAuth 2.0
40
authorizationUrl: 'https://authserver.example/auth'
42
'streetlights:on': Ability to switch lights on
43
'streetlights:off': Ability to switch lights off
44
'streetlights:dim': Ability to dim the lights
46
tokenUrl: 'https://authserver.example/token'
48
'streetlights:on': Ability to switch lights on
49
'streetlights:off': Ability to switch lights off
50
'streetlights:dim': Ability to dim the lights
52
tokenUrl: 'https://authserver.example/token'
54
'streetlights:on': Ability to switch lights on
55
'streetlights:off': Ability to switch lights off
56
'streetlights:dim': Ability to dim the lights
58
authorizationUrl: 'https://authserver.example/auth'
59
tokenUrl: 'https://authserver.example/token'
60
refreshUrl: 'https://authserver.example/refresh'
62
'streetlights:on': Ability to switch lights on
63
'streetlights:off': Ability to switch lights off
64
'streetlights:dim': Ability to dim the lights
69
- $ref: '#/components/securitySchemes/openIdConnectWellKnown'
71
- name: 'env:production'
72
description: This environment is meant for production use case
74
description: This server is a remote server. Not exposed by the application
75
- name: 'visibility:public'
76
description: This resource is public and available to everyone
79
address: 'smartylighting/streetlights/1/0/event/{streetlightId}/lighting/measured'
82
$ref: '#/components/messages/lightMeasured'
83
description: The topic on which measured values may be produced and consumed.
86
$ref: '#/components/parameters/streetlightId'
88
address: 'smartylighting/streetlights/1/0/action/{streetlightId}/turn/on'
91
$ref: '#/components/messages/turnOnOff'
94
$ref: '#/components/parameters/streetlightId'
96
address: 'smartylighting/streetlights/1/0/action/{streetlightId}/turn/off'
99
$ref: '#/components/messages/turnOnOff'
102
$ref: '#/components/parameters/streetlightId'
104
address: 'smartylighting/streetlights/1/0/action/{streetlightId}/dim'
107
$ref: '#/components/messages/dimLight'
110
$ref: '#/components/parameters/streetlightId'
112
receiveLightMeasurement:
115
$ref: '#/channels/lightingMeasured'
117
Inform about environmental lighting conditions of a particular
120
- $ref: '#/components/operationTraits/mqtt'
122
- $ref: '#/channels/lightingMeasured/messages/lightMeasured'
126
$ref: '#/channels/lightTurnOn'
128
- $ref: '#/components/operationTraits/mqtt'
130
- $ref: '#/channels/lightTurnOn/messages/turnOn'
134
$ref: '#/channels/lightTurnOff'
136
- $ref: '#/components/operationTraits/mqtt'
138
- $ref: '#/channels/lightTurnOff/messages/turnOff'
142
$ref: '#/channels/lightsDim'
144
- $ref: '#/components/operationTraits/mqtt'
146
- $ref: '#/channels/lightsDim/messages/dimLight'
151
title: Light measured
153
Inform about environmental lighting conditions of a particular
155
contentType: application/json
157
- $ref: '#/components/messageTraits/commonHeaders'
159
$ref: '#/components/schemas/lightMeasuredPayload'
163
summary: Command a particular streetlight to turn the lights on or off.
165
- $ref: '#/components/messageTraits/commonHeaders'
167
$ref: '#/components/schemas/turnOnOffPayload'
171
summary: Command a particular streetlight to dim the lights.
173
- $ref: '#/components/messageTraits/commonHeaders'
175
$ref: '#/components/schemas/dimLightPayload'
177
lightMeasuredPayload:
183
description: Light intensity measured in lumens.
185
$ref: '#/components/schemas/sentAt'
194
description: Whether to turn on or off the light.
196
$ref: '#/components/schemas/sentAt'
202
description: Percentage to which the light should be dimmed to.
206
$ref: '#/components/schemas/sentAt'
210
description: Date and time when the message was sent.
215
description: Provide your API key as the user and leave the password empty.
218
description: Flows to support OAuth 2.0
221
authorizationUrl: 'https://authserver.example/auth'
223
'streetlights:on': Ability to switch lights on
224
'streetlights:off': Ability to switch lights off
225
'streetlights:dim': Ability to dim the lights
227
tokenUrl: 'https://authserver.example/token'
229
'streetlights:on': Ability to switch lights on
230
'streetlights:off': Ability to switch lights off
231
'streetlights:dim': Ability to dim the lights
233
tokenUrl: 'https://authserver.example/token'
235
'streetlights:on': Ability to switch lights on
236
'streetlights:off': Ability to switch lights off
237
'streetlights:dim': Ability to dim the lights
239
authorizationUrl: 'https://authserver.example/auth'
240
tokenUrl: 'https://authserver.example/token'
241
refreshUrl: 'https://authserver.example/refresh'
243
'streetlights:on': Ability to switch lights on
244
'streetlights:off': Ability to switch lights off
245
'streetlights:dim': Ability to dim the lights
246
openIdConnectWellKnown:
248
openIdConnectUrl: 'https://authserver.example/.well-known'
251
description: The ID of the streetlight.