rgtre
Getting Started with Smartylighting Streetlights API
What this API Does and Why it's Useful
The Smartylighting Streetlights API empowers you to remotely manage and monitor city streetlights. This powerful tool allows for efficient urban lighting control and real-time environmental insights. Imagine being able to:
- Turn a specific streetlight on or off 🌃 with a simple command.
- Dim a specific streetlight 😎 to conserve energy or adjust to ambient conditions.
- Receive real-time information about environmental lighting conditions 📈, enabling adaptive lighting strategies and data-driven decisions.
This API is invaluable for smart city initiatives, energy management, and enhancing public safety and comfort through intelligent lighting infrastructure.
Prerequisites
To begin using the Smartylighting Streetlights API, you will need the following:
- Kafka Client Library: This API communicates over Kafka. You'll need a Kafka client library compatible with your chosen programming language (e.g.,
confluent-kafka-pythonfor Python,kafka-clientsfor Java,node-rdkafkafor Node.js). - Kafka Broker Access: You'll need access to a Kafka broker. Our test broker is available at
test.mykafkacluster.org:8092. - Authentication Credentials: For secure communication, you'll need SASL/SCRAM credentials (username and password) to authenticate with the Kafka broker.
Resources and Capabilities
The Smartylighting Streetlights API provides the following resources and capabilities:
| Resource/Topic | Description | Capabilities |
|---|---|---|
smartylighting.streetlights.1.0.event.{streetlightId}.lighting.measured | This topic is used for publishing real-time environmental lighting conditions from a specific streetlight. |
|
smartylighting.streetlights.1.0.action.{streetlightId}.turn.on | This topic is used to send commands to turn on a specific streetlight. |
|
smartylighting.streetlights.1.0.action.{streetlightId}.turn.off | This topic is used to send commands to turn off a specific streetlight. |
|
smartylighting.streetlights.1.0.action.{streetlightId}.dim | This topic is used to send commands to dim a specific streetlight. |
|
Authentication
Access to the Smartylighting Streetlights API is secured using SASL/SCRAM authentication. This means you will need to provide a username and password to connect to the Kafka broker.
When configuring your Kafka client, ensure you set up the SASL mechanism to SCRAM-SHA-256 (or SCRAM-SHA-512 if supported by your broker) and provide your assigned username and password.
Example (conceptual, specific implementation depends on your Kafka client library):
Please contact support to obtain your authentication credentials if you do not already have them.