Devices


The very first elements that an installation is able to manage are devices, such as lights, shutters, grid-meters, charging-stations, ….


As such, the API presents all the devices that can be added in an installation. 
Each device has got his own endpoint.
The API controls automatically that a device can be installed within an installation or not. 
For instance: a security installation such as a eone does not manage shutters and so it is not possible to add such a device into that installation.



A device is defined by a set of properties, operators, general sub-collections (measures, logs, events) and relationships



Properties 

To help in the immediate reading of the properties, they are prefixed by a keyword explaining in which category they are :
Installation properties = those properties are read-only properties such as the serial-number of the product,the reference, ….
Installation-serial-number, installation-reference, 
Configuration properties = those properties are read and write properties and are used to setup how the device will functions. Most of the time those properties are parameterized by the installer and are changed very rarely.
Usage properties = those properties are read and write properties. For instance the friendly name of a device. They could be changed frequently.
State properties = those properties are read only properties. It could be properties coming from a sensor (for instance a temperature), but it could be as well properties reflecting the state of a device after an operation (for instance the state of a light after the operation switch-on)

 

 

Operators 

Except the CRUD (Create-Read-Update-Delete) operations which are handled by the HTTP verbs, the other operations are called by a specific verb prefixed  by the keyword operators. The result of an operation most of the time is the change of a state properties, change which could happen a long time after the call of the operations. For instance, an operation could be move-up for a  Shutters,but the  change of the property state-position would happen several seconds later.

 


Sub-collections

General Sub-collections :

Measures & Logs sub-collection (see next slides about for more details): Most of the time those two sub-collections are the historical records of a state property. For instance, if the state-property temperature is recorded, then it will appear within the sub-collection “measures”.

Specific Sub-collections :
Sub-collections which are not time based. 

 

Relationships 


A device can be linked with other resources such as groups. Those links are recorded under this  Type of properties.