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

Twin Reflector Proxy - Ingest telemetry with twin context #17

Open
chbaranowski opened this issue Jun 7, 2019 · 0 comments
Open

Twin Reflector Proxy - Ingest telemetry with twin context #17

chbaranowski opened this issue Jun 7, 2019 · 0 comments
Labels
Story User story

Comments

@chbaranowski
Copy link
Collaborator

chbaranowski commented Jun 7, 2019

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
@chbaranowski chbaranowski added the Story User story label Jun 7, 2019
@kaizimmerm kaizimmerm pinned this issue Jun 27, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Story User story
Projects
None yet
Development

No branches or pull requests

1 participant