IoT Export

Generic IoT Data Model

8min

Introduction

The BSC IoT Core data model uses a generic approach to decouple the data description of individual channels from the model specification.

For this purpose, "primitive" data types are defined, which together with further information provide the actual data description.

Data model

Thing

The representation of a device.

Field

Description

id

The unique ThingID to identify the device in our system.

name

The name of the device assigned by the user.

channelGroups

An array of channel groups.

parameterGroups

An array of channel groups intended for configuration parameters.

state

The current state of the device. Possible states:

  • UNKNOWN
  • UNINITIALIZED
  • INITIALIZING
  • ONLINE
  • OFFLINE
  • REMOVING
  • REMOVED

metaInfos

Attached meta information as a map object.

Channel Group

A group of channels, mainly used to group channels logically.

Field

Description

channelGroupId

ChannelGroupID unique to this device.

channelDescriptionData

The description data for this channel group.

channels

An array of channels.

Channel

Representation of the property of a device. This can be e.g. a temperature sensor.

A device can have several channels. E.g. temperature and battery voltage etc.

Field

Description

channelId

Unique ChannelID related to this device.

channelDescriptionData

The data description of the channel.

value

The current value of the channel.

valueDescriptionData

The data description of the value used in the channel.

writeable

Indicates whether the value of the channel can be changed.

metaInfos

Optional meta information.

Channel description

A channel description is used to define type information of a channel. This is mainly used to influence the visual representation within UIs.

Field

Description

channelTypeEnum

Type Information. Possible values:

  • DEFAULT
  • COLOR
  • CONTACT
  • DETECTION
  • HEATING
  • LIGHTING
  • NUMERIC
  • SECURITY
  • SETPOINT
  • SHADING
  • STATE
  • STRING
  • SWITCH
  • TEMPORAL

label

Display name.

Value description

The value description provides concrete type information and, if necessary, offers a selection of possible values.

The evaluation of the field "value" of a channel depends on the set description. For example, color values are encoded in a string and written to the value field. The correct interpretation is then only possible by evaluating the type.

Field

Description

valueType

Type Information. Possible values:

  • COLOR_sRGB
  • GEOGRAPHIC_POSITION
  • NUMBER_LONG
  • NUMBER_DOUBLE
  • STATE
  • STATE_NUMBER_LONG
  • TEXT

possibleValues

Optionally the possible values. Mainly used to specify possible STATES. Contains a map with the possible states and their intended translation.

unit

If available, the unit of the value.

min

Minimum value.

max

Maximum value.

stepping

Steps by which values can be changed.

decimalPartDigits

Decimal places.

Meta information

Meta information is transferred as a key(String)→value(String) pair.

These can be attached to Things as well as Channels.

Example thing object

JSON