with flag


with flag

Introduction to the Smartylighting Streetlights API

Welcome, API developers! This guide will help you get started with the Smartylighting Streetlights API, enabling you to integrate smart streetlight management into your applications. This API provides powerful capabilities to remotely control and monitor streetlights, contributing to smarter, more efficient city infrastructure.

With this API, you can:

  • Turn a specific streetlight on/off 🌙: Gain direct control over individual streetlights, allowing for scheduled operations or immediate adjustments.
  • Dim a specific streetlight 😎: Adjust the brightness of streetlights to optimize energy consumption and adapt to varying environmental conditions.
  • Receive real-time information about environmental lighting conditions 📈: Stay informed about ambient light levels, enabling dynamic and responsive lighting solutions.

By leveraging these features, you can build innovative applications for urban planning, energy management, and public safety.

Prerequisites

To effectively use the Smartylighting Streetlights API, you will need the following:

  • Kafka Client Library: This API communicates over Kafka. You will need a Kafka client library compatible with your chosen programming language to interact with the Kafka broker.
  • Network Access to Kafka Broker: Ensure your application has network connectivity to the Kafka broker at test.mykafkacluster.org:8092.
  • Authentication Credentials: You will need valid SASL/SCRAM username and password for authentication with the Kafka broker.

Resources and Capabilities

The Smartylighting Streetlights API provides the following resources and capabilities:

ResourceCapabilityDescriptionMessage
smartylighting.streetlights.1.0.event.{streetlightId}.lighting.measuredPublishInform about environmental lighting conditions of a particular streetlight.Light measured
smartylighting.streetlights.1.0.action.{streetlightId}.turn.onSubscribeCommand a particular streetlight to turn the lights on.Turn on/off
smartylighting.streetlights.1.0.action.{streetlightId}.turn.offSubscribeCommand a particular streetlight to turn the lights off.Turn on/off
smartylighting.streetlights.1.0.action.{streetlightId}.dimSubscribeCommand a particular streetlight to dim the lights.Dim light

Authentication

Access to the Smartylighting Streetlights API requires authentication using SASL/SCRAM.

When connecting to the Kafka broker (test.mykafkacluster.org:8092), you must provide your assigned username and password for SASL/SCRAM authentication. This ensures secure communication and authorizes your application to interact with the streetlight management system.

Please refer to your Kafka client library's documentation for specific instructions on how to configure SASL/SCRAM authentication with your credentials.