Skip to content
This repository was archived by the owner on Nov 16, 2023. It is now read-only.
This repository was archived by the owner on Nov 16, 2023. It is now read-only.

Twin Reflector Proxy - Ingest telemetry with twin context #17

@chbaranowski

Description

@chbaranowski

More details and context see issue: #16

User Story User Story Ingest telemetry with context`

As Cloud Connector,
I want ingest sensor data (points) with context as events asynchronously into ADT,
so that the device and sensor is created or updated in the ADT topology
and the actual telemetry value is reflected in ADT.
and I don't have to worry about the REST management API limitations (e.g. throttling) and the REST API details (e.g. Create or Update).

User Story Details

Ingest sensor data (points) with twin context (including properties, attributes and relationships)

Protocol

Pre-conditions

  • The ontology must be predefined (in ADT version 1 the space types and property-keys are defined)
  • ADT IoT Hub needs to be provision

Event Hub Headers

Please see user story #16

Send telemetry data as event (sensor)

Event Hub Message

Headers:

  • TwinReflectorProxy-MessageType: ingest
  • Source: cbs

Forward all non Twin Reflector Proxy event hub message headers to IoT Hub and prefix them (e.g. TwinReflectorAgent-Source).

Message Payload (Example):

{
  "id": "S1",                               // external Id of the sensor (point)
  "entity-type": "Sensor",
  "attributes": {
     "dataType": "Temperature"
  },
  "properties": [
      {
          "entity-type": "propertykeys",
          "name": "displayName",
          "value": "Temperature XDK"
      }
  ],
  "relationships": [
      {
          "entity-type":     "device",
          "name":            "parent",
          "target-id":       "D1"           // external Id of the device (equipment)
      }
  ],
  "telemetry": "100"                        // any kind of telemetry data
}

Twin Reflector Message Processing

  • Query for the sensor by the external Id
  • Create or update the sensor via the management API
  • Send the telemetry data to the IoT Hub

Metadata

Metadata

Assignees

No one assigned

    Labels

    StoryUser story

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions