Streetlights API 1.0.0

The Smartylighting Streetlights API allows you to remotely manage the city lights.

Check out its awesome features:

  • Turn a specific streetlight on/off 🌃
  • Dim a specific streetlight 😎
  • Receive real-time information about environmental lighting conditions 📈

Servers

api.streetlights.smartylighting.com:{port} mqtt

Test broker

port: Secure connection (TLS) is available through port 8883.
ENUM: 1883, 8883 DEFAULT: 1883
Security:

Operations

Sub smartylighting/streetlights/1/0/event/{streetlightId}/lighting/measured

The topic on which measured values may be produced and consumed.

Receive information about environmental lighting conditions of a particular streetlight.

Parameters
streetlightId streetlightId
required
string

The ID of the streetlight.

Accepts the following message:

Light measured lightMeasured

Inform about environmental lighting conditions for a particular streetlight.

Payload lightMeasuredPayload
object
lumens
integer
>= 0

Light intensity measured in lumens.

sentAt sentAt
string
date-time

Date and time when the message was sent.

Additional properties are allowed.

Headers
object
my-app-header
integer
>= 0 <= 100

Additional properties are allowed.

Examples

lightMeasured
Payload
{ "lumens": 0, "sentAt": "2019-08-24T14:15:22Z" }
This example has been generated automatically.
Headers
{ "my-app-header": 0 }
This example has been generated automatically.

Pub smartylighting/streetlights/1/0/action/{streetlightId}/turn/on

Parameters
streetlightId streetlightId
required
string

The ID of the streetlight.

Accepts the following message:

Turn on/off turnOnOff

Command a particular streetlight to turn the lights on or off.

Payload turnOnOffPayload
object
command
string

Whether to turn on or off the light.

Enum: "on" "off"
sentAt sentAt
string
date-time

Date and time when the message was sent.

Additional properties are allowed.

Headers
object
my-app-header
integer
>= 0 <= 100

Additional properties are allowed.

Examples

turnOnOff
Payload
{ "command": "on", "sentAt": "2019-08-24T14:15:22Z" }
This example has been generated automatically.
Headers
{ "my-app-header": 0 }
This example has been generated automatically.

Pub smartylighting/streetlights/1/0/action/{streetlightId}/turn/off

Parameters
streetlightId streetlightId
required
string

The ID of the streetlight.

Accepts the following message:

Turn on/off turnOnOff

Command a particular streetlight to turn the lights on or off.

Payload turnOnOffPayload
object
command
string

Whether to turn on or off the light.

Enum: "on" "off"
sentAt sentAt
string
date-time

Date and time when the message was sent.

Additional properties are allowed.

Headers
object
my-app-header
integer
>= 0 <= 100

Additional properties are allowed.

Examples

turnOnOff
Payload
{ "command": "on", "sentAt": "2019-08-24T14:15:22Z" }
This example has been generated automatically.
Headers
{ "my-app-header": 0 }
This example has been generated automatically.

Pub smartylighting/streetlights/1/0/action/{streetlightId}/dim

Parameters
streetlightId streetlightId
required
string

The ID of the streetlight.

Accepts the following message:

Dim light dimLight

Command a particular streetlight to dim the lights.

Payload dimLightPayload
object
percentage
integer
>= 0 <= 100

Percentage to which the light should be dimmed to.

sentAt sentAt
string
date-time

Date and time when the message was sent.

Additional properties are allowed.

Headers
object
my-app-header
integer
>= 0 <= 100

Additional properties are allowed.

Examples

dimLight
Payload
{ "percentage": 0, "sentAt": "2019-08-24T14:15:22Z" }
This example has been generated automatically.
Headers
{ "my-app-header": 0 }
This example has been generated automatically.

Messages

#1 Light measured lightMeasured

Inform about environmental lighting conditions for a particular streetlight.

Payload lightMeasuredPayload
object
lumens
integer
>= 0

Light intensity measured in lumens.

sentAt sentAt
string
date-time

Date and time when the message was sent.

Additional properties are allowed.

Headers
object
my-app-header
integer
>= 0 <= 100

Additional properties are allowed.

#2 Turn on/off turnOnOff

Command a particular streetlight to turn the lights on or off.

Payload turnOnOffPayload
object
command
string

Whether to turn on or off the light.

Enum: "on" "off"
sentAt sentAt
string
date-time

Date and time when the message was sent.

Additional properties are allowed.

Headers
object
my-app-header
integer
>= 0 <= 100

Additional properties are allowed.

#3 Dim light dimLight

Command a particular streetlight to dim the lights.

Payload dimLightPayload
object
percentage
integer
>= 0 <= 100

Percentage to which the light should be dimmed to.

sentAt sentAt
string
date-time

Date and time when the message was sent.

Additional properties are allowed.

Headers
object
my-app-header
integer
>= 0 <= 100

Additional properties are allowed.