IoT Export
Generic IoT Data Model
8 min
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 { "id" "b9f09ef8 3c3f 459e 841f 66bdaedff183", "name" "fsb14", "channelgroups" \[{ "channelgroupid" "sensor group", "channeldescriptiondata" null, "channels" \[{ "channelid" "jalousie", "channeldescriptiondata" { "channeltypeenum" "shading", "label" { "de de" "jalousie", "en us" "shutters" } }, "value" "29 0", "valuedescriptiondata" { "valuetype" "number double", "unit" "%", "min" 0 0, "max" 100 0, "stepping" 1 0, "decimalpartdigits" 1, "possiblevalues" null }, "writeable" false, "metainfos" { "metainfo >id" "asensor#b9f09ef8 3c3f 459e 841f 66bdaedff183#jalousie", "message >count" "0", "eoap >changeable" "true", "message >enabled" "false", "sensor name" "jalousie", "tsystems >type" "value" } }, { "channelid" "jalousiestate", "channeldescriptiondata" { "channeltypeenum" "shading", "label" { "de de" "jalousie", "en us" "shutters" } }, "value" "unknown", "valuedescriptiondata" { "valuetype" "state", "unit" null, "min" null, "max" null, "stepping" null, "decimalpartdigits" null, "possiblevalues" { "unknown" { "de de" "unbekannt", "en us" "unknown" }, "up" { "de de" "herauf", "en us" "up" }, "down" { "de de" "herunter", "en us" "down" } } }, "writeable" false, "metainfos" { "metainfo >id" "asensor#b9f09ef8 3c3f 459e 841f 66bdaedff183#jalousiestate", "message >count" "0", "eoap >changeable" "false", "message >enabled" "false", "sensor name" "direction", "tsystems >type" "state" } }, { "channelid" "priority", "channeldescriptiondata" { "channeltypeenum" "switch", "label" { "de de" "priorität", "en us" "priority" } }, "value" "off", "valuedescriptiondata" { "valuetype" "state", "unit" null, "min" null, "max" null, "stepping" null, "decimalpartdigits" null, "possiblevalues" { "unknown" { "de de" "unbekannt", "en us" "unknown" }, "on" { "de de" "an", "en us" "on" }, "off" { "de de" "aus", "en us" "off" } } }, "writeable" false, "metainfos" { "metainfo >id" "asensor#b9f09ef8 3c3f 459e 841f 66bdaedff183#priority", "message >count" "0", "eoap >changeable" "true", "message >enabled" "false", "sensor name" "priority", "tsystems >type" "state" } }, { "channelid" "jalousieslat", "channeldescriptiondata" { "channeltypeenum" "shading", "label" { "de de" "jalousie (lamellen)", "en us" "shutters (slats)" } }, "value" "unknown", "valuedescriptiondata" { "valuetype" "state", "unit" null, "min" null, "max" null, "stepping" null, "decimalpartdigits" null, "possiblevalues" { "unknown" { "de de" "unbekannt", "en us" "unknown" }, "up" { "de de" "herauf", "en us" "up" }, "down" { "de de" "herunter", "en us" "down" } } }, "writeable" false, "metainfos" { "metainfo >id" "asensor#b9f09ef8 3c3f 459e 841f 66bdaedff183#jalousieslat", "message >count" "0", "eoap >changeable" "true", "message >enabled" "false", "sensor name" "jalousieslat", "tsystems >type" "state" } }] }], "state" "online", "parametergroups" null, "metainfos" { "alexa >alexa live updates" "false", "monitoring >monitorable" "true", "teachin >group displayname" "test", "bsc >short info" "fsb14", "metainfo >id" "adevice#b9f09ef8 3c3f 459e 841f 66bdaedff183", "teachin >reference id" "enocean eltako fsb14", "eoap >activated" "true", "teachin >transmission id" "default=4291820288", "lastmodified" "1636543466499", "eoap >alarm" "false" } }