Everything is a Thing

Overview

This page introduces the Web of Things API. All functions of the IoTHub can be accessed via a RESTful API based on Web Thing Description. It will also briefly explain what things, properties and actions are and how to create things and how to change properties and actions.

Things

Things are the abstraction of a physical or virtual entity in the (I)IoT context.  This can be a device like a RFID scanner, a controller like a PLC from a supported vendor or standardized protocol (like OPC UA), a database, a file or any other collection of properties. A thing must have an (unique) name and a type. Without any connectors the IoTHub supports the type "virtual" from the group with the same name, but can be extended as shown in the following table:

GroupTypeType for DevelopersDescription
ELCO DevicesSpider67 Mobileelco.spider67mobileCustomized control for Spider67 Mobile devices produced by Elco Industrial Automation
Pick-To-Light (PTL)elco.ptlCustomized control for Pick-To-Light (PTL) devices produced by Elco Industrial Automation
RFID Q-Series Scannerelco.rfidCustomized control for RFID Q-Series Scanners produced by ELCO Industrial Automation
Edge Boxelco.edgeboxCustomized control for Edge Box software produced by ELCO Industrial Automation
Common ProtocolsOPC Unified Architecture (OPC UA)opc.uaFull support for devices operating under OPC UA protocol
Modbus TCPmodbus.tcpFull support for devices operating under Modbus TCP protocol
Generic MQTTmqtt.genericFull support for devices operating under MQTT protocol
Constrained Application Protocol (CoAP)coapFull support for devices operating under CoAP protocol
Exclusive TechnologiesSiemens Simatic S7siemens.s7Full support for Siemens Simatic S7 devices
Additional DevicesVirtual Thingvirtual.virtualVirtual devices which do not match with the previous types. These kind of devices can be fully controlled and customized by you!

There are different thing states which indicate the running status of a thing as below:

Icon in thing listDescription
Thing created
Thing is created and not connected yet.
Thing online
Thing is connected without errors.
Thing with warnings
Thing is working, but there are warnings
Thing with errors
There is an error and the thing is not working
Thing offline
The thing is regularly not connected to its physical device and does not work

Note

Undefined states are very unlikely to appear in the IoTHub, however, if a new state is received, that is not defined, then it will be represented by a unknown state icon.

Properties

A property represents a specific value of a thing. Some properties may be read-only and some may be writable. A property must have a name and a datatype. The allowed datatypes are

DatatypeMinimal ValueMaximal ValueDescription
integer-92233720368547758089223372036854775807
number≈-1.7*10308+1.7*10308
booleanfalsetruetrue/false Value → „Checkbox“
stringNumber or Text with any Sign

Note

There are two additional datatypes

  • object/struct: contains elements with one of the datatypes (inclusive object itself) and a name
  • array: a list of elements of one of the datatypes

Actions

An action is a special command for a thing and comes along the thing type. It is not possible to create a new action. An action can have parameters and always has a result. Actions are executed asynchronously, between triggering the action and receiving the action result the action has the state "pending".

Events

An event can provide information about changes of a thing or currently ongoing processes. E.g. an event that informs the user about the state of a thing which has switched from offline to online or an event that provides the information that a thing is currently rebooting. Events are only for informational purposes, there is no interaction with them.

Alarms

Alarms can be set for properties of a thing and will be triggered if there values are not compatible with the set threshold. Active alarms can automatically trigger custom reactions and get acknowledged by users. More detailed information about alarms can be found in the Alarms section.

Last Updated: